##// END OF EJS Templates
Better proxy support Wip....
jeandet -
r15:b90d69939be9 default
parent child
Show More
@@ -0,0 +1,73
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!-- Created with Inkscape (http://www.inkscape.org/) -->
3 <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="48" height="48" id="svg7854" sodipodi:version="0.32" inkscape:version="0.45" version="1.0" sodipodi:docbase="/home/dobey/Projects/gnome-icon-theme/scalable/emblems" sodipodi:docname="emblem-downloads.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-filename="/home/lapo/Desktop/emblem-downloads.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90">
4 <defs id="defs7856">
5 <linearGradient inkscape:collect="always" id="linearGradient6975">
6 <stop style="stop-color:#ffffff;stop-opacity:1;" offset="0" id="stop6977"/>
7 <stop style="stop-color:#ffffff;stop-opacity:0;" offset="1" id="stop6979"/>
8 </linearGradient>
9 <linearGradient inkscape:collect="always" id="linearGradient6964">
10 <stop style="stop-color:#ffffff;stop-opacity:1;" offset="0" id="stop6967"/>
11 <stop style="stop-color:#ffffff;stop-opacity:0;" offset="1" id="stop6969"/>
12 </linearGradient>
13 <linearGradient inkscape:collect="always" id="linearGradient6970">
14 <stop style="stop-color:#eeeeec;stop-opacity:1" offset="0" id="stop6972"/>
15 <stop style="stop-color:#eeeeec;stop-opacity:0" offset="1" id="stop6974"/>
16 </linearGradient>
17 <linearGradient inkscape:collect="always" id="linearGradient6962">
18 <stop style="stop-color:#babdb6;stop-opacity:1" offset="0" id="stop6964"/>
19 <stop style="stop-color:#babdb6;stop-opacity:0" offset="1" id="stop6966"/>
20 </linearGradient>
21 <linearGradient inkscape:collect="always" id="linearGradient7129">
22 <stop style="stop-color:#000000;stop-opacity:1;" offset="0" id="stop7131"/>
23 <stop style="stop-color:#000000;stop-opacity:0;" offset="1" id="stop7133"/>
24 </linearGradient>
25 <radialGradient inkscape:collect="always" xlink:href="#linearGradient7129" id="radialGradient5955" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.4320988,0,10.586385)" cx="11.313708" cy="18.641243" fx="11.313708" fy="18.641243" r="7.1594563"/>
26 <linearGradient inkscape:collect="always" xlink:href="#linearGradient6970" id="linearGradient6996" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.8421053,0,0,1.9998392,2.8157881,0.503458)" x1="10.5625" y1="11.850357" x2="10.5625" y2="7.0549741"/>
27 <linearGradient inkscape:collect="always" xlink:href="#linearGradient6962" id="linearGradient6998" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.8421053,0,0,1.9998392,2.8157881,0.503458)" x1="8.4375" y1="11" x2="8.4375" y2="7.0917883"/>
28 <linearGradient inkscape:collect="always" xlink:href="#linearGradient6964" id="linearGradient7000" gradientUnits="userSpaceOnUse" x1="19.75" y1="22.500912" x2="19.75" y2="13.937252"/>
29 <linearGradient inkscape:collect="always" xlink:href="#linearGradient6975" id="linearGradient7002" gradientUnits="userSpaceOnUse" x1="22.539028" y1="41.65625" x2="23.246136" y2="31.736544"/>
30 </defs>
31 <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#494949" borderopacity="1" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1" inkscape:cx="36.776007" inkscape:cy="31.76253" inkscape:document-units="px" inkscape:current-layer="layer1" width="48px" height="48px" inkscape:showpageshadow="false" inkscape:window-width="1063" inkscape:window-height="894" inkscape:window-x="128" inkscape:window-y="114" showgrid="false" gridspacingx="0.5px" gridspacingy="0.5px" gridempspacing="2" showborder="false" showguides="true" inkscape:guide-bbox="false" borderlayer="false" inkscape:grid-bbox="false" inkscape:grid-points="true"/>
32 <metadata id="metadata7859">
33 <rdf:RDF>
34 <cc:Work rdf:about="">
35 <dc:format>image/svg+xml</dc:format>
36 <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
37 <dc:creator>
38 <cc:Agent>
39 <dc:title>Lapo Calamandrei</dc:title>
40 </cc:Agent>
41 </dc:creator>
42 <dc:source/>
43 <cc:license rdf:resource="http://creativecommons.org/licenses/GPL/2.0/"/>
44 <dc:title>Download</dc:title>
45 <dc:subject>
46 <rdf:Bag/>
47 </dc:subject>
48 </cc:Work>
49 <cc:License rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
50 <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
51 <cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
52 <cc:requires rdf:resource="http://web.resource.org/cc/Notice"/>
53 <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
54 <cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike"/>
55 <cc:requires rdf:resource="http://web.resource.org/cc/SourceCode"/>
56 </cc:License>
57 </rdf:RDF>
58 </metadata>
59 <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1">
60 <path sodipodi:type="arc" style="opacity:0.15;fill:url(#radialGradient5955);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path5975" sodipodi:cx="11.313708" sodipodi:cy="18.641243" sodipodi:rx="7.1594563" sodipodi:ry="3.0935922" d="M 18.473165 18.641243 A 7.1594563 3.0935922 0 1 1 4.1542521,18.641243 A 7.1594563 3.0935922 0 1 1 18.473165 18.641243 z" transform="matrix(2.5432565,0,0,1.5691033,-4.7736618,11.749965)"/>
61 <g id="g7012" transform="translate(0,-2)">
62 <rect ry="4.4840183" rx="4.4840183" y="6.5206337" x="4.5084929" height="19.962349" width="38.987251" id="rect5987" style="fill:#d3d7cf;fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/>
63 <rect ry="2.0382936" rx="2.0382936" y="12.5" x="9.5" height="8" width="29" id="rect6983" style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#babdb6;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/>
64 <rect ry="3.5065231" rx="3.5065231" y="7.5" x="5.5042353" height="18.003614" width="36.995766" id="rect6959" style="opacity:0.55;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/>
65 <rect ry="0.53477186" rx="0.53477186" y="14" x="11" height="5" width="15" id="rect5981" style="fill:#729fcf;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/>
66 </g>
67 <g id="g6991">
68 <path sodipodi:nodetypes="cccccccc" id="path5977" d="M 18.506578,13.5 L 18.5,29.5 L 11.499998,29.501126 L 23.999999,43.5 L 36.499999,29.501126 L 29.520162,29.501126 L 29.520162,13.5 L 18.506578,13.5 z " style="color:#000000;fill:url(#linearGradient6996);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6998);stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"/>
69 <path sodipodi:nodetypes="cccccccccc" id="path6962" d="M 19.5,12.5 L 19.5,28.5 C 19.499945,29.052262 19.052262,29.499945 18.5,29.5 L 13.71875,29.5 L 24,41 L 34.28125,29.5 L 29.53125,29.5 C 28.978988,29.499945 28.531305,29.052262 28.53125,28.5 L 28.53125,12.5 L 19.5,12.5 z " style="color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient7000);stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" transform="translate(0,1)"/>
70 <path transform="translate(0,1)" sodipodi:nodetypes="cscccccscc" id="path6973" d="M 19.0625,28.5 C 19.06368,28.649543 19.004796,28.793303 18.89905,28.89905 C 18.793303,29.004796 18.649543,29.06368 18.5,29.0625 L 12.75,29.0625 L 24,41.65625 L 35.25,29.0625 L 29.53125,29.0625 C 29.381707,29.06368 29.237947,29.004796 29.1322,28.89905 C 29.026454,28.793303 28.96757,28.649543 28.96875,28.5 L 19.0625,28.5 z " style="opacity:0.27238805;color:#000000;fill:url(#linearGradient7002);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"/>
71 </g>
72 </g>
73 </svg> No newline at end of file
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -0,0 +1,26
1 #include "cassinitoolssettingsgui.h"
2 #include "ui_cassinitoolssettingsgui.h"
3
4 CassiniToolsSettingsGUI::CassiniToolsSettingsGUI(QWidget *parent) :
5 QWidget(parent),
6 ui(new Ui::CassiniToolsSettingsGUI)
7 {
8 ui->setupUi(this);
9 }
10
11 CassiniToolsSettingsGUI::~CassiniToolsSettingsGUI()
12 {
13 delete ui;
14 }
15
16 void CassiniToolsSettingsGUI::changeEvent(QEvent *e)
17 {
18 QWidget::changeEvent(e);
19 switch (e->type()) {
20 case QEvent::LanguageChange:
21 ui->retranslateUi(this);
22 break;
23 default:
24 break;
25 }
26 }
@@ -0,0 +1,25
1 #ifndef CASSINITOOLSSETTINGSGUI_H
2 #define CASSINITOOLSSETTINGSGUI_H
3
4 #include <QWidget>
5
6 namespace Ui {
7 class CassiniToolsSettingsGUI;
8 }
9
10 class CassiniToolsSettingsGUI : public QWidget
11 {
12 Q_OBJECT
13
14 public:
15 explicit CassiniToolsSettingsGUI(QWidget *parent = 0);
16 ~CassiniToolsSettingsGUI();
17
18 protected:
19 void changeEvent(QEvent *e);
20
21 private:
22 Ui::CassiniToolsSettingsGUI *ui;
23 };
24
25 #endif // CASSINITOOLSSETTINGSGUI_H
@@ -0,0 +1,21
1 <ui version="4.0">
2 <author/>
3 <comment/>
4 <exportmacro/>
5 <class>CassiniToolsSettingsGUI</class>
6 <widget name="CassiniToolsSettingsGUI" class="QWidget">
7 <property name="geometry">
8 <rect>
9 <x>0</x>
10 <y>0</y>
11 <width>400</width>
12 <height>300</height>
13 </rect>
14 </property>
15 <property name="windowTitle">
16 <string>Form</string>
17 </property>
18 </widget>
19 <pixmapfunction/>
20 <connections/>
21 </ui>
@@ -0,0 +1,61
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
22 #include "filedowloadersettingsgui.h"
23 #include "ui_filedowloadersettingsgui.h"
24
25 FileDowloaderSettingsGUI::FileDowloaderSettingsGUI(QWidget *parent) :
26 QWidget(parent),
27 ui(new Ui::FileDowloaderSettingsGUI)
28 {
29 ui->setupUi(this);
30 this->manualProxyCFG_GUI = new ManualProxyCFG_GUI();
31 lastWidget = NULL;
32 connect(this->ui->comboBox,SIGNAL(currentIndexChanged(QString)),this,SLOT(proxyMethodChanged(QString)));
33 }
34
35 FileDowloaderSettingsGUI::~FileDowloaderSettingsGUI()
36 {
37 delete ui;
38 }
39
40 void FileDowloaderSettingsGUI::changeEvent(QEvent *e)
41 {
42 QWidget::changeEvent(e);
43 switch (e->type()) {
44 case QEvent::LanguageChange:
45 ui->retranslateUi(this);
46 break;
47 default:
48 break;
49 }
50 }
51
52 void FileDowloaderSettingsGUI::proxyMethodChanged(const QString &text)
53 {
54 this->ui->gridLayout->removeWidget(this->lastWidget);
55 if(text=="manual")
56 {
57 this->ui->gridLayout->addWidget(this->manualProxyCFG_GUI,1,0,1,-1);
58 this->lastWidget = this->manualProxyCFG_GUI;
59 return;
60 }
61 }
@@ -0,0 +1,51
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
22 #ifndef FILEDOWLOADERSETTINGSGUI_H
23 #define FILEDOWLOADERSETTINGSGUI_H
24
25 #include <QWidget>
26 #include "manualproxycfg_gui.h"
27
28 namespace Ui {
29 class FileDowloaderSettingsGUI;
30 }
31
32 class FileDowloaderSettingsGUI : public QWidget
33 {
34 Q_OBJECT
35
36 public:
37 explicit FileDowloaderSettingsGUI(QWidget *parent = 0);
38 ~FileDowloaderSettingsGUI();
39
40 protected:
41 void changeEvent(QEvent *e);
42
43 private slots:
44 void proxyMethodChanged(const QString & text);
45 private:
46 ManualProxyCFG_GUI* manualProxyCFG_GUI;
47 Ui::FileDowloaderSettingsGUI *ui;
48 QWidget* lastWidget;
49 };
50
51 #endif // FILEDOWLOADERSETTINGSGUI_H
@@ -0,0 +1,74
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ui version="4.0">
3 <class>FileDowloaderSettingsGUI</class>
4 <widget class="QWidget" name="FileDowloaderSettingsGUI">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>318</width>
10 <height>128</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Form</string>
15 </property>
16 <layout class="QFormLayout" name="formLayout">
17 <item row="0" column="0">
18 <widget class="QLabel" name="label">
19 <property name="text">
20 <string>Default destination path</string>
21 </property>
22 </widget>
23 </item>
24 <item row="0" column="1">
25 <widget class="QLineEdit" name="lineEdit"/>
26 </item>
27 <item row="1" column="0" colspan="2">
28 <widget class="QGroupBox" name="groupBox">
29 <property name="title">
30 <string>Proxy server</string>
31 </property>
32 <layout class="QGridLayout" name="gridLayout">
33 <item row="0" column="0">
34 <widget class="QLabel" name="label_2">
35 <property name="text">
36 <string>Method</string>
37 </property>
38 <property name="alignment">
39 <set>Qt::AlignCenter</set>
40 </property>
41 </widget>
42 </item>
43 <item row="0" column="1">
44 <widget class="QComboBox" name="comboBox">
45 <item>
46 <property name="text">
47 <string>none</string>
48 </property>
49 </item>
50 <item>
51 <property name="text">
52 <string>system</string>
53 </property>
54 </item>
55 <item>
56 <property name="text">
57 <string>manual</string>
58 </property>
59 </item>
60 <item>
61 <property name="text">
62 <string>automatic</string>
63 </property>
64 </item>
65 </widget>
66 </item>
67 </layout>
68 </widget>
69 </item>
70 </layout>
71 </widget>
72 <resources/>
73 <connections/>
74 </ui>
@@ -0,0 +1,47
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
22 #include "manualproxycfg_gui.h"
23 #include "ui_manualproxycfg_gui.h"
24
25 ManualProxyCFG_GUI::ManualProxyCFG_GUI(QWidget *parent) :
26 QWidget(parent),
27 ui(new Ui::ManualProxyCFG_GUI)
28 {
29 ui->setupUi(this);
30 }
31
32 ManualProxyCFG_GUI::~ManualProxyCFG_GUI()
33 {
34 delete ui;
35 }
36
37 void ManualProxyCFG_GUI::changeEvent(QEvent *e)
38 {
39 QWidget::changeEvent(e);
40 switch (e->type()) {
41 case QEvent::LanguageChange:
42 ui->retranslateUi(this);
43 break;
44 default:
45 break;
46 }
47 }
@@ -0,0 +1,46
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
22 #ifndef MANUALPROXYCFG_GUI_H
23 #define MANUALPROXYCFG_GUI_H
24
25 #include <QWidget>
26
27 namespace Ui {
28 class ManualProxyCFG_GUI;
29 }
30
31 class ManualProxyCFG_GUI : public QWidget
32 {
33 Q_OBJECT
34
35 public:
36 explicit ManualProxyCFG_GUI(QWidget *parent = 0);
37 ~ManualProxyCFG_GUI();
38
39 protected:
40 void changeEvent(QEvent *e);
41
42 private:
43 Ui::ManualProxyCFG_GUI *ui;
44 };
45
46 #endif // MANUALPROXYCFG_GUI_H
@@ -0,0 +1,109
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ui version="4.0">
3 <class>ManualProxyCFG_GUI</class>
4 <widget class="QWidget" name="ManualProxyCFG_GUI">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>423</width>
10 <height>207</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Form</string>
15 </property>
16 <layout class="QGridLayout" name="gridLayout">
17 <item row="0" column="0">
18 <widget class="QLabel" name="label">
19 <property name="text">
20 <string>HTTP proxy</string>
21 </property>
22 </widget>
23 </item>
24 <item row="0" column="1">
25 <widget class="QLineEdit" name="httpHost"/>
26 </item>
27 <item row="1" column="0">
28 <widget class="QLabel" name="label_2">
29 <property name="text">
30 <string>HTTPS proxy</string>
31 </property>
32 </widget>
33 </item>
34 <item row="1" column="1">
35 <widget class="QLineEdit" name="httpsHost"/>
36 </item>
37 <item row="2" column="0">
38 <widget class="QLabel" name="label_3">
39 <property name="text">
40 <string>FTP proxy</string>
41 </property>
42 </widget>
43 </item>
44 <item row="2" column="1">
45 <widget class="QLineEdit" name="ftpHost"/>
46 </item>
47 <item row="3" column="0">
48 <widget class="QLabel" name="label_4">
49 <property name="text">
50 <string>SOCKS proxy</string>
51 </property>
52 </widget>
53 </item>
54 <item row="3" column="1">
55 <widget class="QLineEdit" name="socksHost"/>
56 </item>
57 <item row="4" column="0">
58 <widget class="QLabel" name="label_5">
59 <property name="text">
60 <string>Ignore hosts</string>
61 </property>
62 </widget>
63 </item>
64 <item row="0" column="2">
65 <widget class="QLineEdit" name="httpPort">
66 <property name="sizePolicy">
67 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
68 <horstretch>0</horstretch>
69 <verstretch>0</verstretch>
70 </sizepolicy>
71 </property>
72 <property name="inputMask">
73 <string>000000</string>
74 </property>
75 </widget>
76 </item>
77 <item row="1" column="2">
78 <widget class="QLineEdit" name="httpsPort">
79 <property name="inputMask">
80 <string>000000</string>
81 </property>
82 </widget>
83 </item>
84 <item row="2" column="2">
85 <widget class="QLineEdit" name="ftpPort">
86 <property name="inputMask">
87 <string>000000</string>
88 </property>
89 </widget>
90 </item>
91 <item row="3" column="2">
92 <widget class="QLineEdit" name="socksPort">
93 <property name="inputMask">
94 <string>000000</string>
95 </property>
96 </widget>
97 </item>
98 <item row="4" column="1" colspan="2">
99 <widget class="QLineEdit" name="IgnoreHosts">
100 <property name="text">
101 <string>localhost, 127.0.0.0/8, ::1</string>
102 </property>
103 </widget>
104 </item>
105 </layout>
106 </widget>
107 <resources/>
108 <connections/>
109 </ui>
@@ -0,0 +1,70
1 #include "qlopsettingsdialog.h"
2 #include "ui_qlopsettingsdialog.h"
3
4 QLopSettingsDialog::QLopSettingsDialog(QWidget *parent) :
5 QDialog(parent),
6 ui(new Ui::QLopSettingsDialog)
7 {
8 ui->setupUi(this);
9 connect(ui->contentsWidget, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),this, SLOT(changePage(QListWidgetItem*,QListWidgetItem*)));
10 ui->contentsWidget->setViewMode(QListView::IconMode);
11 ui->contentsWidget->setIconSize(QSize(96, 84));
12 ui->contentsWidget->setMovement(QListView::Static);
13 ui->contentsWidget->setSpacing(12);
14 }
15
16 QLopSettingsDialog::~QLopSettingsDialog()
17 {
18 delete ui;
19 }
20
21 void QLopSettingsDialog::changeEvent(QEvent *e)
22 {
23 QDialog::changeEvent(e);
24 switch (e->type()) {
25 case QEvent::LanguageChange:
26 ui->retranslateUi(this);
27 break;
28 default:
29 break;
30 }
31 }
32
33
34 void QLopSettingsDialog::changePage(QListWidgetItem *current, QListWidgetItem *previous)
35 {
36 if (!current)
37 current = previous;
38
39 ui->pagesWidget->setCurrentIndex(ui->contentsWidget->row(current));
40 }
41
42 bool QLopSettingsDialog::registerConfigEntry(QWidget *configEntry, QIcon icon, QString text)
43 {
44 if(configEntry!=NULL)
45 {
46 ui->pagesWidget->addWidget(configEntry);
47 QListWidgetItem *configButton = new QListWidgetItem(ui->contentsWidget);
48 configButton->setIcon(icon);
49 configButton->setText(text);
50 configButton->setTextAlignment(Qt::AlignHCenter);
51 configButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
52 return true;
53 }
54 return false;
55 }
56
57 void QLopSettingsDialog::popConfigDialog(QWidget *selectedConfigEntry)
58 {
59 if(selectedConfigEntry!=NULL)
60 {
61 for(int i=0;i<ui->pagesWidget->count();i++)
62 {
63 if(ui->pagesWidget->widget(i)==selectedConfigEntry)
64 {
65 ui->pagesWidget->setCurrentIndex(i);
66 }
67 }
68 }
69 this->show();
70 }
@@ -0,0 +1,30
1 #ifndef QLOPSETTINGSDIALOG_H
2 #define QLOPSETTINGSDIALOG_H
3
4 #include <QDialog>
5
6 namespace Ui {
7 class QLopSettingsDialog;
8 }
9 #include <QListWidgetItem>
10
11 class QLopSettingsDialog : public QDialog
12 {
13 Q_OBJECT
14
15 public:
16 explicit QLopSettingsDialog(QWidget *parent = 0);
17 ~QLopSettingsDialog();
18
19 public slots:
20 void changePage(QListWidgetItem *current, QListWidgetItem *previous);
21 bool registerConfigEntry(QWidget* configEntry, QIcon icon, QString text);
22 void popConfigDialog(QWidget* selectedConfigEntry=0);
23 protected:
24 void changeEvent(QEvent *e);
25
26 private:
27 Ui::QLopSettingsDialog *ui;
28 };
29
30 #endif // QLOPSETTINGSDIALOG_H
@@ -0,0 +1,102
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ui version="4.0">
3 <class>QLopSettingsDialog</class>
4 <widget class="QDialog" name="QLopSettingsDialog">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>534</width>
10 <height>379</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Dialog</string>
15 </property>
16 <layout class="QGridLayout" name="gridLayout">
17 <item row="0" column="0">
18 <widget class="QListWidget" name="contentsWidget">
19 <property name="sizePolicy">
20 <sizepolicy hsizetype="Maximum" vsizetype="Expanding">
21 <horstretch>0</horstretch>
22 <verstretch>0</verstretch>
23 </sizepolicy>
24 </property>
25 <property name="minimumSize">
26 <size>
27 <width>100</width>
28 <height>0</height>
29 </size>
30 </property>
31 <property name="maximumSize">
32 <size>
33 <width>16777215</width>
34 <height>16777215</height>
35 </size>
36 </property>
37 </widget>
38 </item>
39 <item row="0" column="1">
40 <widget class="QStackedWidget" name="pagesWidget">
41 <property name="sizePolicy">
42 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
43 <horstretch>0</horstretch>
44 <verstretch>0</verstretch>
45 </sizepolicy>
46 </property>
47 <property name="minimumSize">
48 <size>
49 <width>100</width>
50 <height>0</height>
51 </size>
52 </property>
53 </widget>
54 </item>
55 <item row="1" column="0" colspan="2">
56 <widget class="QDialogButtonBox" name="buttonBox">
57 <property name="orientation">
58 <enum>Qt::Horizontal</enum>
59 </property>
60 <property name="standardButtons">
61 <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
62 </property>
63 </widget>
64 </item>
65 </layout>
66 </widget>
67 <resources/>
68 <connections>
69 <connection>
70 <sender>buttonBox</sender>
71 <signal>accepted()</signal>
72 <receiver>QLopSettingsDialog</receiver>
73 <slot>accept()</slot>
74 <hints>
75 <hint type="sourcelabel">
76 <x>227</x>
77 <y>431</y>
78 </hint>
79 <hint type="destinationlabel">
80 <x>157</x>
81 <y>274</y>
82 </hint>
83 </hints>
84 </connection>
85 <connection>
86 <sender>buttonBox</sender>
87 <signal>rejected()</signal>
88 <receiver>QLopSettingsDialog</receiver>
89 <slot>reject()</slot>
90 <hints>
91 <hint type="sourcelabel">
92 <x>295</x>
93 <y>431</y>
94 </hint>
95 <hint type="destinationlabel">
96 <x>286</x>
97 <y>274</y>
98 </hint>
99 </hints>
100 </connection>
101 </connections>
102 </ui>
@@ -0,0 +1,110
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
22 #include "qlopgui.h"
23 QLopGUI* QLopGUI::_self=NULL;
24 QDockWidget* QLopGUI::m_gui=NULL;
25 QMenuBar* QLopGUI::m_mainMenuBar=NULL;
26 QMenu* QLopGUI::m_fileMenu=NULL;
27 QMenu* QLopGUI::m_SettingsMenu=NULL;
28
29 #define INIT() \
30 if(Q_UNLIKELY(_self==NULL))\
31 {\
32 init();\
33 }
34
35 QLopGUI::QLopGUI(bool noGUI,QObject *parent)
36 {
37 m_serviceName="QLopGUI";
38 m_noGui=noGUI;
39 }
40
41 QLopGUI::~QLopGUI()
42 {
43
44 }
45
46 QDockWidget *QLopGUI::getGUI()
47 {
48 return m_gui;
49 }
50
51 void QLopGUI::init(bool noGUI, QObject *parent)
52 {
53 _self=new QLopGUI(noGUI,parent);
54 }
55
56 const QString &QLopGUI::serviceName()
57 {
58 INIT();
59 return m_serviceName;
60 }
61
62 QLopGUI *QLopGUI::self()
63 {
64 INIT();
65 return _self;
66 }
67
68 void QLopGUI::registerMenuBar(QMenuBar *menuBar)
69 {
70 INIT();
71 m_mainMenuBar = menuBar;
72 if(m_mainMenuBar)
73 {
74 m_fileMenu = m_mainMenuBar->addMenu(tr("File"));
75 m_SettingsMenu = m_mainMenuBar->addMenu(tr("Settings"));
76 }
77 }
78
79 QMenu *QLopGUI::addMenu(const QString &title)
80 {
81 INIT();
82 if(m_mainMenuBar)
83 {
84 return m_mainMenuBar->addMenu(title);
85 }
86 return NULL;
87 }
88
89 bool QLopGUI::addFileAction(QAction *action)
90 {
91 INIT();
92 if(m_fileMenu)
93 {
94 m_fileMenu->addAction(action);
95 return true;
96 }
97 return false;
98 }
99
100 bool QLopGUI::addSettingsAction(QAction *action)
101 {
102 INIT();
103 if(m_SettingsMenu)
104 {
105 m_SettingsMenu->addAction(action);
106 return true;
107 }
108 return false;
109 }
110
@@ -0,0 +1,52
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
22 #ifndef QLOPGUI_H
23 #define QLOPGUI_H
24
25 #include <QObject>
26 #include <qlopservice.h>
27 #include <QMenu>
28 #include <QMenuBar>
29 #include <QAction>
30
31 class QLopGUI : public QLopService
32 {
33 Q_OBJECT
34 static QDockWidget* m_gui;
35 QLopGUI(bool noGUI=false,QObject *parent = 0);
36 ~QLopGUI();
37 static QLopGUI* _self;
38 static QMenuBar* m_mainMenuBar;
39 static QMenu* m_fileMenu;
40 static QMenu* m_SettingsMenu;
41 public:
42 QDockWidget* getGUI();
43 static void init(bool noGUI=false,QObject *parent = 0);
44 const QString& serviceName();
45 static QLopGUI* self();
46 static void registerMenuBar(QMenuBar* menuBar);
47 static QMenu* addMenu(const QString & title);
48 static bool addFileAction(QAction * action);
49 static bool addSettingsAction(QAction * action);
50 };
51
52 #endif // QLOPGUI_H
@@ -0,0 +1,98
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
22 #include "qlopsettings.h"
23 #include <QtWidgets>
24 #include <QAction>
25 #include <qlopgui.h>
26
27 QLopSettings* QLopSettings::_self=NULL;
28 QDockWidget* QLopSettings::m_gui=NULL;
29 QSettings* QLopSettings::m_settings=NULL;
30 QLopSettingsDialog* QLopSettings::m_configDialog=NULL;
31
32 #define INIT() \
33 if(Q_UNLIKELY(_self==NULL))\
34 {\
35 init();\
36 }
37
38 QLopSettings::QLopSettings(bool noGUI,QObject *parent) : QLopService(parent)
39 {
40 m_serviceName="QLopSettings";
41 m_settings = new QSettings();
42 m_noGui=noGUI;
43 m_configDialog = new QLopSettingsDialog();
44 QAction* trigerGUI = new QAction(tr("Settings"),this);
45 connect(trigerGUI,SIGNAL(triggered()),this,SLOT(popConfigDialog()));
46 QLopGUI::addSettingsAction(trigerGUI);
47 }
48
49 QLopSettings::~QLopSettings()
50 {
51 delete m_configDialog;
52 delete m_settings;
53 }
54
55 QDockWidget *QLopSettings::getGUI()
56 {
57 if(!m_noGui && (m_gui==NULL))
58 {
59 // m_gui=new QLopDataBaseViewer();
60 // m_gui->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
61 }
62 return m_gui;
63 }
64
65 void QLopSettings::init(bool noGUI, QObject *parent)
66 {
67 _self=new QLopSettings(noGUI,parent);
68 }
69
70 const QString &QLopSettings::serviceName()
71 {
72 INIT();
73 return m_serviceName;
74 }
75
76 QLopSettings *QLopSettings::self()
77 {
78 INIT();
79 return _self;
80 }
81
82 void QLopSettings::popConfigDialog(QWidget *selectedConfigEntry)
83 {
84 INIT();
85 m_configDialog->popConfigDialog(selectedConfigEntry);
86 }
87
88 void QLopSettings::popConfigDialog()
89 {
90 m_configDialog->popConfigDialog(NULL);
91 }
92
93 bool QLopSettings::registerConfigEntry(QWidget *configEntry, QIcon icon, QString text)
94 {
95 INIT();
96 return m_configDialog->registerConfigEntry(configEntry, icon, text);
97 }
98
@@ -0,0 +1,53
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
22 #ifndef QLOPSETTINGS_H
23 #define QLOPSETTINGS_H
24
25 #include <QObject>
26 #include <qlopservice.h>
27 #include <QSettings>
28 #include <QDialog>
29 #include <QIcon>
30 #include <qlopsettingsdialog.h>
31
32
33 class QLopSettings : public QLopService
34 {
35 Q_OBJECT
36 static QDockWidget* m_gui;
37 QLopSettings(bool noGUI=false,QObject *parent = 0);
38 ~QLopSettings();
39 static QLopSettings* _self;
40 static QSettings* m_settings;
41 static QLopSettingsDialog* m_configDialog;
42 public:
43 QDockWidget* getGUI();
44 static void init(bool noGUI=false,QObject *parent = 0);
45 const QString& serviceName();
46 static QLopSettings* self();
47 static void popConfigDialog(QWidget* selectedConfigEntry);
48 static bool registerConfigEntry(QWidget* configEntry,QIcon icon, QString text);
49 public slots:
50 void popConfigDialog();
51 };
52
53 #endif // QLOPSETTINGS_H
@@ -25,10 +25,15 INCLUDEPATH += src/QCustomPlot \
25 src/Core src/Core/Widgets \
25 src/Core src/Core/Widgets \
26 src/Core/Widgets/PyWdgt
26 src/Core/Widgets/PyWdgt
27
27
28 QMAKE_CXXFLAGS += -O5 -fopenmp
28 defined(QLOP_DEBUG,var){
29 QMAKE_LFLAGS += -O5 -fopenmp
29 QMAKE_CXXFLAGS += -O0 -fopenmp
30 #QMAKE_CXXFLAGS += -O0 -fopenmp
30 QMAKE_LFLAGS += -O0 -fopenmp
31 #QMAKE_LFLAGS += -O0 -fopenmp
31 }
32 !defined(QLOP_DEBUG,var){
33 QMAKE_CXXFLAGS += -O5 -fopenmp
34 QMAKE_LFLAGS += -O5 -fopenmp
35 }
36
32
37
33 SOURCES += src/main.cpp\
38 SOURCES += src/main.cpp\
34 src/mainwindow.cpp \
39 src/mainwindow.cpp \
@@ -59,7 +64,13 SOURCES += src/main.cpp\
59 src/Core/qlopdatabase.cpp \
64 src/Core/qlopdatabase.cpp \
60 src/Core/Widgets/qlopdatabaseviewer.cpp \
65 src/Core/Widgets/qlopdatabaseviewer.cpp \
61 src/Core/Widgets/qlopdatabaseviewermodel.cpp \
66 src/Core/Widgets/qlopdatabaseviewermodel.cpp \
62 src/Cassini/exptimetabledownloader.cpp
67 src/Cassini/exptimetabledownloader.cpp \
68 src/Core/qlopsettings.cpp \
69 src/Core/Widgets/filedowloadersettingsgui.cpp \
70 src/Core/qlopgui.cpp \
71 src/Core/Widgets/manualproxycfg_gui.cpp \
72 src/Core/Widgets/qlopsettingsdialog.cpp \
73 src/Cassini/cassinitoolssettingsgui.cpp
63
74
64 HEADERS += src/mainwindow.h \
75 HEADERS += src/mainwindow.h \
65 src/SocExplorerPlot.h \
76 src/SocExplorerPlot.h \
@@ -91,7 +102,13 HEADERS += src/mainwindow.h \
91 src/Core/qlopdatabase.h \
102 src/Core/qlopdatabase.h \
92 src/Core/Widgets/qlopdatabaseviewer.h \
103 src/Core/Widgets/qlopdatabaseviewer.h \
93 src/Core/Widgets/qlopdatabaseviewermodel.h \
104 src/Core/Widgets/qlopdatabaseviewermodel.h \
94 src/Cassini/exptimetabledownloader.h
105 src/Cassini/exptimetabledownloader.h \
106 src/Core/qlopsettings.h \
107 src/Core/Widgets/filedowloadersettingsgui.h \
108 src/Core/qlopgui.h \
109 src/Core/Widgets/manualproxycfg_gui.h \
110 src/Core/Widgets/qlopsettingsdialog.h \
111 src/Cassini/cassinitoolssettingsgui.h
95
112
96 FORMS += src/mainwindow.ui \
113 FORMS += src/mainwindow.ui \
97 src/Core/Widgets/downloadhistory.ui \
114 src/Core/Widgets/downloadhistory.ui \
@@ -100,7 +117,11 FORMS += src/mainwindow.ui \
100 src/Cassini/cassiniindexfileviewer.ui \
117 src/Cassini/cassiniindexfileviewer.ui \
101 src/Cassini/cassinitoolsgui.ui \
118 src/Cassini/cassinitoolsgui.ui \
102 src/Core/Widgets/filebrowser.ui \
119 src/Core/Widgets/filebrowser.ui \
103 src/Core/Widgets/qlopdatabaseviewer.ui
120 src/Core/Widgets/qlopdatabaseviewer.ui \
121 src/Core/Widgets/filedowloadersettingsgui.ui \
122 src/Core/Widgets/manualproxycfg_gui.ui \
123 src/Core/Widgets/qlopsettingsdialog.ui \
124 src/Cassini/cassinitoolssettingsgui.ui
104
125
105 RESOURCES += \
126 RESOURCES += \
106 resources/qlop.qrc
127 resources/qlop.qrc
@@ -6,6 +6,8
6 <file>TreeView.svg</file>
6 <file>TreeView.svg</file>
7 <file>Gnome-go-up.svg</file>
7 <file>Gnome-go-up.svg</file>
8 <file>QLop.svg</file>
8 <file>QLop.svg</file>
9 <file>Gnome-emblem-downloads.svg</file>
10 <file>cassini.gif</file>
9 </qresource>
11 </qresource>
10 <qresource prefix="/">
12 <qresource prefix="/">
11 <file>QLop.png</file>
13 <file>QLop.png</file>
@@ -55,7 +55,7
55 </widget>
55 </widget>
56 </item>
56 </item>
57 <item row="2" column="0">
57 <item row="2" column="0">
58 <widget class="QGroupBox" name="groupBox">
58 <widget class="QGroupBox" name="DownLoadList">
59 <property name="styleSheet">
59 <property name="styleSheet">
60 <string notr="true">QGroupBox {
60 <string notr="true">QGroupBox {
61 border: 1px solid gray;
61 border: 1px solid gray;
@@ -27,10 +27,12
27 #include <fftw3.h>
27 #include <fftw3.h>
28 #include <omp.h>
28 #include <omp.h>
29 #include <qlopdatabase.h>
29 #include <qlopdatabase.h>
30 #include <qlopsettings.h>
30
31
31 CassiniTools* CassiniTools::_self=NULL;
32 CassiniTools* CassiniTools::_self=NULL;
32 QDockWidget* CassiniTools::m_gui=NULL;
33 QDockWidget* CassiniTools::m_gui=NULL;
33 CassiniToolsGUI* CassiniTools::m_CassiniToolsGUI=NULL;
34 CassiniToolsGUI* CassiniTools::m_CassiniToolsGUI=NULL;
35 CassiniToolsSettingsGUI* CassiniTools::m_SettingsGui=NULL;
34 CassiniDataFile* CassiniTools::m_dataFile=NULL;
36 CassiniDataFile* CassiniTools::m_dataFile=NULL;
35 int CassiniTools::m_defaultPlot=-1;
37 int CassiniTools::m_defaultPlot=-1;
36 int CassiniTools::m_fftPlot=-1;
38 int CassiniTools::m_fftPlot=-1;
@@ -286,6 +288,8 QDockWidget *CassiniTools::getGUI()
286 m_CassiniToolsGUI = new CassiniToolsGUI();
288 m_CassiniToolsGUI = new CassiniToolsGUI();
287 m_gui->setWidget(m_CassiniToolsGUI);
289 m_gui->setWidget(m_CassiniToolsGUI);
288 m_gui->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
290 m_gui->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
291 m_SettingsGui = new CassiniToolsSettingsGUI();
292 QLopSettings::registerConfigEntry(this->m_SettingsGui,QIcon(":/img/cassini.gif"),"Cassini Tools");
289 }
293 }
290 return m_gui;
294 return m_gui;
291 }
295 }
@@ -29,6 +29,7
29 #include <cassinidatafile.h>
29 #include <cassinidatafile.h>
30 #include <qlopdata.h>
30 #include <qlopdata.h>
31 #include <SocExplorerPlot.h>
31 #include <SocExplorerPlot.h>
32 #include <cassinitoolssettingsgui.h>
32
33
33 class CassiniTools: public QLopService
34 class CassiniTools: public QLopService
34 {
35 {
@@ -37,6 +38,7 private:
37 static CassiniTools* _self;
38 static CassiniTools* _self;
38 static QDockWidget* m_gui;
39 static QDockWidget* m_gui;
39 static CassiniToolsGUI* m_CassiniToolsGUI;
40 static CassiniToolsGUI* m_CassiniToolsGUI;
41 static CassiniToolsSettingsGUI* m_SettingsGui;
40 static CassiniDataFile* m_dataFile;
42 static CassiniDataFile* m_dataFile;
41 static int m_defaultPlot,m_fftPlot;
43 static int m_defaultPlot,m_fftPlot;
42 static SocExplorerPlotActions* ExportAction;
44 static SocExplorerPlotActions* ExportAction;
@@ -1,3 +1,24
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #include "qlopdatabaseviewer.h"
22 #include "qlopdatabaseviewer.h"
2 #include "ui_qlopdatabaseviewer.h"
23 #include "ui_qlopdatabaseviewer.h"
3
24
@@ -1,3 +1,24
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #ifndef QLOPDATABASEVIEWER_H
22 #ifndef QLOPDATABASEVIEWER_H
2 #define QLOPDATABASEVIEWER_H
23 #define QLOPDATABASEVIEWER_H
3
24
@@ -11,7 +11,7
11 </rect>
11 </rect>
12 </property>
12 </property>
13 <property name="windowTitle">
13 <property name="windowTitle">
14 <string>DockWidget</string>
14 <string>Database Explorer</string>
15 </property>
15 </property>
16 <widget class="QWidget" name="dockWidgetContents">
16 <widget class="QWidget" name="dockWidgetContents">
17 <layout class="QGridLayout" name="gridLayout">
17 <layout class="QGridLayout" name="gridLayout">
@@ -1,3 +1,24
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #include "qlopdatabaseviewermodel.h"
22 #include "qlopdatabaseviewermodel.h"
2
23
3 QLopDataBaseViewerModel::QLopDataBaseViewerModel(QObject *parent)
24 QLopDataBaseViewerModel::QLopDataBaseViewerModel(QObject *parent)
@@ -1,3 +1,24
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #ifndef QLOPDATABASEVIEWERMODEL_H
22 #ifndef QLOPDATABASEVIEWERMODEL_H
2 #define QLOPDATABASEVIEWERMODEL_H
23 #define QLOPDATABASEVIEWERMODEL_H
3
24
@@ -22,11 +22,14
22
22
23 #include "filedownloader.h"
23 #include "filedownloader.h"
24 #include <QFile>
24 #include <QFile>
25 #include <QIcon>
26
25 FileDownloader* FileDownloader::_self=NULL;
27 FileDownloader* FileDownloader::_self=NULL;
26 QNetworkAccessManager* FileDownloader::m_WebCtrl=NULL;
28 QNetworkAccessManager* FileDownloader::m_WebCtrl=NULL;
27 QList<FileDownloaderTask*>* FileDownloader::m_pendingTasks=NULL;
29 QList<FileDownloaderTask*>* FileDownloader::m_pendingTasks=NULL;
28 QDockWidget* FileDownloader::m_gui=NULL;
30 QDockWidget* FileDownloader::m_gui=NULL;
29 DownLoadHistory* FileDownloader::m_DownLoadHistory=NULL;
31 DownLoadHistory* FileDownloader::m_DownLoadHistory=NULL;
32 FileDowloaderSettingsGUI* FileDownloader::m_SettingsGui=NULL;
30
33
31 #define _INIT \
34 #define _INIT \
32 if(Q_UNLIKELY(_self==NULL))\
35 if(Q_UNLIKELY(_self==NULL))\
@@ -78,6 +81,8 QDockWidget *FileDownloader::getGUI()
78 m_gui=new QDockWidget("Download History");
81 m_gui=new QDockWidget("Download History");
79 m_gui->setWidget(m_DownLoadHistory);
82 m_gui->setWidget(m_DownLoadHistory);
80 m_gui->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
83 m_gui->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
84 m_SettingsGui = new FileDowloaderSettingsGUI();
85 QLopSettings::registerConfigEntry(this->m_SettingsGui,QIcon(":/img/Gnome-emblem-downloads.svg"),"Qlop Downloader");
81 }
86 }
82 return (QDockWidget*) m_gui;
87 return (QDockWidget*) m_gui;
83 }
88 }
@@ -135,6 +140,11 int FileDownloader::getTaskId()
135 return -1;
140 return -1;
136 }
141 }
137
142
143 void FileDownloader::proxyConfig()
144 {
145
146 }
147
138 void FileDownloader::init(bool noGUI, QObject *parent)
148 void FileDownloader::init(bool noGUI, QObject *parent)
139 {
149 {
140 if(Q_UNLIKELY(_self==NULL))
150 if(Q_UNLIKELY(_self==NULL))
@@ -142,13 +152,22 void FileDownloader::init(bool noGUI, QO
142 _self=new FileDownloader(noGUI,parent);
152 _self=new FileDownloader(noGUI,parent);
143 }
153 }
144 }
154 }
145
155 /*for gnome:
156 *
157 * gsettings list-recursively org.gnome.system.proxy
158 * gsettings get org.gnome.system.proxy.http host
159 *
160 * To detect desktop $XDG_CURRENT_DESKTOP
161 */
146 FileDownloader::FileDownloader(bool noGUI,QObject *parent) : QLopService(parent)
162 FileDownloader::FileDownloader(bool noGUI,QObject *parent) : QLopService(parent)
147 {
163 {
148 QNetworkProxyQuery q(QUrl("http://www.google.com"));
164 QNetworkProxyQuery q(QUrl(QLatin1String("http://www.google.com")));
149 q.setQueryType(QNetworkProxyQuery::UrlRequest);
165 //q.setQueryType(QNetworkProxyQuery::UrlRequest);
150 q.setProtocolTag("http");
166 //q.setProtocolTag("http");
151 QList<QNetworkProxy> proxies = QNetworkProxyFactory::systemProxyForQuery(q);
167 QList<QNetworkProxy> proxies = QNetworkProxyFactory::systemProxyForQuery(q);
168 foreach ( QNetworkProxy loopItem, proxies ) {
169 qDebug() << "proxyUsed:" << loopItem.hostName();
170 }
152 if( proxies.size() > 0 && proxies[0].type() != QNetworkProxy::NoProxy )
171 if( proxies.size() > 0 && proxies[0].type() != QNetworkProxy::NoProxy )
153 QNetworkProxy::setApplicationProxy(proxies[0]);
172 QNetworkProxy::setApplicationProxy(proxies[0]);
154 else
173 else
@@ -157,7 +176,6 FileDownloader::FileDownloader(bool noGU
157 m_pendingTasks = new QList<FileDownloaderTask*>();
176 m_pendingTasks = new QList<FileDownloaderTask*>();
158 m_noGui=noGUI;
177 m_noGui=noGUI;
159 m_serviceName="FileDownloader";
178 m_serviceName="FileDownloader";
160
161 }
179 }
162
180
163 FileDownloader::~FileDownloader()
181 FileDownloader::~FileDownloader()
@@ -33,6 +33,8
33 #include <downloadhistory.h>
33 #include <downloadhistory.h>
34 #include <qlopservice.h>
34 #include <qlopservice.h>
35 #include <QDockWidget>
35 #include <QDockWidget>
36 #include <filedowloadersettingsgui.h>
37 #include <qlopsettings.h>
36
38
37 class FileDownloader : public QLopService
39 class FileDownloader : public QLopService
38 {
40 {
@@ -43,6 +45,7 private:
43 static QList<FileDownloaderTask*>* m_pendingTasks;
45 static QList<FileDownloaderTask*>* m_pendingTasks;
44 static DownLoadHistory* m_DownLoadHistory;
46 static DownLoadHistory* m_DownLoadHistory;
45 static QDockWidget* m_gui;
47 static QDockWidget* m_gui;
48 static FileDowloaderSettingsGUI* m_SettingsGui;
46 FileDownloader(bool noGUI=false,QObject *parent = 0);
49 FileDownloader(bool noGUI=false,QObject *parent = 0);
47 ~FileDownloader();
50 ~FileDownloader();
48
51
@@ -63,6 +66,7 public slots:
63 int download_file(QString fileUrl,const QString& name);
66 int download_file(QString fileUrl,const QString& name);
64 private:
67 private:
65 int getTaskId();
68 int getTaskId();
69 void proxyConfig();
66 };
70 };
67
71
68 #endif // FILEDOWNLOADER_H
72 #endif // FILEDOWNLOADER_H
@@ -1,3 +1,24
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #include "qlopdatabase.h"
22 #include "qlopdatabase.h"
2 #include <qlopdatabaseviewer.h>
23 #include <qlopdatabaseviewer.h>
3
24
@@ -35,7 +56,7 QDockWidget *QLopDataBase::getGUI()
35
56
36 void QLopDataBase::init(bool noGUI, QObject *parent)
57 void QLopDataBase::init(bool noGUI, QObject *parent)
37 {
58 {
38 _self=new QLopDataBase();
59 _self=new QLopDataBase(noGUI,parent);
39 }
60 }
40
61
41 const QString &QLopDataBase::serviceName()
62 const QString &QLopDataBase::serviceName()
@@ -1,3 +1,24
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #ifndef QLOPDATABASE_H
22 #ifndef QLOPDATABASE_H
2 #define QLOPDATABASE_H
23 #define QLOPDATABASE_H
3
24
@@ -45,6 +45,9 int main(int argc, char *argv[])
45 }
45 }
46 qRegisterMetaType<QListOfDataVector>("QListOfDataVector");
46 qRegisterMetaType<QListOfDataVector>("QListOfDataVector");
47 qRegisterMetaType<QLopDataList>("QLopDataList");
47 qRegisterMetaType<QLopDataList>("QLopDataList");
48 QApplication::setOrganizationName("LPP");
49 QApplication::setOrganizationDomain("lpp.fr");
50 QApplication::setApplicationName("QLop");
48 MainWindow w(OMP_THREADS);
51 MainWindow w(OMP_THREADS);
49 w.show();
52 w.show();
50
53
@@ -33,6 +33,9
33 #include <cassinitools.h>
33 #include <cassinitools.h>
34 #include <qlopplots.h>
34 #include <qlopplots.h>
35 #include <qlopdatabase.h>
35 #include <qlopdatabase.h>
36 #include <qlopsettings.h>
37 #include <qlopgui.h>
38
36
39
37 const QList<QLopService*>ServicesToLoad=QList<QLopService*>()
40 const QList<QLopService*>ServicesToLoad=QList<QLopService*>()
38 <<QLopDataBase::self()
41 <<QLopDataBase::self()
@@ -46,10 +49,8 MainWindow::MainWindow(int OMP_THREADS,
46 {
49 {
47 this->OMP_THREADS = OMP_THREADS;
50 this->OMP_THREADS = OMP_THREADS;
48 ui->setupUi(this);
51 ui->setupUi(this);
52 QLopGUI::registerMenuBar(menuBar());
49 this->setWindowIcon(QIcon(":img/QLop.svg"));
53 this->setWindowIcon(QIcon(":img/QLop.svg"));
50
51 // QLopPlots::getPlot()->setXaxisTickLabelType(QCPAxis::ltDateTime);
52 // QLopPlots::getPlot()->setXaxisDateTimeFormat("hh:mm:ss.zzz");
53 this->progressWidget = new QWidget();
54 this->progressWidget = new QWidget();
54 this->progressLayout = new QVBoxLayout(this->progressWidget);
55 this->progressLayout = new QVBoxLayout(this->progressWidget);
55 this->progressWidget->setLayout(this->progressLayout);
56 this->progressWidget->setLayout(this->progressLayout);
@@ -80,19 +81,6 MainWindow::~MainWindow()
80 delete ui;
81 delete ui;
81 }
82 }
82
83
83 //QString MainWindow::getFilePath(const QString &name)
84 //{
85 //// for(int i=0;i<this->folderViews.count();i++)
86 //// {
87 //// if(folderViews.at(i)->isDraging(name))
88 //// return folderViews.at(i)->currentFolder();
89 //// }
90 // return "";
91 //}
92
93
94
95
96 void MainWindow::updateProgress(int threadId, int percentProgress)
84 void MainWindow::updateProgress(int threadId, int percentProgress)
97 {
85 {
98 bool updated=false;
86 bool updated=false;
@@ -122,19 +110,6 void MainWindow::updateProgress(int thre
122 }
110 }
123
111
124
112
125 void MainWindow::askGlobalRescan()
126 {
127 // for(int i=0;i<this->folderViews.count();i++)
128 // {
129 // this->folderViews.at(i)->refreshFolder();
130 // }
131 }
132
133 void MainWindow::showThemisIndexViewer()
134 {
135
136 }
137
138 void MainWindow::changeEvent(QEvent *e)
113 void MainWindow::changeEvent(QEvent *e)
139 {
114 {
140 QMainWindow::changeEvent(e);
115 QMainWindow::changeEvent(e);
@@ -34,6 +34,7
34 #include "cassiniindexfileviewer.h"
34 #include "cassiniindexfileviewer.h"
35 #include <downloadhistory.h>
35 #include <downloadhistory.h>
36 #include <qlopservice.h>
36 #include <qlopservice.h>
37 #include <qlopgui.h>
37
38
38 namespace Ui {
39 namespace Ui {
39 class MainWindow;
40 class MainWindow;
@@ -46,11 +47,9 class MainWindow : public QMainWindow
46 public:
47 public:
47 explicit MainWindow(int OMP_THREADS,QWidget *parent = 0);
48 explicit MainWindow(int OMP_THREADS,QWidget *parent = 0);
48 ~MainWindow();
49 ~MainWindow();
49 QString getFilePath(const QString& name);
50 public slots:
50 public slots:
51 void updateProgress(int threadId,int percentProgress);
51 void updateProgress(int threadId,int percentProgress);
52 void askGlobalRescan();
52
53 void showThemisIndexViewer();
54 protected:
53 protected:
55 void changeEvent(QEvent *e);
54 void changeEvent(QEvent *e);
56
55
@@ -42,19 +42,6
42 <height>27</height>
42 <height>27</height>
43 </rect>
43 </rect>
44 </property>
44 </property>
45 <widget class="QMenu" name="menuTools">
46 <property name="title">
47 <string>tools</string>
48 </property>
49 <widget class="QMenu" name="menuThemis">
50 <property name="title">
51 <string>Themis</string>
52 </property>
53 <addaction name="actionIndex_Viewer"/>
54 </widget>
55 <addaction name="menuThemis"/>
56 </widget>
57 <addaction name="menuTools"/>
58 </widget>
45 </widget>
59 <widget class="QStatusBar" name="statusBar"/>
46 <widget class="QStatusBar" name="statusBar"/>
60 <action name="actionIndex_Viewer">
47 <action name="actionIndex_Viewer">
General Comments 0
You need to be logged in to leave comments. Login now