Skip to content
Permalink
Browse files

.

  • Loading branch information...
ri
ri committed Apr 7, 2018
1 parent 40656bf commit a358ba617f1b62f837407fb43013478663f055c4
@@ -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 ()));
@@ -12,7 +12,7 @@
#include "SScriptFrame.h"

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

m_sat = NULL;
m_loc = NULL;
@@ -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() {
@@ -43,7 +43,7 @@ void SScriptFrame::reload() {
return;
}

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

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

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

@@ -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();
};
@@ -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();
@@ -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());
}
Binary file not shown.
BIN -589 Bytes ui/1leftarrow.png
Binary file not shown.
BIN -595 Bytes ui/1rightarrow.png
Binary file not shown.
@@ -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>
@@ -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">
@@ -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>
BIN -3.25 KB ui/add.png
Binary file not shown.
@@ -0,0 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129">
<g>
<g>
<path d="M64.5,6.5c-32,0-58.1,26-58.1,58s26,58,58.1,58c32,0,58-26,58-58S96.5,6.5,64.5,6.5z M64.5,114.4 C37,114.4,14.6,92,14.6,64.5S37,14.6,64.5,14.6c27.5,0,49.9,22.4,49.9,49.9S92,114.4,64.5,114.4z"/>
<path d="m91.2,59.9h-22.6v-22.7c0-2.3-1.8-4.1-4.1-4.1-2.3,0-4.1,1.8-4.1,4.1v22.6h-22.6c-2.3,0-4.1,1.8-4.1,4.1s1.8,4.1 4.1,4.1h22.6v22.6c0,2.3 1.8,4.1 4.1,4.1 2.3,0 4.1-1.8 4.1-4.1v-22.6h22.6c2.3,0 4.1-1.8 4.1-4.1s-1.8-4-4.1-4z"/>
</g>
</g>
</svg>
@@ -0,0 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129">
<g>
<g>
<path d="M64.5,122.6c32,0,58.1-26,58.1-58.1S96.5,6.4,64.5,6.4S6.4,32.5,6.4,64.5S32.5,122.6,64.5,122.6z M64.5,14.6 c27.5,0,49.9,22.4,49.9,49.9S92,114.4,64.5,114.4S14.6,92,14.6,64.5S37,14.6,64.5,14.6z"/>
<path d="m42.7,85.7c0.8,0.8 1.8,1.2 2.9,1.2s2.1-0.4 2.9-1.2l16-16 16,16c0.8,0.8 1.8,1.2 2.9,1.2s2.1-0.4 2.9-1.2c1.6-1.6 1.6-4.2 0-5.8l-16-16 16-16c1.6-1.6 1.6-4.2 0-5.8s-4.2-1.6-5.8,0l-16,16-16-16c-1.6-1.6-4.2-1.6-5.8,0-1.6,1.6-1.6,4.2 0,5.8l16,16-16,16c-1.6,1.6-1.6,4.2-1.42109e-14,5.8z"/>
</g>
</g>
</svg>
BIN -792 Bytes ui/cancel.png
Binary file not shown.
BIN -3.57 KB ui/clear.png
Binary file not shown.
@@ -0,0 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129">
<g>
<g>
<path d="m40.5,61.1c-1.6-1.6-4.2-1.6-5.8,0-1.6,1.6-1.6,4.2 0,5.8l18.9,18.9c0.8,0.8 1.8,1.2 2.9,1.2 0.1,0 0.1,0 0.2,0 1.1-0.1 2.2-0.6 3-1.5l47.3-56.7c1.4-1.7 1.2-4.3-0.5-5.8-1.7-1.4-4.3-1.2-5.8,0.5l-44.5,53.3-15.7-15.7z"/>
<path d="m95.1,15.3c-23-14.4-52.5-11-71.7,8.2-22.6,22.6-22.6,59.5 7.10543e-15,82.1 11.3,11.3 26.2,17 41,17s29.7-5.7 41-17c19.3-19.3 22.6-48.9 8.1-71.9-1.2-1.9-3.7-2.5-5.6-1.3-1.9,1.2-2.5,3.7-1.3,5.6 12.5,19.8 9.6,45.2-7,61.8-19.4,19.4-51.1,19.4-70.5,0-19.4-19.4-19.4-51.1 0-70.5 16.6-16.5 41.9-19.4 61.7-7.1 1.9,1.2 4.4,0.6 5.6-1.3 1.2-1.9 0.6-4.4-1.3-5.6z"/>
</g>
</g>
</svg>
BIN -3.42 KB ui/download.png
Binary file not shown.
@@ -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">
@@ -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>
@@ -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">
@@ -0,0 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129">
<g>
<g>
<path d="m119.2,114.3h-109.4c-2.3,0-4.1,1.9-4.1,4.1s1.9,4.1 4.1,4.1h109.5c2.3,0 4.1-1.9 4.1-4.1s-1.9-4.1-4.2-4.1z"/>
<path d="m5.7,78l-.1,19.5c0,1.1 0.4,2.2 1.2,3 0.8,0.8 1.8,1.2 2.9,1.2l19.4-.1c1.1,0 2.1-0.4 2.9-1.2l67-67c1.6-1.6 1.6-4.2 0-5.9l-19.2-19.4c-1.6-1.6-4.2-1.6-5.9-1.77636e-15l-13.4,13.5-53.6,53.5c-0.7,0.8-1.2,1.8-1.2,2.9zm71.2-61.1l13.5,13.5-7.6,7.6-13.5-13.5 7.6-7.6zm-62.9,62.9l49.4-49.4 13.5,13.5-49.4,49.3-13.6,.1 .1-13.5z"/>
</g>
</g>
</svg>
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129">
<g>
<path d="m10.5,114.9h107.9c2.3,0 4.1-1.8 4.1-4.1v-79.4c0-2.3-1.8-4.1-4.1-4.1h-52.1l-9.7-10.8c-0.8-0.9-1.9-1.4-3-1.4h-43.1c-2.3,0-4.1,1.8-4.1,4.1v91.6c0,2.3 1.9,4.1 4.1,4.1zm4.1-91.5h37.2l9.7,10.8c0.8,0.9 1.9,1.4 3,1.4h49.9v71.3h-99.8v-83.5z"/>
</g>
</svg>
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='utf-8'?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129">
<g>
<g>
<path d="m10.5,31.2h4.5l10.5,87.7c0.2,2.1 2,3.6 4.1,3.6h69.8c2.1,0 3.8-1.5 4.1-3.6l10.5-87.7h4.5c2.3,0 4.1-1.8 4.1-4.1s-1.8-4.1-4.1-4.1h-8.2-23.2v-12.5c0-2.3-1.8-4.1-4.1-4.1h-37c-2.3,0-4.1,1.8-4.1,4.1v12.5h-23.2-8.2c-2.3,0-4.1,1.8-4.1,4.1s1.9,4.1 4.1,4.1zm39.6-16.6h28.8v8.4h-28.8v-8.4zm55.6,16.6l-9.9,83.2h-62.6l-9.9-83.2h82.4z"/>
<path d="m50.9,101.9c2.3,0 4.1-1.8 4.1-4.1v-49.1c0-2.3-1.8-4.1-4.1-4.1-2.3,0-4.1,1.8-4.1,4.1v49.1c0,2.3 1.8,4.1 4.1,4.1z"/>
<path d="m78.1,101.9c2.3,0 4.1-1.8 4.1-4.1v-49.1c0-2.3-1.8-4.1-4.1-4.1s-4.1,1.8-4.1,4.1v49.1c0,2.3 1.9,4.1 4.1,4.1z"/>
</g>
</g>
</svg>
BIN -2.13 KB ui/info.png
Binary file not shown.
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='utf-8'?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129">
<g>
<g>
<path d="m64.5,122.6c32,0 58-26 58-58s-26-58-58-58-58.1,26-58.1,58 26.1,58 58.1,58zm0-108c27.5,5.32907e-15 49.9,22.4 49.9,49.9s-22.4,49.9-49.9,49.9-49.9-22.4-49.9-49.9 22.4-49.9 49.9-49.9z"/>
<path d="m54.8,90.1c-2.3,0-4.1,1.8-4.1,4.1s1.8,4.1 4.1,4.1h26.9c2.3,0 4.1-1.8 4.1-4.1s-1.8-4.1-4.1-4.1h-9.4v-36.1c0-2.3-1.8-4.1-4.1-4.1h-13.4c-2.3,0-4.1,1.8-4.1,4.1 0,2.3 1.8,4.1 4.1,4.1h9.4v32h-9.4z"/>
<circle cx="62.7" cy="36.5" r="6.6"/>
</g>
</g>
</svg>
@@ -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>
@@ -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>
@@ -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"/>
@@ -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>
Oops, something went wrong.

0 comments on commit a358ba6

Please sign in to comment.
You can’t perform that action at this time.