##// END OF EJS Templates
Add a button in the application toolbar to open the catalogues
trabillard -
r1094:1d52e9600333
parent child
Show More
1 NO CONTENT: new file 100644, binary diff hidden
@@ -22,6 +22,7
22 22 #include "MainWindow.h"
23 23 #include "ui_MainWindow.h"
24 24
25 #include <Catalogue/CatalogueExplorer.h>
25 26 #include <DataSource/DataSourceController.h>
26 27 #include <DataSource/DataSourceWidget.h>
27 28 #include <Settings/SqpSettingsDialog.h>
@@ -60,7 +61,8 public:
60 61 : m_LastOpenLeftInspectorSize{},
61 62 m_LastOpenRightInspectorSize{},
62 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 72 SqpSettingsGeneralWidget *m_GeneralSettingsWidget;
71 73 /// Settings dialog. MainWindow has the ownership
72 74 SqpSettingsDialog *m_SettingsDialog;
75 /// Catalogue dialog. MainWindow has the ownership
76 CatalogueExplorer *m_CatalogExplorer;
73 77 };
74 78
75 79 MainWindow::MainWindow(QWidget *parent)
@@ -189,6 +193,7 MainWindow::MainWindow(QWidget *parent)
189 193 auto timeWidget = new TimeWidget{};
190 194 mainToolBar->addWidget(timeWidget);
191 195
196 // Interaction modes
192 197 auto actionPointerMode = new QAction{QIcon(":/icones/pointer.png"), "Move", this};
193 198 actionPointerMode->setCheckable(true);
194 199 actionPointerMode->setChecked(sqpApp->plotsInteractionMode()
@@ -234,6 +239,7 MainWindow::MainWindow(QWidget *parent)
234 239 mainToolBar->addAction(actionZonesMode);
235 240 mainToolBar->addSeparator();
236 241
242 // Cursors
237 243 auto btnCursor = new QToolButton{this};
238 244 btnCursor->setIcon(QIcon(":/icones/cursor.png"));
239 245 btnCursor->setText("Cursor");
@@ -288,6 +294,11 MainWindow::MainWindow(QWidget *parent)
288 294 cursorModeActionGroup->addAction(horizontalCursorAction);
289 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 303 // Settings //
293 304 // //////// //
@@ -18,5 +18,6
18 18 <file>icones/drag.png</file>
19 19 <file>icones/cursor.png</file>
20 20 <file>icones/pointer.png</file>
21 <file>icones/catalogue.png</file>
21 22 </qresource>
22 23 </RCC>
General Comments 0
You need to be logged in to leave comments. Login now