##// END OF EJS Templates
Add a button in the application toolbar to open the catalogues
trabillard -
r1129:1d52e9600333
parent child
Show More
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -22,6 +22,7
22 #include "MainWindow.h"
22 #include "MainWindow.h"
23 #include "ui_MainWindow.h"
23 #include "ui_MainWindow.h"
24
24
25 #include <Catalogue/CatalogueExplorer.h>
25 #include <DataSource/DataSourceController.h>
26 #include <DataSource/DataSourceController.h>
26 #include <DataSource/DataSourceWidget.h>
27 #include <DataSource/DataSourceWidget.h>
27 #include <Settings/SqpSettingsDialog.h>
28 #include <Settings/SqpSettingsDialog.h>
@@ -60,7 +61,8 public:
60 : m_LastOpenLeftInspectorSize{},
61 : m_LastOpenLeftInspectorSize{},
61 m_LastOpenRightInspectorSize{},
62 m_LastOpenRightInspectorSize{},
62 m_GeneralSettingsWidget{new SqpSettingsGeneralWidget{mainWindow}},
63 m_GeneralSettingsWidget{new SqpSettingsGeneralWidget{mainWindow}},
63 m_SettingsDialog{new SqpSettingsDialog{mainWindow}}
64 m_SettingsDialog{new SqpSettingsDialog{mainWindow}},
65 m_CatalogExplorer{new CatalogueExplorer{mainWindow}}
64 {
66 {
65 }
67 }
66
68
@@ -70,6 +72,8 public:
70 SqpSettingsGeneralWidget *m_GeneralSettingsWidget;
72 SqpSettingsGeneralWidget *m_GeneralSettingsWidget;
71 /// Settings dialog. MainWindow has the ownership
73 /// Settings dialog. MainWindow has the ownership
72 SqpSettingsDialog *m_SettingsDialog;
74 SqpSettingsDialog *m_SettingsDialog;
75 /// Catalogue dialog. MainWindow has the ownership
76 CatalogueExplorer *m_CatalogExplorer;
73 };
77 };
74
78
75 MainWindow::MainWindow(QWidget *parent)
79 MainWindow::MainWindow(QWidget *parent)
@@ -189,6 +193,7 MainWindow::MainWindow(QWidget *parent)
189 auto timeWidget = new TimeWidget{};
193 auto timeWidget = new TimeWidget{};
190 mainToolBar->addWidget(timeWidget);
194 mainToolBar->addWidget(timeWidget);
191
195
196 // Interaction modes
192 auto actionPointerMode = new QAction{QIcon(":/icones/pointer.png"), "Move", this};
197 auto actionPointerMode = new QAction{QIcon(":/icones/pointer.png"), "Move", this};
193 actionPointerMode->setCheckable(true);
198 actionPointerMode->setCheckable(true);
194 actionPointerMode->setChecked(sqpApp->plotsInteractionMode()
199 actionPointerMode->setChecked(sqpApp->plotsInteractionMode()
@@ -234,6 +239,7 MainWindow::MainWindow(QWidget *parent)
234 mainToolBar->addAction(actionZonesMode);
239 mainToolBar->addAction(actionZonesMode);
235 mainToolBar->addSeparator();
240 mainToolBar->addSeparator();
236
241
242 // Cursors
237 auto btnCursor = new QToolButton{this};
243 auto btnCursor = new QToolButton{this};
238 btnCursor->setIcon(QIcon(":/icones/cursor.png"));
244 btnCursor->setIcon(QIcon(":/icones/cursor.png"));
239 btnCursor->setText("Cursor");
245 btnCursor->setText("Cursor");
@@ -288,6 +294,11 MainWindow::MainWindow(QWidget *parent)
288 cursorModeActionGroup->addAction(horizontalCursorAction);
294 cursorModeActionGroup->addAction(horizontalCursorAction);
289 cursorModeActionGroup->addAction(crossCursorAction);
295 cursorModeActionGroup->addAction(crossCursorAction);
290
296
297 // Catalog
298 mainToolBar->addSeparator();
299 mainToolBar->addAction(QIcon(":/icones/catalogue.png"), "Catalogues",
300 [this]() { impl->m_CatalogExplorer->show(); });
301
291 // //////// //
302 // //////// //
292 // Settings //
303 // Settings //
293 // //////// //
304 // //////// //
@@ -18,5 +18,6
18 <file>icones/drag.png</file>
18 <file>icones/drag.png</file>
19 <file>icones/cursor.png</file>
19 <file>icones/cursor.png</file>
20 <file>icones/pointer.png</file>
20 <file>icones/pointer.png</file>
21 <file>icones/catalogue.png</file>
21 </qresource>
22 </qresource>
22 </RCC>
23 </RCC>
General Comments 3
Under Review
author

Auto status change to "Under Review"

Approved

Status change > Approved

You need to be logged in to leave comments. Login now