@@ -0,0 +1,5 | |||
|
1 | [wrap-git] | |
|
2 | directory = catalogicpp | |
|
3 | url = https://github.com/jeandet/catalogicpp.git | |
|
4 | revision = master | |
|
5 |
@@ -0,0 +1,5 | |||
|
1 | [wrap-git] | |
|
2 | directory = stduuid | |
|
3 | url = https://github.com/jeandet/stduuid.git | |
|
4 | revision = meson | |
|
5 |
@@ -1,396 +1,396 | |||
|
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 | |
|
25 | 25 | #include <Catalogue/CatalogueController.h> |
|
26 | #include <Catalogue/CatalogueExplorer.h> | |
|
26 | //#include <Catalogue/CatalogueExplorer.h> | |
|
27 | 27 | #include <DataSource/DataSourceController.h> |
|
28 | 28 | #include <DataSource/DataSourceWidget.h> |
|
29 | 29 | #include <Settings/SqpSettingsDialog.h> |
|
30 | 30 | #include <Settings/SqpSettingsGeneralWidget.h> |
|
31 | 31 | #include <SidePane/SqpSidePane.h> |
|
32 | 32 | #include <SqpApplication.h> |
|
33 | 33 | #include <Time/TimeController.h> |
|
34 | 34 | #include <TimeWidget/TimeWidget.h> |
|
35 | 35 | #include <Variable/Variable.h> |
|
36 | 36 | #include <Visualization/VisualizationController.h> |
|
37 | 37 | |
|
38 | 38 | #include <QAction> |
|
39 | 39 | #include <QCloseEvent> |
|
40 | 40 | #include <QDate> |
|
41 | 41 | #include <QDir> |
|
42 | 42 | #include <QFileDialog> |
|
43 | 43 | #include <QMessageBox> |
|
44 | 44 | #include <QToolBar> |
|
45 | 45 | #include <QToolButton> |
|
46 | 46 | #include <memory.h> |
|
47 | 47 | |
|
48 | 48 | #include "iostream" |
|
49 | 49 | |
|
50 | 50 | Q_LOGGING_CATEGORY(LOG_MainWindow, "MainWindow") |
|
51 | 51 | |
|
52 | 52 | namespace |
|
53 | 53 | { |
|
54 | 54 | const auto LEFTMAININSPECTORWIDGETSPLITTERINDEX = 0; |
|
55 | 55 | const auto LEFTINSPECTORSIDEPANESPLITTERINDEX = 1; |
|
56 | 56 | const auto VIEWPLITTERINDEX = 2; |
|
57 | 57 | const auto RIGHTINSPECTORSIDEPANESPLITTERINDEX = 3; |
|
58 | 58 | const auto RIGHTMAININSPECTORWIDGETSPLITTERINDEX = 4; |
|
59 | 59 | } |
|
60 | 60 | |
|
61 | 61 | class MainWindow::MainWindowPrivate |
|
62 | 62 | { |
|
63 | 63 | public: |
|
64 | 64 | explicit MainWindowPrivate(MainWindow* mainWindow) |
|
65 | 65 | : m_LastOpenLeftInspectorSize {} |
|
66 | 66 | , m_LastOpenRightInspectorSize {} |
|
67 | 67 | , m_GeneralSettingsWidget { new SqpSettingsGeneralWidget { mainWindow } } |
|
68 | 68 | , m_SettingsDialog { new SqpSettingsDialog { mainWindow } } |
|
69 | 69 | //, m_CatalogExplorer { new CatalogueExplorer { mainWindow } } |
|
70 | 70 | { |
|
71 | 71 | } |
|
72 | 72 | |
|
73 | 73 | QSize m_LastOpenLeftInspectorSize; |
|
74 | 74 | QSize m_LastOpenRightInspectorSize; |
|
75 | 75 | /// General settings widget. MainWindow has the ownership |
|
76 | 76 | SqpSettingsGeneralWidget* m_GeneralSettingsWidget; |
|
77 | 77 | /// Settings dialog. MainWindow has the ownership |
|
78 | 78 | SqpSettingsDialog* m_SettingsDialog; |
|
79 | 79 | /// Catalogue dialog. MainWindow has the ownership |
|
80 | 80 | // CatalogueExplorer* m_CatalogExplorer; |
|
81 | 81 | |
|
82 | 82 | bool checkDataToSave(QWidget* parentWidget); |
|
83 | 83 | }; |
|
84 | 84 | |
|
85 | 85 | MainWindow::MainWindow(QWidget* parent) |
|
86 | 86 | : QMainWindow { parent } |
|
87 | 87 | , m_Ui { new Ui::MainWindow } |
|
88 | 88 | , impl { spimpl::make_unique_impl<MainWindowPrivate>(this) } |
|
89 | 89 | { |
|
90 | 90 | m_Ui->setupUi(this); |
|
91 | 91 | |
|
92 | 92 | m_Ui->splitter->setCollapsible(LEFTINSPECTORSIDEPANESPLITTERINDEX, false); |
|
93 | 93 | m_Ui->splitter->setCollapsible(RIGHTINSPECTORSIDEPANESPLITTERINDEX, false); |
|
94 | 94 | |
|
95 | 95 | // impl->m_CatalogExplorer->setVisualizationWidget(m_Ui->view); |
|
96 | 96 | |
|
97 | 97 | |
|
98 | 98 | auto spacerLeftTop = new QWidget {}; |
|
99 | 99 | spacerLeftTop->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
100 | 100 | |
|
101 | 101 | auto spacerLeftBottom = new QWidget {}; |
|
102 | 102 | spacerLeftBottom->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
103 | 103 | |
|
104 | 104 | |
|
105 | 105 | auto spacerRightTop = new QWidget {}; |
|
106 | 106 | spacerRightTop->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
107 | 107 | |
|
108 | 108 | auto spacerRightBottom = new QWidget {}; |
|
109 | 109 | spacerRightBottom->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
110 | 110 | |
|
111 | 111 | |
|
112 | 112 | auto openInspector = [this](bool checked, bool right, auto action) { |
|
113 | 113 | action->setIcon( |
|
114 | 114 | QIcon { (checked ^ right) ? ":/icones/next.png" : ":/icones/previous.png" }); |
|
115 | 115 | |
|
116 | 116 | auto& lastInspectorSize |
|
117 | 117 | = right ? impl->m_LastOpenRightInspectorSize : impl->m_LastOpenLeftInspectorSize; |
|
118 | 118 | |
|
119 | 119 | auto nextInspectorSize = right ? m_Ui->rightMainInspectorWidget->size() |
|
120 | 120 | : m_Ui->leftMainInspectorWidget->size(); |
|
121 | 121 | |
|
122 | 122 | // Update of the last opened geometry |
|
123 | 123 | if (checked) |
|
124 | 124 | { |
|
125 | 125 | lastInspectorSize = nextInspectorSize; |
|
126 | 126 | } |
|
127 | 127 | |
|
128 | 128 | auto startSize = lastInspectorSize; |
|
129 | 129 | auto endSize = startSize; |
|
130 | 130 | endSize.setWidth(0); |
|
131 | 131 | |
|
132 | 132 | auto splitterInspectorIndex |
|
133 | 133 | = right ? RIGHTMAININSPECTORWIDGETSPLITTERINDEX : LEFTMAININSPECTORWIDGETSPLITTERINDEX; |
|
134 | 134 | |
|
135 | 135 | auto currentSizes = m_Ui->splitter->sizes(); |
|
136 | 136 | if (checked) |
|
137 | 137 | { |
|
138 | 138 | // adjust sizes individually here, e.g. |
|
139 | 139 | currentSizes[splitterInspectorIndex] -= lastInspectorSize.width(); |
|
140 | 140 | currentSizes[VIEWPLITTERINDEX] += lastInspectorSize.width(); |
|
141 | 141 | m_Ui->splitter->setSizes(currentSizes); |
|
142 | 142 | } |
|
143 | 143 | else |
|
144 | 144 | { |
|
145 | 145 | // adjust sizes individually here, e.g. |
|
146 | 146 | currentSizes[splitterInspectorIndex] += lastInspectorSize.width(); |
|
147 | 147 | currentSizes[VIEWPLITTERINDEX] -= lastInspectorSize.width(); |
|
148 | 148 | m_Ui->splitter->setSizes(currentSizes); |
|
149 | 149 | } |
|
150 | 150 | }; |
|
151 | 151 | |
|
152 | 152 | |
|
153 | 153 | // //////////////// // |
|
154 | 154 | // Menu and Toolbar // |
|
155 | 155 | // //////////////// // |
|
156 | 156 | this->menuBar()->addAction(tr("File")); |
|
157 | 157 | auto toolsMenu = this->menuBar()->addMenu(tr("Tools")); |
|
158 | 158 | toolsMenu->addAction(tr("Settings..."), [this]() { |
|
159 | 159 | // Loads settings |
|
160 | 160 | impl->m_SettingsDialog->loadSettings(); |
|
161 | 161 | |
|
162 | 162 | // Open settings dialog and save settings if the dialog is accepted |
|
163 | 163 | if (impl->m_SettingsDialog->exec() == QDialog::Accepted) |
|
164 | 164 | { |
|
165 | 165 | impl->m_SettingsDialog->saveSettings(); |
|
166 | 166 | } |
|
167 | 167 | }); |
|
168 | 168 | |
|
169 | 169 | auto mainToolBar = this->addToolBar(QStringLiteral("MainToolBar")); |
|
170 | 170 | |
|
171 | 171 | auto timeWidget = new TimeWidget {}; |
|
172 | 172 | mainToolBar->addWidget(timeWidget); |
|
173 | 173 | |
|
174 | 174 | // Interaction modes |
|
175 | 175 | auto actionPointerMode = new QAction { QIcon(":/icones/pointer.png"), "Move", this }; |
|
176 | 176 | actionPointerMode->setCheckable(true); |
|
177 | 177 | actionPointerMode->setChecked( |
|
178 | 178 | sqpApp->plotsInteractionMode() == SqpApplication::PlotsInteractionMode::None); |
|
179 | 179 | connect(actionPointerMode, &QAction::triggered, |
|
180 | 180 | []() { sqpApp->setPlotsInteractionMode(SqpApplication::PlotsInteractionMode::None); }); |
|
181 | 181 | |
|
182 | 182 | auto actionZoomMode = new QAction { QIcon(":/icones/zoom.png"), "Zoom", this }; |
|
183 | 183 | actionZoomMode->setCheckable(true); |
|
184 | 184 | actionZoomMode->setChecked( |
|
185 | 185 | sqpApp->plotsInteractionMode() == SqpApplication::PlotsInteractionMode::ZoomBox); |
|
186 | 186 | connect(actionZoomMode, &QAction::triggered, |
|
187 | 187 | []() { sqpApp->setPlotsInteractionMode(SqpApplication::PlotsInteractionMode::ZoomBox); }); |
|
188 | 188 | |
|
189 | 189 | auto actionOrganisationMode = new QAction { QIcon(":/icones/drag.png"), "Organize", this }; |
|
190 | 190 | actionOrganisationMode->setCheckable(true); |
|
191 | 191 | actionOrganisationMode->setChecked( |
|
192 | 192 | sqpApp->plotsInteractionMode() == SqpApplication::PlotsInteractionMode::DragAndDrop); |
|
193 | 193 | connect(actionOrganisationMode, &QAction::triggered, []() { |
|
194 | 194 | sqpApp->setPlotsInteractionMode(SqpApplication::PlotsInteractionMode::DragAndDrop); |
|
195 | 195 | }); |
|
196 | 196 | |
|
197 | 197 | auto actionZonesMode = new QAction { QIcon(":/icones/rectangle.png"), "Zones", this }; |
|
198 | 198 | actionZonesMode->setCheckable(true); |
|
199 | 199 | actionZonesMode->setChecked( |
|
200 | 200 | sqpApp->plotsInteractionMode() == SqpApplication::PlotsInteractionMode::SelectionZones); |
|
201 | 201 | connect(actionZonesMode, &QAction::triggered, []() { |
|
202 | 202 | sqpApp->setPlotsInteractionMode(SqpApplication::PlotsInteractionMode::SelectionZones); |
|
203 | 203 | }); |
|
204 | 204 | |
|
205 | 205 | auto modeActionGroup = new QActionGroup { this }; |
|
206 | 206 | modeActionGroup->addAction(actionZoomMode); |
|
207 | 207 | modeActionGroup->addAction(actionZonesMode); |
|
208 | 208 | modeActionGroup->addAction(actionOrganisationMode); |
|
209 | 209 | modeActionGroup->addAction(actionPointerMode); |
|
210 | 210 | modeActionGroup->setExclusive(true); |
|
211 | 211 | |
|
212 | 212 | mainToolBar->addSeparator(); |
|
213 | 213 | mainToolBar->addAction(actionPointerMode); |
|
214 | 214 | mainToolBar->addAction(actionZoomMode); |
|
215 | 215 | mainToolBar->addAction(actionOrganisationMode); |
|
216 | 216 | mainToolBar->addAction(actionZonesMode); |
|
217 | 217 | mainToolBar->addSeparator(); |
|
218 | 218 | |
|
219 | 219 | // Cursors |
|
220 | 220 | auto btnCursor = new QToolButton { this }; |
|
221 | 221 | btnCursor->setIcon(QIcon(":/icones/cursor.png")); |
|
222 | 222 | btnCursor->setText("Cursor"); |
|
223 | 223 | btnCursor->setToolTip("Cursor"); |
|
224 | 224 | btnCursor->setPopupMode(QToolButton::InstantPopup); |
|
225 | 225 | auto cursorMenu = new QMenu("CursorMenu", this); |
|
226 | 226 | btnCursor->setMenu(cursorMenu); |
|
227 | 227 | |
|
228 | 228 | auto noCursorAction = cursorMenu->addAction("No Cursor"); |
|
229 | 229 | noCursorAction->setCheckable(true); |
|
230 | 230 | noCursorAction->setChecked( |
|
231 | 231 | sqpApp->plotsCursorMode() == SqpApplication::PlotsCursorMode::NoCursor); |
|
232 | 232 | connect(noCursorAction, &QAction::triggered, |
|
233 | 233 | []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::NoCursor); }); |
|
234 | 234 | |
|
235 | 235 | cursorMenu->addSeparator(); |
|
236 | 236 | auto verticalCursorAction = cursorMenu->addAction("Vertical Cursor"); |
|
237 | 237 | verticalCursorAction->setCheckable(true); |
|
238 | 238 | verticalCursorAction->setChecked( |
|
239 | 239 | sqpApp->plotsCursorMode() == SqpApplication::PlotsCursorMode::Vertical); |
|
240 | 240 | connect(verticalCursorAction, &QAction::triggered, |
|
241 | 241 | []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::Vertical); }); |
|
242 | 242 | |
|
243 | 243 | auto temporalCursorAction = cursorMenu->addAction("Temporal Cursor"); |
|
244 | 244 | temporalCursorAction->setCheckable(true); |
|
245 | 245 | temporalCursorAction->setChecked( |
|
246 | 246 | sqpApp->plotsCursorMode() == SqpApplication::PlotsCursorMode::Temporal); |
|
247 | 247 | connect(temporalCursorAction, &QAction::triggered, |
|
248 | 248 | []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::Temporal); }); |
|
249 | 249 | |
|
250 | 250 | auto horizontalCursorAction = cursorMenu->addAction("Horizontal Cursor"); |
|
251 | 251 | horizontalCursorAction->setCheckable(true); |
|
252 | 252 | horizontalCursorAction->setChecked( |
|
253 | 253 | sqpApp->plotsCursorMode() == SqpApplication::PlotsCursorMode::Horizontal); |
|
254 | 254 | connect(horizontalCursorAction, &QAction::triggered, |
|
255 | 255 | []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::Horizontal); }); |
|
256 | 256 | |
|
257 | 257 | auto crossCursorAction = cursorMenu->addAction("Cross Cursor"); |
|
258 | 258 | crossCursorAction->setCheckable(true); |
|
259 | 259 | crossCursorAction->setChecked( |
|
260 | 260 | sqpApp->plotsCursorMode() == SqpApplication::PlotsCursorMode::Cross); |
|
261 | 261 | connect(crossCursorAction, &QAction::triggered, |
|
262 | 262 | []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::Cross); }); |
|
263 | 263 | |
|
264 | 264 | mainToolBar->addWidget(btnCursor); |
|
265 | 265 | |
|
266 | 266 | auto cursorModeActionGroup = new QActionGroup { this }; |
|
267 | 267 | cursorModeActionGroup->setExclusive(true); |
|
268 | 268 | cursorModeActionGroup->addAction(noCursorAction); |
|
269 | 269 | cursorModeActionGroup->addAction(verticalCursorAction); |
|
270 | 270 | cursorModeActionGroup->addAction(temporalCursorAction); |
|
271 | 271 | cursorModeActionGroup->addAction(horizontalCursorAction); |
|
272 | 272 | cursorModeActionGroup->addAction(crossCursorAction); |
|
273 | 273 | |
|
274 | 274 | // Catalog |
|
275 | 275 | mainToolBar->addSeparator(); |
|
276 | 276 | // mainToolBar->addAction(QIcon(":/icones/catalogue.png"), "Catalogues", |
|
277 | 277 | // [this]() { impl->m_CatalogExplorer->show(); }); |
|
278 | 278 | |
|
279 | 279 | // //////// // |
|
280 | 280 | // Settings // |
|
281 | 281 | // //////// // |
|
282 | 282 | |
|
283 | 283 | // Registers "general settings" widget to the settings dialog |
|
284 | 284 | impl->m_SettingsDialog->registerWidget( |
|
285 | 285 | QStringLiteral("General"), impl->m_GeneralSettingsWidget); |
|
286 | 286 | |
|
287 | 287 | // /////////// // |
|
288 | 288 | // Connections // |
|
289 | 289 | // /////////// // |
|
290 | 290 | |
|
291 | 291 | // Controllers / controllers connections |
|
292 | 292 | // connect(&sqpApp->timeController(), SIGNAL(timeUpdated(DateTimeRange)), |
|
293 | 293 | // &sqpApp->variableController(), |
|
294 | 294 | // SLOT(onDateTimeOnSelection(DateTimeRange))); |
|
295 | 295 | |
|
296 | 296 | // Widgets / controllers connections |
|
297 | 297 | |
|
298 | 298 | // DataSource |
|
299 | 299 | connect(&sqpApp->dataSourceController(), SIGNAL(dataSourceItemSet(DataSourceItem*)), |
|
300 | 300 | m_Ui->dataSourceWidget, SLOT(addDataSource(DataSourceItem*))); |
|
301 | 301 | |
|
302 | 302 | // Time |
|
303 | 303 | connect(timeWidget, SIGNAL(timeUpdated(DateTimeRange)), &sqpApp->timeController(), |
|
304 | 304 | SLOT(onTimeToUpdate(DateTimeRange))); |
|
305 | 305 | |
|
306 | 306 | // Visualization |
|
307 | 307 | connect(&sqpApp->visualizationController(), |
|
308 | 308 | SIGNAL(variableAboutToBeDeleted(std::shared_ptr<Variable>)), m_Ui->view, |
|
309 | 309 | SLOT(onVariableAboutToBeDeleted(std::shared_ptr<Variable>))); |
|
310 | 310 | |
|
311 | 311 | connect(&sqpApp->visualizationController(), |
|
312 | 312 | SIGNAL(rangeChanged(std::shared_ptr<Variable>, const DateTimeRange&)), m_Ui->view, |
|
313 | 313 | SLOT(onRangeChanged(std::shared_ptr<Variable>, const DateTimeRange&))); |
|
314 | 314 | |
|
315 | 315 | // Widgets / widgets connections |
|
316 | 316 | |
|
317 | 317 | // For the following connections, we use DirectConnection to allow each widget that can |
|
318 | 318 | // potentially attach a menu to the variable's menu to do so before this menu is displayed. |
|
319 | 319 | // The order of connections is also important, since it determines the order in which each |
|
320 | 320 | // widget will attach its menu |
|
321 | 321 | connect(m_Ui->variableInspectorWidget, |
|
322 | 322 | SIGNAL(tableMenuAboutToBeDisplayed(QMenu*, const QVector<std::shared_ptr<Variable>>&)), |
|
323 | 323 | m_Ui->view, SLOT(attachVariableMenu(QMenu*, const QVector<std::shared_ptr<Variable>>&)), |
|
324 | 324 | Qt::DirectConnection); |
|
325 | 325 | } |
|
326 | 326 | |
|
327 | 327 | MainWindow::~MainWindow() {} |
|
328 | 328 | |
|
329 | 329 | void MainWindow::changeEvent(QEvent* e) |
|
330 | 330 | { |
|
331 | 331 | QMainWindow::changeEvent(e); |
|
332 | 332 | switch (e->type()) |
|
333 | 333 | { |
|
334 | 334 | case QEvent::LanguageChange: |
|
335 | 335 | m_Ui->retranslateUi(this); |
|
336 | 336 | break; |
|
337 | 337 | default: |
|
338 | 338 | break; |
|
339 | 339 | } |
|
340 | 340 | } |
|
341 | 341 | |
|
342 | 342 | void MainWindow::closeEvent(QCloseEvent* event) |
|
343 | 343 | { |
|
344 | 344 | if (!impl->checkDataToSave(this)) |
|
345 | 345 | { |
|
346 | 346 | event->ignore(); |
|
347 | 347 | } |
|
348 | 348 | else |
|
349 | 349 | { |
|
350 | 350 | event->accept(); |
|
351 | 351 | } |
|
352 | 352 | } |
|
353 | 353 | |
|
354 | 354 | void MainWindow::keyPressEvent(QKeyEvent* event) |
|
355 | 355 | { |
|
356 | 356 | switch (event->key()) |
|
357 | 357 | { |
|
358 | 358 | case Qt::Key_F11: |
|
359 | 359 | if (this->isFullScreen()) |
|
360 | 360 | { |
|
361 | 361 | this->showNormal(); |
|
362 | 362 | } |
|
363 | 363 | else |
|
364 | 364 | { |
|
365 | 365 | this->showFullScreen(); |
|
366 | 366 | } |
|
367 | 367 | break; |
|
368 | 368 | default: |
|
369 | 369 | break; |
|
370 | 370 | } |
|
371 | 371 | } |
|
372 | 372 | |
|
373 | 373 | bool MainWindow::MainWindowPrivate::checkDataToSave(QWidget* parentWidget) |
|
374 | 374 | { |
|
375 | 375 | // auto hasChanges = sqpApp->catalogueController().hasChanges(); |
|
376 | 376 | // if (hasChanges) |
|
377 | 377 | // { |
|
378 | 378 | // // There are some unsaved changes |
|
379 | 379 | // switch (QMessageBox::question(parentWidget, tr("Save changes"), |
|
380 | 380 | // tr("The catalogue controller has unsaved changes.\nDo you want to save them ?"), |
|
381 | 381 | // QMessageBox::SaveAll | QMessageBox::Discard | QMessageBox::Cancel, |
|
382 | 382 | // QMessageBox::SaveAll)) |
|
383 | 383 | // { |
|
384 | 384 | // case QMessageBox::SaveAll: |
|
385 | 385 | // sqpApp->catalogueController().saveAll(); |
|
386 | 386 | // break; |
|
387 | 387 | // case QMessageBox::Discard: |
|
388 | 388 | // break; |
|
389 | 389 | // case QMessageBox::Cancel: |
|
390 | 390 | // default: |
|
391 | 391 | // return false; |
|
392 | 392 | // } |
|
393 | 393 | // } |
|
394 | 394 | |
|
395 | 395 | return true; |
|
396 | 396 | } |
@@ -1,1 +1,1 | |||
|
1 | Subproject commit 0093c733b640e07ebeaf204c1ed1279db095aa9f | |
|
1 | Subproject commit 24f31ec545d2e177fc2212ecdb457e01533b6fbb |
@@ -1,145 +1,168 | |||
|
1 | 1 | |
|
2 | 2 | gui_moc_headers = [ |
|
3 | 'include/DataSource/DataSourceWidget.h', | |
|
4 | 'include/Settings/SqpSettingsDialog.h', | |
|
5 | 'include/Settings/SqpSettingsGeneralWidget.h', | |
|
6 | 'include/SidePane/SqpSidePane.h', | |
|
7 | 'include/SqpApplication.h', | |
|
8 | 'include/DragAndDrop/DragDropScroller.h', | |
|
9 | 'include/DragAndDrop/DragDropTabSwitcher.h', | |
|
10 | 'include/TimeWidget/TimeWidget.h', | |
|
11 | 'include/Variable/VariableInspectorWidget.h', | |
|
12 | 'include/Variable/RenameVariableDialog.h', | |
|
13 | 'include/Visualization/qcustomplot.h', | |
|
14 | 'include/Visualization/VisualizationGraphWidget.h', | |
|
15 | 'include/Visualization/VisualizationTabWidget.h', | |
|
16 | 'include/Visualization/VisualizationWidget.h', | |
|
17 | 'include/Visualization/VisualizationZoneWidget.h', | |
|
18 | 'include/Visualization/VisualizationDragDropContainer.h', | |
|
19 | 'include/Visualization/VisualizationDragWidget.h', | |
|
20 | 'include/Visualization/ColorScaleEditor.h', | |
|
21 | 'include/Visualization/VisualizationSelectionZoneItem.h', | |
|
22 | 'include/Actions/SelectionZoneAction.h', | |
|
23 | 'include/Visualization/VisualizationMultiZoneSelectionDialog.h', | |
|
24 | 'include/Catalogue/CatalogueExplorer.h', | |
|
25 | 'include/Catalogue/CatalogueEventsWidget.h', | |
|
26 |
|
|
|
27 | 'include/Catalogue/CatalogueInspectorWidget.h', | |
|
28 | 'include/Catalogue/CatalogueEventsModel.h', | |
|
29 | 'include/Catalogue/CatalogueTreeModel.h', | |
|
30 | 'include/Actions/FilteringAction.h' | |
|
3 | './include/Common/VisualizationDef.h', | |
|
4 | './include/Common/ColorUtils.h', | |
|
5 | './include/DragAndDrop/DragDropGuiController.h', | |
|
6 | './include/DragAndDrop/DragDropTabSwitcher.h', | |
|
7 | './include/DragAndDrop/DragDropScroller.h', | |
|
8 | './include/Settings/SqpSettingsDialog.h', | |
|
9 | './include/Settings/SqpSettingsGeneralWidget.h', | |
|
10 | './include/DataSource/DataSourceTreeWidgetHelper.h', | |
|
11 | './include/DataSource/DataSourceTreeWidget.h', | |
|
12 | './include/DataSource/DataSourceTreeWidgetItem.h', | |
|
13 | './include/DataSource/DataSourceWidget.h', | |
|
14 | './include/Catalogue2/repositoriestreeview.h', | |
|
15 | './include/Catalogue2/browser.h', | |
|
16 | './include/Catalogue2/eventeditor.h', | |
|
17 | './include/Catalogue2/eventsmodel.h', | |
|
18 | './include/Catalogue2/eventstreeview.h', | |
|
19 | './include/Catalogue2/repositoriesmodel.h', | |
|
20 | './include/TimeWidget/TimeWidget.h', | |
|
21 | './include/SqpApplication.h', | |
|
22 | './include/SidePane/SqpSidePane.h', | |
|
23 | './include/Variable/RenameVariableDialog.h', | |
|
24 | './include/Variable/VariableInspectorWidget.h', | |
|
25 | './include/Variable/VariableInspectorTableView.h', | |
|
26 | './include/Variable/VariableMenuHeaderWidget.h', | |
|
27 | './include/Visualization/VisualizationDragWidget.h', | |
|
28 | './include/Visualization/VisualizationZoneWidget.h', | |
|
29 | './include/Visualization/operations/GenerateVariableMenuOperation.h', | |
|
30 | './include/Visualization/operations/RescaleAxeOperation.h', | |
|
31 | './include/Visualization/operations/RemoveVariableOperation.h', | |
|
32 | './include/Visualization/operations/MenuBuilder.h', | |
|
33 | './include/Visualization/operations/FindVariableOperation.h', | |
|
34 | './include/Visualization/VisualizationDefs.h', | |
|
35 | './include/Visualization/IVisualizationWidgetVisitor.h', | |
|
36 | './include/Visualization/SqpColorScale.h', | |
|
37 | './include/Visualization/VisualizationGraphRenderingDelegate.h', | |
|
38 | './include/Visualization/VisualizationGraphWidget.h', | |
|
39 | './include/Visualization/MacScrollBarStyle.h', | |
|
40 | './include/Visualization/IVisualizationWidget.h', | |
|
41 | './include/Visualization/qcustomplot.h', | |
|
42 | './include/Visualization/IGraphSynchronizer.h', | |
|
43 | './include/Visualization/QCPColorMapIterator.h', | |
|
44 | './include/Visualization/VisualizationActionManager.h', | |
|
45 | './include/Visualization/VisualizationTabWidget.h', | |
|
46 | './include/Visualization/IVariableContainer.h', | |
|
47 | './include/Visualization/AxisRenderingUtils.h', | |
|
48 | './include/Visualization/VisualizationMultiZoneSelectionDialog.h', | |
|
49 | './include/Visualization/VisualizationCursorItem.h', | |
|
50 | './include/Visualization/VisualizationWidget.h', | |
|
51 | './include/Visualization/PlottablesRenderingUtils.h', | |
|
52 | './include/Visualization/VisualizationSelectionZoneManager.h', | |
|
53 | './include/Visualization/QCustomPlotSynchronizer.h', | |
|
54 | './include/Visualization/VisualizationSelectionZoneItem.h', | |
|
55 | './include/Visualization/VisualizationDragDropContainer.h', | |
|
56 | './include/Visualization/ColorScaleEditor.h', | |
|
57 | './include/Visualization/VisualizationGraphHelper.h', | |
|
58 | './include/Actions/ActionsGuiController.h', | |
|
59 | './include/Actions/FilteringAction.h', | |
|
60 | './include/Actions/SelectionZoneAction.h' | |
|
31 | 61 | ] |
|
32 | 62 | |
|
33 | 63 | gui_ui_files = [ |
|
34 | 'ui/DataSource/DataSourceWidget.ui', | |
|
35 |
|
|
|
36 | 'ui/Settings/SqpSettingsGeneralWidget.ui', | |
|
37 | 'ui/SidePane/SqpSidePane.ui', | |
|
38 | 'ui/TimeWidget/TimeWidget.ui', | |
|
39 | 'ui/Variable/VariableInspectorWidget.ui', | |
|
40 | 'ui/Variable/RenameVariableDialog.ui', | |
|
41 |
|
|
|
42 | 'ui/Visualization/VisualizationGraphWidget.ui', | |
|
43 | 'ui/Visualization/VisualizationTabWidget.ui', | |
|
44 |
|
|
|
45 |
|
|
|
46 | 'ui/Visualization/ColorScaleEditor.ui', | |
|
47 |
|
|
|
48 | 'ui/Catalogue/CatalogueExplorer.ui', | |
|
49 | 'ui/Catalogue/CatalogueEventsWidget.ui', | |
|
50 | 'ui/Catalogue/CatalogueSideBarWidget.ui', | |
|
51 | 'ui/Catalogue/CatalogueInspectorWidget.ui' | |
|
64 | './ui/Settings/SqpSettingsGeneralWidget.ui', | |
|
65 | './ui/Settings/SqpSettingsDialog.ui', | |
|
66 | './ui/DataSource/DataSourceWidget.ui', | |
|
67 | './ui/Catalogue2/browser.ui', | |
|
68 | './ui/Catalogue2/eventeditor.ui', | |
|
69 | './ui/TimeWidget/TimeWidget.ui', | |
|
70 | './ui/SidePane/SqpSidePane.ui', | |
|
71 | './ui/Variable/RenameVariableDialog.ui', | |
|
72 | './ui/Variable/VariableInspectorWidget.ui', | |
|
73 | './ui/Variable/VariableMenuHeaderWidget.ui', | |
|
74 | './ui/Visualization/ColorScaleEditor.ui', | |
|
75 | './ui/Visualization/VisualizationZoneWidget.ui', | |
|
76 | './ui/Visualization/VisualizationMultiZoneSelectionDialog.ui', | |
|
77 | './ui/Visualization/VisualizationGraphWidget.ui', | |
|
78 | './ui/Visualization/VisualizationWidget.ui', | |
|
79 | './ui/Visualization/VisualizationTabWidget.ui' | |
|
52 | 80 | ] |
|
53 | 81 | |
|
54 | 82 | gui_qresources = ['resources/sqpguiresources.qrc'] |
|
55 | 83 | |
|
56 | 84 | rcc_gen = generator(rcc, |
|
57 | 85 | output : 'qrc_@BASENAME@.cpp', |
|
58 | 86 | arguments : [ |
|
59 | 87 | '--output', |
|
60 | 88 | '@OUTPUT@', |
|
61 | 89 | '@INPUT@', |
|
62 | 90 | '@EXTRA_ARGS@']) |
|
63 | 91 | |
|
64 | 92 | rcc_files = rcc_gen.process(gui_qresources, extra_args : ['-name', 'sqpguiresources']) |
|
65 | 93 | |
|
66 | 94 | gui_moc_files = qt5.preprocess(moc_headers : gui_moc_headers, |
|
67 | 95 | ui_files : gui_ui_files) |
|
68 | 96 | |
|
69 | 97 | gui_sources = [ |
|
70 | 'src/SqpApplication.cpp', | |
|
71 | 'src/DragAndDrop/DragDropGuiController.cpp', | |
|
72 | 'src/DragAndDrop/DragDropScroller.cpp', | |
|
73 |
|
|
|
74 | 'src/Common/ColorUtils.cpp', | |
|
75 | 'src/Common/VisualizationDef.cpp', | |
|
76 | 'src/DataSource/DataSourceTreeWidgetItem.cpp', | |
|
77 | 'src/DataSource/DataSourceTreeWidgetHelper.cpp', | |
|
78 |
|
|
|
79 |
|
|
|
80 | 'src/Settings/SqpSettingsDialog.cpp', | |
|
81 | 'src/Settings/SqpSettingsGeneralWidget.cpp', | |
|
82 | 'src/SidePane/SqpSidePane.cpp', | |
|
83 | 'src/TimeWidget/TimeWidget.cpp', | |
|
84 | 'src/Variable/VariableInspectorWidget.cpp', | |
|
85 | 'src/Variable/VariableInspectorTableView.cpp', | |
|
86 | 'src/Variable/VariableMenuHeaderWidget.cpp', | |
|
87 | 'src/Variable/RenameVariableDialog.cpp', | |
|
88 | 'src/Visualization/VisualizationGraphHelper.cpp', | |
|
89 | 'src/Visualization/VisualizationGraphRenderingDelegate.cpp', | |
|
90 | 'src/Visualization/VisualizationGraphWidget.cpp', | |
|
91 | 'src/Visualization/VisualizationTabWidget.cpp', | |
|
92 | 'src/Visualization/VisualizationWidget.cpp', | |
|
93 | 'src/Visualization/VisualizationZoneWidget.cpp', | |
|
94 |
|
|
|
95 |
|
|
|
96 | 'src/Visualization/operations/FindVariableOperation.cpp', | |
|
97 | 'src/Visualization/operations/GenerateVariableMenuOperation.cpp', | |
|
98 |
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
|
|
|
102 |
|
|
|
103 |
|
|
|
104 |
|
|
|
105 | 'src/Visualization/MacScrollBarStyle.cpp', | |
|
106 | 'src/Visualization/VisualizationCursorItem.cpp', | |
|
107 |
|
|
|
108 | 'src/Visualization/SqpColorScale.cpp', | |
|
109 |
|
|
|
110 | 'src/Visualization/VisualizationSelectionZoneItem.cpp', | |
|
111 | 'src/Visualization/VisualizationSelectionZoneManager.cpp', | |
|
112 | 'src/Actions/SelectionZoneAction.cpp', | |
|
113 | 'src/Actions/ActionsGuiController.cpp', | |
|
114 | 'src/Actions/FilteringAction.cpp', | |
|
115 |
|
|
|
116 |
|
|
|
117 | 'src/Catalogue/CatalogueExplorer.cpp', | |
|
118 | 'src/Catalogue/CatalogueEventsWidget.cpp', | |
|
119 | 'src/Catalogue/CatalogueSideBarWidget.cpp', | |
|
120 | 'src/Catalogue/CatalogueInspectorWidget.cpp', | |
|
121 | 'src/Catalogue/CatalogueTreeItems/CatalogueAbstractTreeItem.cpp', | |
|
122 | 'src/Catalogue/CatalogueTreeItems/CatalogueTreeItem.cpp', | |
|
123 | 'src/Catalogue/CatalogueTreeItems/CatalogueTextTreeItem.cpp', | |
|
124 | 'src/Catalogue/CatalogueEventsModel.cpp', | |
|
125 | 'src/Catalogue/CatalogueExplorerHelper.cpp', | |
|
126 | 'src/Catalogue/CatalogueActionManager.cpp', | |
|
127 | 'src/Catalogue/CatalogueTreeModel.cpp' | |
|
98 | './src/Common/ColorUtils.cpp', | |
|
99 | './src/Common/VisualizationDef.cpp', | |
|
100 | './src/SqpApplication.cpp', | |
|
101 | './src/DragAndDrop/DragDropTabSwitcher.cpp', | |
|
102 | './src/DragAndDrop/DragDropScroller.cpp', | |
|
103 | './src/DragAndDrop/DragDropGuiController.cpp', | |
|
104 | './src/Settings/SqpSettingsGeneralWidget.cpp', | |
|
105 | './src/Settings/SqpSettingsDialog.cpp', | |
|
106 | './src/DataSource/DataSourceTreeWidgetItem.cpp', | |
|
107 | './src/DataSource/DataSourceTreeWidgetHelper.cpp', | |
|
108 | './src/DataSource/DataSourceWidget.cpp', | |
|
109 | './src/DataSource/DataSourceTreeWidget.cpp', | |
|
110 | './src/Catalogue2/eventstreeview.cpp', | |
|
111 | './src/Catalogue2/eventeditor.cpp', | |
|
112 | './src/Catalogue2/repositoriestreeview.cpp', | |
|
113 | './src/Catalogue2/browser.cpp', | |
|
114 | './src/Catalogue2/eventsmodel.cpp', | |
|
115 | './src/Catalogue2/repositoriesmodel.cpp', | |
|
116 | './src/TimeWidget/TimeWidget.cpp', | |
|
117 | './src/SidePane/SqpSidePane.cpp', | |
|
118 | './src/Variable/VariableInspectorTableView.cpp', | |
|
119 | './src/Variable/VariableInspectorWidget.cpp', | |
|
120 | './src/Variable/RenameVariableDialog.cpp', | |
|
121 | './src/Variable/VariableMenuHeaderWidget.cpp', | |
|
122 | './src/Visualization/VisualizationGraphWidget.cpp', | |
|
123 | './src/Visualization/PlottablesRenderingUtils.cpp', | |
|
124 | './src/Visualization/AxisRenderingUtils.cpp', | |
|
125 | './src/Visualization/VisualizationWidget.cpp', | |
|
126 | './src/Visualization/qcustomplot.cpp', | |
|
127 | './src/Visualization/VisualizationDragWidget.cpp', | |
|
128 | './src/Visualization/VisualizationActionManager.cpp', | |
|
129 | './src/Visualization/MacScrollBarStyle.cpp', | |
|
130 | './src/Visualization/VisualizationSelectionZoneManager.cpp', | |
|
131 | './src/Visualization/operations/FindVariableOperation.cpp', | |
|
132 | './src/Visualization/operations/RescaleAxeOperation.cpp', | |
|
133 | './src/Visualization/operations/MenuBuilder.cpp', | |
|
134 | './src/Visualization/operations/GenerateVariableMenuOperation.cpp', | |
|
135 | './src/Visualization/operations/RemoveVariableOperation.cpp', | |
|
136 | './src/Visualization/VisualizationSelectionZoneItem.cpp', | |
|
137 | './src/Visualization/VisualizationCursorItem.cpp', | |
|
138 | './src/Visualization/QCPColorMapIterator.cpp', | |
|
139 | './src/Visualization/QCustomPlotSynchronizer.cpp', | |
|
140 | './src/Visualization/ColorScaleEditor.cpp', | |
|
141 | './src/Visualization/VisualizationMultiZoneSelectionDialog.cpp', | |
|
142 | './src/Visualization/VisualizationTabWidget.cpp', | |
|
143 | './src/Visualization/VisualizationGraphHelper.cpp', | |
|
144 | './src/Visualization/VisualizationGraphRenderingDelegate.cpp', | |
|
145 | './src/Visualization/VisualizationDragDropContainer.cpp', | |
|
146 | './src/Visualization/VisualizationZoneWidget.cpp', | |
|
147 | './src/Visualization/SqpColorScale.cpp', | |
|
148 | './src/Actions/FilteringAction.cpp', | |
|
149 | './src/Actions/SelectionZoneAction.cpp', | |
|
150 | './src/Actions/ActionsGuiController.cpp', | |
|
128 | 151 | ] |
|
129 | 152 | |
|
130 | 153 | gui_inc = include_directories(['include', 'include/Visualization']) |
|
131 | 154 | |
|
132 | 155 | sciqlop_gui_lib = library('sciqlopgui', |
|
133 | 156 | gui_sources, |
|
134 | 157 | gui_moc_files, |
|
135 | 158 | rcc_files, |
|
136 | 159 | include_directories : [gui_inc], |
|
137 | 160 | dependencies : [ qt5printsupport, qt5gui, qt5widgets, qt5svg, sciqlop_core], |
|
138 | 161 | install : true |
|
139 | 162 | ) |
|
140 | 163 | |
|
141 | 164 | sciqlop_gui = declare_dependency(link_with : sciqlop_gui_lib, |
|
142 | 165 | include_directories : gui_inc, |
|
143 | 166 | dependencies : [qt5printsupport, qt5gui, qt5widgets, qt5svg, sciqlop_core]) |
|
144 | 167 | |
|
145 | 168 |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed | |
This diff has been collapsed as it changes many lines, (502 lines changed) Show them Hide them |
|
1 | NO CONTENT: file was removed | |
This diff has been collapsed as it changes many lines, (615 lines changed) Show them Hide them |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now