Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
ri committed Apr 7, 2018
1 parent 40656bf commit a358ba6
Show file tree
Hide file tree
Showing 38 changed files with 213 additions and 78 deletions.
2 changes: 1 addition & 1 deletion SDlgOptions.cpp
Expand Up @@ -76,7 +76,7 @@ SDlgOptions::SDlgOptions(GLSatAbstractWidget *satWidget) {
connect(widget.listViewDBLoc, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(addToLocList(const QModelIndex &)));
connect(widget.listViewSat, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(changeDbSat()));
connect(widget.listViewLoc, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(changeDbLoc()));
connect(scriptFrame->btnRefresh, SIGNAL(clicked()), this, SLOT(scriptParameters()));
connect(scriptFrame->getWidget()->btnRefresh, SIGNAL(clicked()), this, SLOT(scriptParameters()));
connect(widget.btnDeleteSatList, SIGNAL(clicked()), this, SLOT(deleteSatList()));
connect(widget.btnDeleteLocList, SIGNAL(clicked()), this, SLOT(deleteLocList()));
connect(widget.btnAddToSatList , SIGNAL(clicked()), this, SLOT(addToSatList ()));
Expand Down
12 changes: 6 additions & 6 deletions jscalc/SScriptFrame.cpp
Expand Up @@ -12,7 +12,7 @@
#include "SScriptFrame.h"

SScriptFrame::SScriptFrame(QString fileName) {
this->setupUi(this);
widget.setupUi(this);

m_sat = NULL;
m_loc = NULL;
Expand All @@ -22,16 +22,16 @@ SScriptFrame::SScriptFrame(QString fileName) {
QFile file(fileName);

if (!file.open(QIODevice::ReadOnly)) {
textEdit->append(file.errorString() + ": " + file.fileName());
widget.textEdit->append(file.errorString() + ": " + file.fileName());
}

QTextStream stream(&file);
script = stream.readAll();
file.close();
document = engine.newQObject(textEdit);
document = engine.newQObject(widget.textEdit);
engine.globalObject().setProperty("document", document);

connect(btnRefresh, SIGNAL(clicked()), this, SLOT(reload()));
connect(widget.btnRefresh, SIGNAL(clicked()), this, SLOT(reload()));
}

SScriptFrame::~SScriptFrame() {
Expand All @@ -43,7 +43,7 @@ void SScriptFrame::reload() {
return;
}

textEdit->clear();
widget.textEdit->clear();

QJSValue ascSat = engine.newArray(6);
QJSValue ascLoc = engine.newArray(6);
Expand All @@ -66,7 +66,7 @@ void SScriptFrame::reload() {
QJSValue sVal = engine.evaluate(script);

if (sVal.isError()) {
textEdit->append(sVal.toString());
widget.textEdit->append(sVal.toString());
}
}

Expand Down
5 changes: 4 additions & 1 deletion jscalc/SScriptFrame.h
Expand Up @@ -13,19 +13,22 @@
#include "../satutils/Satellite.h"
#include "../locutils/Location.h"

class SScriptFrame : public QWidget, public Ui::JsWidget {
class SScriptFrame : public QWidget {
Q_OBJECT;
public:
SScriptFrame(QString fileName = "");
virtual ~SScriptFrame();
void exec(Satellite *sat, Location *loc, double time);
inline Ui::JsWidget * getWidget() { return &widget; }

private:
Satellite *m_sat;
Location *m_loc;
double m_time;
QString script;
QJSEngine engine;
QJSValue document;
Ui::JsWidget widget;
private slots:
void reload();
};
Expand Down
6 changes: 3 additions & 3 deletions tleupd/SUpdater.cpp
Expand Up @@ -54,7 +54,7 @@ void SUpdater::updateTle() {
}

QUrl url(model->item(urlIndex)->text());
model->item(urlIndex)->setIcon(QIcon(":/status/task.png"));
model->item(urlIndex)->setIcon(QIcon(":/status/right-arrow-1.svg"));

QFileInfo fileInfo(url.url());
QString fileName = fileInfo.fileName();
Expand Down Expand Up @@ -100,12 +100,12 @@ void SUpdater::httpFinished() {

if (reply->error()) {
file->remove();
model->item(urlIndex)->setIcon(QIcon(":/status/no.png"));
model->item(urlIndex)->setIcon(QIcon(":/status/prohibition.svg"));
widget.textStatus->appendPlainText(QString("[%0]: %1")
.arg(file->fileName()).arg(reply->errorString()));
}
else {
model->item(urlIndex)->setIcon(QIcon(":/status/ok.png"));
model->item(urlIndex)->setIcon(QIcon(":/status/correct.svg"));
if (file->isWritable()) {
file->write(reply->readAll());
}
Expand Down
Binary file removed ui/14_layer_deletelayer.png
Binary file not shown.
Binary file removed ui/1leftarrow.png
Binary file not shown.
Binary file removed ui/1rightarrow.png
Binary file not shown.
30 changes: 13 additions & 17 deletions ui/SatViewer.qrc
Expand Up @@ -10,38 +10,34 @@
<file>menu.svg</file>
</qresource>
<qresource prefix="status">
<file>ok.png</file>
<file>task.png</file>
<file>no.png</file>
<file>correct.svg</file>
<file>right-arrow-1.svg</file>
<file>prohibition.svg</file>
</qresource>
<qresource prefix="options">
<file>widgets.png</file>
<file>info.svg</file>
<file>satviewer.png</file>
<file>calc.png</file>
<file>mapsettings.png</file>
<file>clock.png</file>
<file>reload.png</file>
<file>configure.png</file>
<file>stock_channel.png</file>
<file>info.png</file>
<file>gnome-applets.png</file>
</qresource>
<qresource prefix="actions">
<file>tooloptions.png</file>
<file>cancel.png</file>
<file>14_layer_deletelayer.png</file>
<file>garbage.svg</file>
<file>folder.svg</file>
<file>cancel-1.svg</file>
<file>edit.svg</file>
<file>add.svg</file>
<file>remove.svg</file>
<file>refresh.svg</file>
<file>select.png</file>
<file>filesave.png</file>
<file>reload.png</file>
<file>fileopen.png</file>
<file>edit.png</file>
<file>add.png</file>
<file>remove.png</file>
<file>clear.png</file>
</qresource>
<qresource prefix="list">
<file>1rightarrow.png</file>
<file>1leftarrow.png</file>
<file>right-arrow-1.svg</file>
<file>left-arrow-1.svg</file>
</qresource>
<qresource prefix="icon"/>
</RCC>
21 changes: 15 additions & 6 deletions ui/about.ui
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<width>655</width>
<height>317</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -23,16 +23,25 @@
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/options/satviewer.png&quot; /&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot; font-size:36pt; font-weight:600;&quot;&gt;SatViewer&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:36pt; font-weight:600;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/options/satviewer.png&quot; /&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:36pt; font-weight:600;&quot;&gt;SatViewer&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:36pt; font-weight:600;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
Expand Down
Binary file removed ui/add.png
Binary file not shown.
9 changes: 9 additions & 0 deletions ui/add.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions ui/cancel-1.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed ui/cancel.png
Binary file not shown.
Binary file removed ui/clear.png
Binary file not shown.
9 changes: 9 additions & 0 deletions ui/correct.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed ui/download.png
Binary file not shown.
21 changes: 15 additions & 6 deletions ui/earthsettings.ui
Expand Up @@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>320</width>
<height>268</height>
<width>453</width>
<height>564</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -23,7 +23,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
Expand All @@ -41,9 +50,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-74</y>
<width>304</width>
<height>342</height>
<y>0</y>
<width>425</width>
<height>775</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
Expand Down
9 changes: 9 additions & 0 deletions ui/edit.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions ui/folder.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions ui/garbage.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed ui/info.png
Binary file not shown.
10 changes: 10 additions & 0 deletions ui/info.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 22 additions & 4 deletions ui/jswidgetlist.ui
Expand Up @@ -20,7 +20,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
Expand All @@ -36,7 +45,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
Expand All @@ -52,7 +70,7 @@
</property>
<property name="icon">
<iconset resource="SatViewer.qrc">
<normaloff>:/actions/filesave.png</normaloff>:/actions/filesave.png</iconset>
<normaloff>:/status/correct.svg</normaloff>:/status/correct.svg</iconset>
</property>
<property name="shortcut">
<string extracomment="Save"/>
Expand All @@ -75,7 +93,7 @@
</property>
<property name="icon">
<iconset resource="SatViewer.qrc">
<normaloff>:/actions/edit.png</normaloff>:/actions/edit.png</iconset>
<normaloff>:/actions/edit.svg</normaloff>:/actions/edit.svg</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
Expand Down

0 comments on commit a358ba6

Please sign in to comment.