Auto status change to "Under Review"
@@ -0,0 +1,27 | |||
|
1 | #ifndef SCIQLOP_SQPSIDEPANE_H | |
|
2 | #define SCIQLOP_SQPSIDEPANE_H | |
|
3 | ||
|
4 | #include <QWidget> | |
|
5 | ||
|
6 | namespace Ui { | |
|
7 | class SqpSidePane; | |
|
8 | } // Ui | |
|
9 | ||
|
10 | class QToolBar; | |
|
11 | ||
|
12 | class SqpSidePane : public QWidget { | |
|
13 | Q_OBJECT | |
|
14 | ||
|
15 | public: | |
|
16 | explicit SqpSidePane(QWidget *parent = 0); | |
|
17 | virtual ~SqpSidePane(); | |
|
18 | ||
|
19 | QToolBar *sidePane(); | |
|
20 | ||
|
21 | private: | |
|
22 | Ui::SqpSidePane *ui; | |
|
23 | ||
|
24 | QToolBar *m_SidePaneToolbar; | |
|
25 | }; | |
|
26 | ||
|
27 | #endif // SCIQLOP_ SQPSIDEPANE_H |
@@ -0,0 +1,47 | |||
|
1 | #include "sidepane/SqpSidePane.h" | |
|
2 | #include "ui_SqpSidePane.h" | |
|
3 | ||
|
4 | #include <QAction> | |
|
5 | #include <QLayout> | |
|
6 | #include <QToolBar> | |
|
7 | ||
|
8 | namespace { | |
|
9 | static const QString SQPSIDEPANESTYLESHEET | |
|
10 | = "QToolBar {" | |
|
11 | " background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0," | |
|
12 | " stop: 0.0 #5a5a5a," | |
|
13 | " stop: 1.0 #414141);" | |
|
14 | " border: none;" | |
|
15 | " border-left: 1px solid #424242;" | |
|
16 | "border-right: 1px solid #393939;" | |
|
17 | " }" | |
|
18 | ||
|
19 | " QToolButton {" | |
|
20 | "background: none;" | |
|
21 | "border: none;" | |
|
22 | " }"; | |
|
23 | } | |
|
24 | ||
|
25 | SqpSidePane::SqpSidePane(QWidget *parent) : QWidget(parent), ui(new Ui::SqpSidePane) | |
|
26 | { | |
|
27 | QVBoxLayout *sidePaneLayout = new QVBoxLayout(this); | |
|
28 | sidePaneLayout->setContentsMargins(0, 0, 0, 0); | |
|
29 | this->setLayout(sidePaneLayout); | |
|
30 | ||
|
31 | ui->setupUi(this); | |
|
32 | m_SidePaneToolbar = new QToolBar(this); | |
|
33 | m_SidePaneToolbar->setOrientation(Qt::Vertical); | |
|
34 | sidePaneLayout->addWidget(m_SidePaneToolbar); | |
|
35 | ||
|
36 | m_SidePaneToolbar->setStyleSheet(SQPSIDEPANESTYLESHEET); | |
|
37 | } | |
|
38 | ||
|
39 | SqpSidePane::~SqpSidePane() | |
|
40 | { | |
|
41 | delete ui; | |
|
42 | } | |
|
43 | ||
|
44 | QToolBar *SqpSidePane::sidePane() | |
|
45 | { | |
|
46 | return m_SidePaneToolbar; | |
|
47 | } |
@@ -0,0 +1,21 | |||
|
1 | <ui version="4.0"> | |
|
2 | <author/> | |
|
3 | <comment/> | |
|
4 | <exportmacro/> | |
|
5 | <class>SqpSidePane</class> | |
|
6 | <widget name="SqpSidePane" 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> |
@@ -1,112 +1,118 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the SciQLop Software |
|
3 | 3 | -- Copyright (C) 2017, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@member.fsf.org |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "MainWindow.h" |
|
23 | 23 | #include "ui_MainWindow.h" |
|
24 | 24 | #include <QAction> |
|
25 | 25 | #include <QDate> |
|
26 | 26 | #include <QDateTime> |
|
27 | 27 | #include <QDir> |
|
28 | 28 | #include <QFileDialog> |
|
29 | 29 | //#include <omp.h> |
|
30 | 30 | //#include <network/filedownloader.h> |
|
31 | 31 | //#include <qlopdatabase.h> |
|
32 | 32 | //#include <qlopsettings.h> |
|
33 | 33 | //#include <qlopgui.h> |
|
34 | 34 | //#include <spacedata.h> |
|
35 | 35 | //#include "qlopcore.h" |
|
36 | 36 | //#include "qlopcodecmanager.h" |
|
37 | 37 | //#include "cdfcodec.h" |
|
38 | 38 | //#include "amdatxtcodec.h" |
|
39 | 39 | //#include <qlopplotmanager.h> |
|
40 | 40 | #include <QAction> |
|
41 | 41 | #include <QToolBar> |
|
42 | 42 | #include <memory.h> |
|
43 | 43 | MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), m_Ui(new Ui::MainWindow) |
|
44 | 44 | { |
|
45 | 45 | m_Ui->setupUi(this); |
|
46 | 46 | |
|
47 | QToolBar *actionToolbar = new QToolBar(this); | |
|
48 | actionToolbar->setOrientation(Qt::Vertical); | |
|
49 |
|
|
|
50 |
|
|
|
51 | actionToolbar->addAction("ACTION 3"); | |
|
52 | m_Ui->leftInspectorSidePane->layout()->addWidget(actionToolbar); | |
|
47 | auto leftSidePane = m_Ui->leftInspectorSidePane->sidePane(); | |
|
48 | leftSidePane->addAction("ACTION L1"); | |
|
49 | leftSidePane->addAction("ACTION L2"); | |
|
50 | leftSidePane->addAction("ACTION L3"); | |
|
53 | 51 | |
|
52 | auto rightSidePane = m_Ui->rightInspectorSidePane->sidePane(); | |
|
53 | rightSidePane->addAction("ACTION R1"); | |
|
54 | rightSidePane->addAction("ACTION R2"); | |
|
55 | rightSidePane->addAction("ACTION R3"); | |
|
56 | ||
|
57 | this->menuBar()->addAction("File"); | |
|
58 | auto mainToolBar = this->addToolBar("MainToolBar"); | |
|
59 | mainToolBar->addAction("A1"); | |
|
54 | 60 | /* QLopGUI::registerMenuBar(menuBar()); |
|
55 | 61 | this->setWindowIcon(QIcon(":/sciqlopLOGO.svg")); |
|
56 | 62 | this->m_progressWidget = new QWidget(); |
|
57 | 63 | this->m_progressLayout = new QVBoxLayout(this->m_progressWidget); |
|
58 | 64 | this->m_progressWidget->setLayout(this->m_progressLayout); |
|
59 | 65 | this->m_progressWidget->setWindowModality(Qt::WindowModal); |
|
60 | 66 | m_progressThreadIds = (int*) malloc(OMP_THREADS*sizeof(int)); |
|
61 | 67 | for(int i=0;i<OMP_THREADS;i++) |
|
62 | 68 | { |
|
63 | 69 | this->m_progress.append(new QProgressBar(this->m_progressWidget)); |
|
64 | 70 | this->m_progress.last()->setMinimum(0); |
|
65 | 71 | this->m_progress.last()->setMaximum(100); |
|
66 | 72 | this->m_progressLayout->addWidget(this->m_progress.last()); |
|
67 | 73 | this->m_progressWidget->hide(); |
|
68 | 74 | this->m_progressThreadIds[i] = -1; |
|
69 | 75 | } |
|
70 | 76 | this->m_progressWidget->setWindowTitle("Loading File"); |
|
71 | 77 | const QList<QLopService*>ServicesToLoad=QList<QLopService*>() |
|
72 | 78 | << QLopCore::self() |
|
73 | 79 | << QLopPlotManager::self() |
|
74 | 80 | << QLopCodecManager::self() |
|
75 | 81 | << FileDownloader::self() |
|
76 | 82 | << QLopDataBase::self() |
|
77 | 83 | << SpaceData::self(); |
|
78 | 84 | |
|
79 | 85 | CDFCodec::registerToManager(); |
|
80 | 86 | AMDATXTCodec::registerToManager(); |
|
81 | 87 | |
|
82 | 88 | |
|
83 | 89 | for(int i=0;i<ServicesToLoad.count();i++) |
|
84 | 90 | { |
|
85 | 91 | qDebug()<<ServicesToLoad.at(i)->serviceName(); |
|
86 | 92 | ServicesToLoad.at(i)->initialize(); //must be called before getGUI |
|
87 | 93 | QDockWidget* wdgt=ServicesToLoad.at(i)->getGUI(); |
|
88 | 94 | if(wdgt) |
|
89 | 95 | { |
|
90 | 96 | wdgt->setAllowedAreas(Qt::AllDockWidgetAreas); |
|
91 | 97 | this->addDockWidget(Qt::TopDockWidgetArea,wdgt); |
|
92 | 98 | } |
|
93 | 99 | PythonQt::self()->getMainModule().addObject(ServicesToLoad.at(i)->serviceName(),(QObject*)ServicesToLoad.at(i)); |
|
94 | 100 | }*/ |
|
95 | 101 | } |
|
96 | 102 | |
|
97 | 103 | MainWindow::~MainWindow() |
|
98 | 104 | { |
|
99 | 105 | } |
|
100 | 106 | |
|
101 | 107 | |
|
102 | 108 | void MainWindow::changeEvent(QEvent *e) |
|
103 | 109 | { |
|
104 | 110 | QMainWindow::changeEvent(e); |
|
105 | 111 | switch (e->type()) { |
|
106 | 112 | case QEvent::LanguageChange: |
|
107 | 113 | m_Ui->retranslateUi(this); |
|
108 | 114 | break; |
|
109 | 115 | default: |
|
110 | 116 | break; |
|
111 | 117 | } |
|
112 | 118 | } |
@@ -1,90 +1,208 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <ui version="4.0"> |
|
3 | 3 | <class>MainWindow</class> |
|
4 | 4 | <widget class="QMainWindow" name="MainWindow"> |
|
5 | 5 | <property name="geometry"> |
|
6 | 6 | <rect> |
|
7 | 7 | <x>0</x> |
|
8 | 8 | <y>0</y> |
|
9 | 9 | <width>800</width> |
|
10 | 10 | <height>600</height> |
|
11 | 11 | </rect> |
|
12 | 12 | </property> |
|
13 | 13 | <property name="windowTitle"> |
|
14 | 14 | <string>QLop</string> |
|
15 | 15 | </property> |
|
16 | 16 | <property name="dockNestingEnabled"> |
|
17 | 17 | <bool>true</bool> |
|
18 | 18 | </property> |
|
19 | 19 | <widget class="QWidget" name="centralWidget"> |
|
20 | 20 | <property name="enabled"> |
|
21 | 21 | <bool>true</bool> |
|
22 | 22 | </property> |
|
23 | 23 | <property name="sizePolicy"> |
|
24 | 24 | <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> |
|
25 | 25 | <horstretch>0</horstretch> |
|
26 | 26 | <verstretch>0</verstretch> |
|
27 | 27 | </sizepolicy> |
|
28 | 28 | </property> |
|
29 | 29 | <property name="maximumSize"> |
|
30 | 30 | <size> |
|
31 | 31 | <width>16777215</width> |
|
32 | 32 | <height>16777215</height> |
|
33 | 33 | </size> |
|
34 | 34 | </property> |
|
35 | 35 | <layout class="QHBoxLayout" name="horizontalLayout"> |
|
36 | <property name="spacing"> | |
|
37 | <number>3</number> | |
|
38 | </property> | |
|
39 | <property name="leftMargin"> | |
|
40 | <number>0</number> | |
|
41 | </property> | |
|
42 | <property name="topMargin"> | |
|
43 | <number>0</number> | |
|
44 | </property> | |
|
45 | <property name="rightMargin"> | |
|
46 | <number>0</number> | |
|
47 | </property> | |
|
48 | <property name="bottomMargin"> | |
|
49 | <number>0</number> | |
|
50 | </property> | |
|
36 | 51 | <item> |
|
37 | 52 | <widget class="QWidget" name="leftInspectorWidget" native="true"> |
|
38 | 53 | <layout class="QHBoxLayout" name="horizontalLayout_2"> |
|
54 | <property name="spacing"> | |
|
55 | <number>3</number> | |
|
56 | </property> | |
|
57 | <property name="leftMargin"> | |
|
58 | <number>0</number> | |
|
59 | </property> | |
|
60 | <property name="topMargin"> | |
|
61 | <number>0</number> | |
|
62 | </property> | |
|
63 | <property name="rightMargin"> | |
|
64 | <number>0</number> | |
|
65 | </property> | |
|
66 | <property name="bottomMargin"> | |
|
67 | <number>0</number> | |
|
68 | </property> | |
|
39 | 69 | <item> |
|
40 | 70 | <widget class="QWidget" name="widget" native="true"> |
|
41 | 71 | <layout class="QVBoxLayout" name="verticalLayout"> |
|
72 | <property name="spacing"> | |
|
73 | <number>3</number> | |
|
74 | </property> | |
|
75 | <property name="leftMargin"> | |
|
76 | <number>0</number> | |
|
77 | </property> | |
|
78 | <property name="topMargin"> | |
|
79 | <number>0</number> | |
|
80 | </property> | |
|
81 | <property name="rightMargin"> | |
|
82 | <number>0</number> | |
|
83 | </property> | |
|
84 | <property name="bottomMargin"> | |
|
85 | <number>0</number> | |
|
86 | </property> | |
|
42 | 87 | <item> |
|
43 | 88 | <widget class="QWidget" name="dateSourceWidget" native="true"/> |
|
44 | 89 | </item> |
|
45 | 90 | <item> |
|
46 | 91 | <widget class="QWidget" name="dateTimeWidget" native="true"/> |
|
47 | 92 | </item> |
|
48 | 93 | <item> |
|
49 | 94 | <widget class="QWidget" name="variableInspectorWidget" native="true"/> |
|
50 | 95 | </item> |
|
51 | 96 | </layout> |
|
52 | 97 | </widget> |
|
53 | 98 | </item> |
|
54 | 99 | <item> |
|
55 |
<widget class=" |
|
|
56 |
<layout class="QVBoxLayout" name="verticalLayout_2" |
|
|
100 | <widget class="SqpSidePane" name="leftInspectorSidePane" native="true"> | |
|
101 | <layout class="QVBoxLayout" name="verticalLayout_2"> | |
|
102 | <property name="spacing"> | |
|
103 | <number>3</number> | |
|
104 | </property> | |
|
105 | <property name="leftMargin"> | |
|
106 | <number>0</number> | |
|
107 | </property> | |
|
108 | <property name="topMargin"> | |
|
109 | <number>0</number> | |
|
110 | </property> | |
|
111 | <property name="rightMargin"> | |
|
112 | <number>0</number> | |
|
113 | </property> | |
|
114 | <property name="bottomMargin"> | |
|
115 | <number>0</number> | |
|
116 | </property> | |
|
117 | </layout> | |
|
57 | 118 | </widget> |
|
58 | 119 | </item> |
|
59 | 120 | </layout> |
|
60 | 121 | </widget> |
|
61 | 122 | </item> |
|
62 | 123 | <item> |
|
63 |
<widget class=" |
|
|
124 | <widget class="VisualizationWidget" name="view" native="true"/> | |
|
64 | 125 | </item> |
|
65 | 126 | <item> |
|
66 |
<widget class="QWidget" name="rightInspectorWidget" native="true" |
|
|
127 | <widget class="QWidget" name="rightInspectorWidget" native="true"> | |
|
128 | <layout class="QHBoxLayout" name="horizontalLayout_3"> | |
|
129 | <property name="spacing"> | |
|
130 | <number>3</number> | |
|
131 | </property> | |
|
132 | <property name="leftMargin"> | |
|
133 | <number>0</number> | |
|
134 | </property> | |
|
135 | <property name="topMargin"> | |
|
136 | <number>0</number> | |
|
137 | </property> | |
|
138 | <property name="rightMargin"> | |
|
139 | <number>0</number> | |
|
140 | </property> | |
|
141 | <property name="bottomMargin"> | |
|
142 | <number>0</number> | |
|
143 | </property> | |
|
144 | <item> | |
|
145 | <widget class="SqpSidePane" name="rightInspectorSidePane" native="true"/> | |
|
146 | </item> | |
|
147 | <item> | |
|
148 | <widget class="QWidget" name="widget_2" native="true"> | |
|
149 | <layout class="QVBoxLayout" name="verticalLayout_3"> | |
|
150 | <property name="spacing"> | |
|
151 | <number>3</number> | |
|
152 | </property> | |
|
153 | <property name="leftMargin"> | |
|
154 | <number>0</number> | |
|
155 | </property> | |
|
156 | <property name="topMargin"> | |
|
157 | <number>0</number> | |
|
158 | </property> | |
|
159 | <property name="rightMargin"> | |
|
160 | <number>0</number> | |
|
161 | </property> | |
|
162 | <property name="bottomMargin"> | |
|
163 | <number>0</number> | |
|
164 | </property> | |
|
165 | <item> | |
|
166 | <widget class="QWidget" name="commonPropertyInspectorWidget" native="true"/> | |
|
167 | </item> | |
|
168 | <item> | |
|
169 | <widget class="QWidget" name="catalogWidget" native="true"/> | |
|
170 | </item> | |
|
171 | </layout> | |
|
172 | </widget> | |
|
173 | </item> | |
|
174 | </layout> | |
|
175 | </widget> | |
|
67 | 176 | </item> |
|
68 | 177 | </layout> |
|
69 | 178 | </widget> |
|
70 | 179 | <widget class="QMenuBar" name="menuBar"> |
|
71 | 180 | <property name="geometry"> |
|
72 | 181 | <rect> |
|
73 | 182 | <x>0</x> |
|
74 | 183 | <y>0</y> |
|
75 | 184 | <width>800</width> |
|
76 | 185 | <height>26</height> |
|
77 | 186 | </rect> |
|
78 | 187 | </property> |
|
79 | 188 | </widget> |
|
80 | 189 | <widget class="QStatusBar" name="statusBar"/> |
|
81 | <action name="actionIndex_Viewer"> | |
|
82 | <property name="text"> | |
|
83 | <string>Index Viewer</string> | |
|
84 | </property> | |
|
85 | </action> | |
|
86 | 190 | </widget> |
|
87 | 191 | <layoutdefault spacing="6" margin="11"/> |
|
192 | <customwidgets> | |
|
193 | <customwidget> | |
|
194 | <class>VisualizationWidget</class> | |
|
195 | <extends>QWidget</extends> | |
|
196 | <header location="global">visualization/VisualizationWidget.h</header> | |
|
197 | <container>1</container> | |
|
198 | </customwidget> | |
|
199 | <customwidget> | |
|
200 | <class>SqpSidePane</class> | |
|
201 | <extends>QWidget</extends> | |
|
202 | <header location="global">sidepane/SqpSidePane.h</header> | |
|
203 | <container>1</container> | |
|
204 | </customwidget> | |
|
205 | </customwidgets> | |
|
88 | 206 | <resources/> |
|
89 | 207 | <connections/> |
|
90 | 208 | </ui> |
General Comments 8
Status change > Approved
Pull request updated. Auto status change to "Under Review"
Changed commits: * 1 added * 0 removed Changed files: * M core/CMakeLists.txt
Status change > Approved
You need to be logged in to leave comments.
Login now