diff --git a/CMakeLists.txt b/CMakeLists.txt index 4706e21..ec5fff7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,10 @@ OPTION (CPPCHECK "Analyzes the source code with cppcheck" OFF) OPTION (CLANG_TIDY "Analyzes the source code with Clang Tidy" OFF) OPTION (IWYU "Analyzes the source code with Include What You Use" OFF) OPTION (Coverage "Enables code coverage" OFF) +OPTION (BUILD_APP "Build SciQLop application" ON) +OPTION (BUILD_CORE "Build SciQLop Core module" ON) +OPTION (BUILD_GUI "Build SciQLop GUI module" ON) +OPTION (BUILD_PLUGINS "Build SciQLop plugins" ON) set(CMAKE_CXX_STANDARD 17) @@ -68,17 +72,25 @@ ENDIF(Coverage) enable_testing() -find_package(SciQLOPCore CONFIG QUIET) -if (NOT SciQLOPCore_FOUND) - if(NOT IS_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/core) - message("Init submodule Core") - execute_process(COMMAND git submodule init core WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - execute_process(COMMAND git submodule update core WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) +if(BUILD_CORE) + find_package(SciQLOPCore CONFIG QUIET) + if (NOT SciQLOPCore_FOUND) + if(NOT IS_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/core) + message("Init submodule Core") + execute_process(COMMAND git submodule init core WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + execute_process(COMMAND git submodule update core WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + endif() + add_subdirectory(core) endif() - add_subdirectory(core) endif() -add_subdirectory(gui) -add_subdirectory(app) -add_subdirectory(plugins) +if(BUILD_GUI) + add_subdirectory(gui) +endif() +if(BUILD_APP) + add_subdirectory(app) +endif() +if(BUILD_PLUGINS) + add_subdirectory(plugins) +endif() #add_subdirectory(docs) diff --git a/app/src/MainWindow.cpp b/app/src/MainWindow.cpp index 54f09a0..da44097 100644 --- a/app/src/MainWindow.cpp +++ b/app/src/MainWindow.cpp @@ -49,7 +49,8 @@ Q_LOGGING_CATEGORY(LOG_MainWindow, "MainWindow") -namespace { +namespace +{ const auto LEFTMAININSPECTORWIDGETSPLITTERINDEX = 0; const auto LEFTINSPECTORSIDEPANESPLITTERINDEX = 1; const auto VIEWPLITTERINDEX = 2; @@ -57,71 +58,70 @@ const auto RIGHTINSPECTORSIDEPANESPLITTERINDEX = 3; const auto RIGHTMAININSPECTORWIDGETSPLITTERINDEX = 4; } -class MainWindow::MainWindowPrivate { +class MainWindow::MainWindowPrivate +{ public: - explicit MainWindowPrivate(MainWindow *mainWindow) - : m_LastOpenLeftInspectorSize{}, - m_LastOpenRightInspectorSize{}, - m_GeneralSettingsWidget{new SqpSettingsGeneralWidget{mainWindow}}, - m_SettingsDialog{new SqpSettingsDialog{mainWindow}}, - m_CatalogExplorer{new CatalogueExplorer{mainWindow}} + explicit MainWindowPrivate(MainWindow* mainWindow) + : m_LastOpenLeftInspectorSize {} + , m_LastOpenRightInspectorSize {} + , m_GeneralSettingsWidget { new SqpSettingsGeneralWidget { mainWindow } } + , m_SettingsDialog { new SqpSettingsDialog { mainWindow } } + //, m_CatalogExplorer { new CatalogueExplorer { mainWindow } } { } QSize m_LastOpenLeftInspectorSize; QSize m_LastOpenRightInspectorSize; /// General settings widget. MainWindow has the ownership - SqpSettingsGeneralWidget *m_GeneralSettingsWidget; + SqpSettingsGeneralWidget* m_GeneralSettingsWidget; /// Settings dialog. MainWindow has the ownership - SqpSettingsDialog *m_SettingsDialog; + SqpSettingsDialog* m_SettingsDialog; /// Catalogue dialog. MainWindow has the ownership - CatalogueExplorer *m_CatalogExplorer; + // CatalogueExplorer* m_CatalogExplorer; - bool checkDataToSave(QWidget *parentWidget); + bool checkDataToSave(QWidget* parentWidget); }; -MainWindow::MainWindow(QWidget *parent) - : QMainWindow{parent}, - m_Ui{new Ui::MainWindow}, - impl{spimpl::make_unique_impl(this)} +MainWindow::MainWindow(QWidget* parent) + : QMainWindow { parent } + , m_Ui { new Ui::MainWindow } + , impl { spimpl::make_unique_impl(this) } { m_Ui->setupUi(this); m_Ui->splitter->setCollapsible(LEFTINSPECTORSIDEPANESPLITTERINDEX, false); m_Ui->splitter->setCollapsible(RIGHTINSPECTORSIDEPANESPLITTERINDEX, false); - impl->m_CatalogExplorer->setVisualizationWidget(m_Ui->view); - - + // impl->m_CatalogExplorer->setVisualizationWidget(m_Ui->view); - - auto spacerLeftTop = new QWidget{}; + auto spacerLeftTop = new QWidget {}; spacerLeftTop->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - auto spacerLeftBottom = new QWidget{}; + auto spacerLeftBottom = new QWidget {}; spacerLeftBottom->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - auto spacerRightTop = new QWidget{}; + auto spacerRightTop = new QWidget {}; spacerRightTop->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - auto spacerRightBottom = new QWidget{}; + auto spacerRightBottom = new QWidget {}; spacerRightBottom->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); auto openInspector = [this](bool checked, bool right, auto action) { + action->setIcon( + QIcon { (checked ^ right) ? ":/icones/next.png" : ":/icones/previous.png" }); - action->setIcon(QIcon{(checked ^ right) ? ":/icones/next.png" : ":/icones/previous.png"}); - - auto &lastInspectorSize + auto& lastInspectorSize = right ? impl->m_LastOpenRightInspectorSize : impl->m_LastOpenLeftInspectorSize; auto nextInspectorSize = right ? m_Ui->rightMainInspectorWidget->size() : m_Ui->leftMainInspectorWidget->size(); // Update of the last opened geometry - if (checked) { + if (checked) + { lastInspectorSize = nextInspectorSize; } @@ -133,19 +133,20 @@ MainWindow::MainWindow(QWidget *parent) = right ? RIGHTMAININSPECTORWIDGETSPLITTERINDEX : LEFTMAININSPECTORWIDGETSPLITTERINDEX; auto currentSizes = m_Ui->splitter->sizes(); - if (checked) { + if (checked) + { // adjust sizes individually here, e.g. currentSizes[splitterInspectorIndex] -= lastInspectorSize.width(); currentSizes[VIEWPLITTERINDEX] += lastInspectorSize.width(); m_Ui->splitter->setSizes(currentSizes); } - else { + else + { // adjust sizes individually here, e.g. currentSizes[splitterInspectorIndex] += lastInspectorSize.width(); currentSizes[VIEWPLITTERINDEX] -= lastInspectorSize.width(); m_Ui->splitter->setSizes(currentSizes); } - }; @@ -159,50 +160,49 @@ MainWindow::MainWindow(QWidget *parent) impl->m_SettingsDialog->loadSettings(); // Open settings dialog and save settings if the dialog is accepted - if (impl->m_SettingsDialog->exec() == QDialog::Accepted) { + if (impl->m_SettingsDialog->exec() == QDialog::Accepted) + { impl->m_SettingsDialog->saveSettings(); } - }); auto mainToolBar = this->addToolBar(QStringLiteral("MainToolBar")); - auto timeWidget = new TimeWidget{}; + auto timeWidget = new TimeWidget {}; mainToolBar->addWidget(timeWidget); // Interaction modes - auto actionPointerMode = new QAction{QIcon(":/icones/pointer.png"), "Move", this}; + auto actionPointerMode = new QAction { QIcon(":/icones/pointer.png"), "Move", this }; actionPointerMode->setCheckable(true); - actionPointerMode->setChecked(sqpApp->plotsInteractionMode() - == SqpApplication::PlotsInteractionMode::None); + actionPointerMode->setChecked( + sqpApp->plotsInteractionMode() == SqpApplication::PlotsInteractionMode::None); connect(actionPointerMode, &QAction::triggered, - []() { sqpApp->setPlotsInteractionMode(SqpApplication::PlotsInteractionMode::None); }); + []() { sqpApp->setPlotsInteractionMode(SqpApplication::PlotsInteractionMode::None); }); - auto actionZoomMode = new QAction{QIcon(":/icones/zoom.png"), "Zoom", this}; + auto actionZoomMode = new QAction { QIcon(":/icones/zoom.png"), "Zoom", this }; actionZoomMode->setCheckable(true); - actionZoomMode->setChecked(sqpApp->plotsInteractionMode() - == SqpApplication::PlotsInteractionMode::ZoomBox); - connect(actionZoomMode, &QAction::triggered, []() { - sqpApp->setPlotsInteractionMode(SqpApplication::PlotsInteractionMode::ZoomBox); - }); + actionZoomMode->setChecked( + sqpApp->plotsInteractionMode() == SqpApplication::PlotsInteractionMode::ZoomBox); + connect(actionZoomMode, &QAction::triggered, + []() { sqpApp->setPlotsInteractionMode(SqpApplication::PlotsInteractionMode::ZoomBox); }); - auto actionOrganisationMode = new QAction{QIcon(":/icones/drag.png"), "Organize", this}; + auto actionOrganisationMode = new QAction { QIcon(":/icones/drag.png"), "Organize", this }; actionOrganisationMode->setCheckable(true); - actionOrganisationMode->setChecked(sqpApp->plotsInteractionMode() - == SqpApplication::PlotsInteractionMode::DragAndDrop); + actionOrganisationMode->setChecked( + sqpApp->plotsInteractionMode() == SqpApplication::PlotsInteractionMode::DragAndDrop); connect(actionOrganisationMode, &QAction::triggered, []() { sqpApp->setPlotsInteractionMode(SqpApplication::PlotsInteractionMode::DragAndDrop); }); - auto actionZonesMode = new QAction{QIcon(":/icones/rectangle.png"), "Zones", this}; + auto actionZonesMode = new QAction { QIcon(":/icones/rectangle.png"), "Zones", this }; actionZonesMode->setCheckable(true); - actionZonesMode->setChecked(sqpApp->plotsInteractionMode() - == SqpApplication::PlotsInteractionMode::SelectionZones); + actionZonesMode->setChecked( + sqpApp->plotsInteractionMode() == SqpApplication::PlotsInteractionMode::SelectionZones); connect(actionZonesMode, &QAction::triggered, []() { sqpApp->setPlotsInteractionMode(SqpApplication::PlotsInteractionMode::SelectionZones); }); - auto modeActionGroup = new QActionGroup{this}; + auto modeActionGroup = new QActionGroup { this }; modeActionGroup->addAction(actionZoomMode); modeActionGroup->addAction(actionZonesMode); modeActionGroup->addAction(actionOrganisationMode); @@ -217,7 +217,7 @@ MainWindow::MainWindow(QWidget *parent) mainToolBar->addSeparator(); // Cursors - auto btnCursor = new QToolButton{this}; + auto btnCursor = new QToolButton { this }; btnCursor->setIcon(QIcon(":/icones/cursor.png")); btnCursor->setText("Cursor"); btnCursor->setToolTip("Cursor"); @@ -227,43 +227,43 @@ MainWindow::MainWindow(QWidget *parent) auto noCursorAction = cursorMenu->addAction("No Cursor"); noCursorAction->setCheckable(true); - noCursorAction->setChecked(sqpApp->plotsCursorMode() - == SqpApplication::PlotsCursorMode::NoCursor); + noCursorAction->setChecked( + sqpApp->plotsCursorMode() == SqpApplication::PlotsCursorMode::NoCursor); connect(noCursorAction, &QAction::triggered, - []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::NoCursor); }); + []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::NoCursor); }); cursorMenu->addSeparator(); auto verticalCursorAction = cursorMenu->addAction("Vertical Cursor"); verticalCursorAction->setCheckable(true); - verticalCursorAction->setChecked(sqpApp->plotsCursorMode() - == SqpApplication::PlotsCursorMode::Vertical); + verticalCursorAction->setChecked( + sqpApp->plotsCursorMode() == SqpApplication::PlotsCursorMode::Vertical); connect(verticalCursorAction, &QAction::triggered, - []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::Vertical); }); + []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::Vertical); }); auto temporalCursorAction = cursorMenu->addAction("Temporal Cursor"); temporalCursorAction->setCheckable(true); - temporalCursorAction->setChecked(sqpApp->plotsCursorMode() - == SqpApplication::PlotsCursorMode::Temporal); + temporalCursorAction->setChecked( + sqpApp->plotsCursorMode() == SqpApplication::PlotsCursorMode::Temporal); connect(temporalCursorAction, &QAction::triggered, - []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::Temporal); }); + []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::Temporal); }); auto horizontalCursorAction = cursorMenu->addAction("Horizontal Cursor"); horizontalCursorAction->setCheckable(true); - horizontalCursorAction->setChecked(sqpApp->plotsCursorMode() - == SqpApplication::PlotsCursorMode::Horizontal); + horizontalCursorAction->setChecked( + sqpApp->plotsCursorMode() == SqpApplication::PlotsCursorMode::Horizontal); connect(horizontalCursorAction, &QAction::triggered, - []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::Horizontal); }); + []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::Horizontal); }); auto crossCursorAction = cursorMenu->addAction("Cross Cursor"); crossCursorAction->setCheckable(true); - crossCursorAction->setChecked(sqpApp->plotsCursorMode() - == SqpApplication::PlotsCursorMode::Cross); + crossCursorAction->setChecked( + sqpApp->plotsCursorMode() == SqpApplication::PlotsCursorMode::Cross); connect(crossCursorAction, &QAction::triggered, - []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::Cross); }); + []() { sqpApp->setPlotsCursorMode(SqpApplication::PlotsCursorMode::Cross); }); mainToolBar->addWidget(btnCursor); - auto cursorModeActionGroup = new QActionGroup{this}; + auto cursorModeActionGroup = new QActionGroup { this }; cursorModeActionGroup->setExclusive(true); cursorModeActionGroup->addAction(noCursorAction); cursorModeActionGroup->addAction(verticalCursorAction); @@ -273,43 +273,44 @@ MainWindow::MainWindow(QWidget *parent) // Catalog mainToolBar->addSeparator(); - mainToolBar->addAction(QIcon(":/icones/catalogue.png"), "Catalogues", - [this]() { impl->m_CatalogExplorer->show(); }); + // mainToolBar->addAction(QIcon(":/icones/catalogue.png"), "Catalogues", + // [this]() { impl->m_CatalogExplorer->show(); }); // //////// // // Settings // // //////// // // Registers "general settings" widget to the settings dialog - impl->m_SettingsDialog->registerWidget(QStringLiteral("General"), - impl->m_GeneralSettingsWidget); + impl->m_SettingsDialog->registerWidget( + QStringLiteral("General"), impl->m_GeneralSettingsWidget); // /////////// // // Connections // // /////////// // // Controllers / controllers connections -// connect(&sqpApp->timeController(), SIGNAL(timeUpdated(DateTimeRange)), &sqpApp->variableController(), -// SLOT(onDateTimeOnSelection(DateTimeRange))); + // connect(&sqpApp->timeController(), SIGNAL(timeUpdated(DateTimeRange)), + // &sqpApp->variableController(), + // SLOT(onDateTimeOnSelection(DateTimeRange))); // Widgets / controllers connections // DataSource - connect(&sqpApp->dataSourceController(), SIGNAL(dataSourceItemSet(DataSourceItem *)), - m_Ui->dataSourceWidget, SLOT(addDataSource(DataSourceItem *))); + connect(&sqpApp->dataSourceController(), SIGNAL(dataSourceItemSet(DataSourceItem*)), + m_Ui->dataSourceWidget, SLOT(addDataSource(DataSourceItem*))); // Time connect(timeWidget, SIGNAL(timeUpdated(DateTimeRange)), &sqpApp->timeController(), - SLOT(onTimeToUpdate(DateTimeRange))); + SLOT(onTimeToUpdate(DateTimeRange))); // Visualization connect(&sqpApp->visualizationController(), - SIGNAL(variableAboutToBeDeleted(std::shared_ptr)), m_Ui->view, - SLOT(onVariableAboutToBeDeleted(std::shared_ptr))); + SIGNAL(variableAboutToBeDeleted(std::shared_ptr)), m_Ui->view, + SLOT(onVariableAboutToBeDeleted(std::shared_ptr))); connect(&sqpApp->visualizationController(), - SIGNAL(rangeChanged(std::shared_ptr, const DateTimeRange &)), m_Ui->view, - SLOT(onRangeChanged(std::shared_ptr, const DateTimeRange &))); + SIGNAL(rangeChanged(std::shared_ptr, const DateTimeRange&)), m_Ui->view, + SLOT(onRangeChanged(std::shared_ptr, const DateTimeRange&))); // Widgets / widgets connections @@ -317,21 +318,19 @@ MainWindow::MainWindow(QWidget *parent) // potentially attach a menu to the variable's menu to do so before this menu is displayed. // The order of connections is also important, since it determines the order in which each // widget will attach its menu - connect( - m_Ui->variableInspectorWidget, - SIGNAL(tableMenuAboutToBeDisplayed(QMenu *, const QVector > &)), - m_Ui->view, SLOT(attachVariableMenu(QMenu *, const QVector > &)), + connect(m_Ui->variableInspectorWidget, + SIGNAL(tableMenuAboutToBeDisplayed(QMenu*, const QVector>&)), + m_Ui->view, SLOT(attachVariableMenu(QMenu*, const QVector>&)), Qt::DirectConnection); } -MainWindow::~MainWindow() -{ -} +MainWindow::~MainWindow() {} -void MainWindow::changeEvent(QEvent *e) +void MainWindow::changeEvent(QEvent* e) { QMainWindow::changeEvent(e); - switch (e->type()) { + switch (e->type()) + { case QEvent::LanguageChange: m_Ui->retranslateUi(this); break; @@ -340,55 +339,58 @@ void MainWindow::changeEvent(QEvent *e) } } -void MainWindow::closeEvent(QCloseEvent *event) +void MainWindow::closeEvent(QCloseEvent* event) { - if (!impl->checkDataToSave(this)) { + if (!impl->checkDataToSave(this)) + { event->ignore(); } - else { + else + { event->accept(); } } -void MainWindow::keyPressEvent(QKeyEvent *event) +void MainWindow::keyPressEvent(QKeyEvent* event) { switch (event->key()) { - case Qt::Key_F11: - if(this->isFullScreen()) - { - this->showNormal(); - } - else - { - this->showFullScreen(); - } - break; - default: - break; + case Qt::Key_F11: + if (this->isFullScreen()) + { + this->showNormal(); + } + else + { + this->showFullScreen(); + } + break; + default: + break; } } -bool MainWindow::MainWindowPrivate::checkDataToSave(QWidget *parentWidget) +bool MainWindow::MainWindowPrivate::checkDataToSave(QWidget* parentWidget) { - auto hasChanges = sqpApp->catalogueController().hasChanges(); - if (hasChanges) { - // There are some unsaved changes - switch (QMessageBox::question( - parentWidget, tr("Save changes"), - tr("The catalogue controller has unsaved changes.\nDo you want to save them ?"), - QMessageBox::SaveAll | QMessageBox::Discard | QMessageBox::Cancel, - QMessageBox::SaveAll)) { - case QMessageBox::SaveAll: - sqpApp->catalogueController().saveAll(); - break; - case QMessageBox::Discard: - break; - case QMessageBox::Cancel: - default: - return false; - } - } + // auto hasChanges = sqpApp->catalogueController().hasChanges(); + // if (hasChanges) + // { + // // There are some unsaved changes + // switch (QMessageBox::question(parentWidget, tr("Save changes"), + // tr("The catalogue controller has unsaved changes.\nDo you want to save them ?"), + // QMessageBox::SaveAll | QMessageBox::Discard | QMessageBox::Cancel, + // QMessageBox::SaveAll)) + // { + // case QMessageBox::SaveAll: + // sqpApp->catalogueController().saveAll(); + // break; + // case QMessageBox::Discard: + // break; + // case QMessageBox::Cancel: + // default: + // return false; + // } + // } return true; } diff --git a/core b/core index 5eaca9d..548ec6a 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 5eaca9d9803c4051e857e1b4064748638dab02aa +Subproject commit 548ec6a0c922e626003babc8b21a3953b777eae2 diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 687536c..23f40ef 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,9 +1,141 @@ FILE (GLOB_RECURSE gui_SRCS - include/*.h - src/*.cpp - resources/*.qrc + + include/DataSource/DataSourceWidget.h + include/DataSource/DataSourceTreeWidget.h + include/DataSource/DataSourceTreeWidgetItem.h + include/DataSource/DataSourceTreeWidgetHelper.h + include/SqpApplication.h + include/Common/ColorUtils.h + include/Common/VisualizationDef.h + include/SidePane/SqpSidePane.h + include/Catalogue2/eventsmodel.h + include/Catalogue2/eventstreeview.h + include/Catalogue2/repositoriesmodel.h +# include/Catalogue/CatalogueActionManager.h +# include/Catalogue/CatalogueTreeModel.h +# include/Catalogue/CatalogueExplorer.h +# include/Catalogue/CatalogueSideBarWidget.h +# include/Catalogue/CatalogueInspectorWidget.h +# include/Catalogue/CatalogueTreeItems/CatalogueTextTreeItem.h +# include/Catalogue/CatalogueTreeItems/CatalogueTreeItem.h +# include/Catalogue/CatalogueTreeItems/CatalogueAbstractTreeItem.h +# include/Catalogue/CatalogueEventsModel.h +# include/Catalogue/CatalogueEventsWidget.h +# include/Catalogue/CatalogueExplorerHelper.h + include/Visualization/VisualizationGraphHelper.h + include/Visualization/VisualizationTabWidget.h + include/Visualization/VisualizationDefs.h + include/Visualization/QCustomPlotSynchronizer.h + include/Visualization/QCPColorMapIterator.h + include/Visualization/operations/GenerateVariableMenuOperation.h + include/Visualization/operations/RemoveVariableOperation.h + include/Visualization/operations/FindVariableOperation.h + include/Visualization/operations/MenuBuilder.h + include/Visualization/operations/RescaleAxeOperation.h + include/Visualization/PlottablesRenderingUtils.h + include/Visualization/IVisualizationWidgetVisitor.h + include/Visualization/VisualizationGraphWidget.h + include/Visualization/IVisualizationWidget.h + include/Visualization/IVariableContainer.h + include/Visualization/SqpColorScale.h + include/Visualization/VisualizationWidget.h + include/Visualization/VisualizationZoneWidget.h + include/Visualization/VisualizationMultiZoneSelectionDialog.h + include/Visualization/VisualizationGraphRenderingDelegate.h + include/Visualization/AxisRenderingUtils.h + include/Visualization/VisualizationSelectionZoneItem.h + include/Visualization/VisualizationDragWidget.h + include/Visualization/VisualizationActionManager.h + include/Visualization/IGraphSynchronizer.h + include/Visualization/ColorScaleEditor.h + include/Visualization/MacScrollBarStyle.h + include/Visualization/VisualizationSelectionZoneManager.h + include/Visualization/qcustomplot.h + include/Visualization/VisualizationDragDropContainer.h + include/Visualization/VisualizationCursorItem.h + include/Settings/SqpSettingsDialog.h + include/Settings/SqpSettingsGeneralWidget.h + include/Variable/VariableMenuHeaderWidget.h + include/Variable/VariableInspectorTableView.h + include/Variable/VariableInspectorWidget.h + include/Variable/RenameVariableDialog.h + include/TimeWidget/TimeWidget.h + include/DragAndDrop/DragDropScroller.h + include/DragAndDrop/DragDropTabSwitcher.h + include/DragAndDrop/DragDropGuiController.h + include/Actions/FilteringAction.h + include/Actions/ActionsGuiController.h + include/Actions/SelectionZoneAction.h + + + + + src/DataSource/DataSourceTreeWidgetItem.cpp + src/DataSource/DataSourceWidget.cpp + src/DataSource/DataSourceTreeWidget.cpp + src/DataSource/DataSourceTreeWidgetHelper.cpp + src/Common/ColorUtils.cpp + src/Common/VisualizationDef.cpp + src/SidePane/SqpSidePane.cpp + src/Catalogue2/eventsmodel.cpp + src/Catalogue2/eventstreeview.cpp + src/Catalogue2/repositoriesmodel.cpp + #src/Catalogue/CatalogueEventsWidget.cpp + #src/Catalogue/CatalogueSideBarWidget.cpp + #src/Catalogue/CatalogueTreeItems/CatalogueAbstractTreeItem.cpp + #src/Catalogue/CatalogueTreeItems/CatalogueTextTreeItem.cpp + #src/Catalogue/CatalogueTreeItems/CatalogueTreeItem.cpp + #src/Catalogue/CatalogueExplorerHelper.cpp + #src/Catalogue/CatalogueExplorer.cpp + #src/Catalogue/CatalogueTreeModel.cpp + #src/Catalogue/CatalogueInspectorWidget.cpp + #src/Catalogue/CatalogueEventsModel.cpp + #src/Catalogue/CatalogueActionManager.cpp + src/Visualization/VisualizationDragDropContainer.cpp + src/Visualization/VisualizationTabWidget.cpp + src/Visualization/VisualizationWidget.cpp + src/Visualization/MacScrollBarStyle.cpp + src/Visualization/VisualizationCursorItem.cpp + src/Visualization/operations/MenuBuilder.cpp + src/Visualization/operations/RemoveVariableOperation.cpp + src/Visualization/operations/FindVariableOperation.cpp + src/Visualization/operations/GenerateVariableMenuOperation.cpp + src/Visualization/operations/RescaleAxeOperation.cpp + src/Visualization/AxisRenderingUtils.cpp + src/Visualization/PlottablesRenderingUtils.cpp + src/Visualization/VisualizationGraphRenderingDelegate.cpp + src/Visualization/VisualizationSelectionZoneManager.cpp + src/Visualization/QCPColorMapIterator.cpp + src/Visualization/ColorScaleEditor.cpp + src/Visualization/VisualizationGraphHelper.cpp + src/Visualization/VisualizationGraphWidget.cpp + src/Visualization/VisualizationDragWidget.cpp + src/Visualization/VisualizationZoneWidget.cpp + src/Visualization/VisualizationActionManager.cpp + src/Visualization/VisualizationSelectionZoneItem.cpp + src/Visualization/QCustomPlotSynchronizer.cpp + src/Visualization/qcustomplot.cpp + src/Visualization/VisualizationMultiZoneSelectionDialog.cpp + src/Visualization/SqpColorScale.cpp + src/Settings/SqpSettingsGeneralWidget.cpp + src/Settings/SqpSettingsDialog.cpp + src/SqpApplication.cpp + src/Variable/VariableInspectorWidget.cpp + src/Variable/VariableMenuHeaderWidget.cpp + src/Variable/RenameVariableDialog.cpp + src/Variable/VariableInspectorTableView.cpp + src/TimeWidget/TimeWidget.cpp + src/DragAndDrop/DragDropScroller.cpp + src/DragAndDrop/DragDropTabSwitcher.cpp + src/DragAndDrop/DragDropGuiController.cpp + src/Actions/ActionsGuiController.cpp + src/Actions/SelectionZoneAction.cpp + src/Actions/FilteringAction.cpp + + ./resources/sqpguiresources.qrc ) + QT5_WRAP_UI( UiGenerated_SRCS ui/DataSource/DataSourceWidget.ui @@ -20,10 +152,10 @@ QT5_WRAP_UI( ui/Visualization/VisualizationWidget.ui ui/Visualization/VisualizationZoneWidget.ui ui/Visualization/VisualizationMultiZoneSelectionDialog.ui - ui/Catalogue/CatalogueEventsWidget.ui - ui/Catalogue/CatalogueExplorer.ui - ui/Catalogue/CatalogueInspectorWidget.ui - ui/Catalogue/CatalogueSideBarWidget.ui + #ui/Catalogue/CatalogueEventsWidget.ui + #ui/Catalogue/CatalogueExplorer.ui + #ui/Catalogue/CatalogueInspectorWidget.ui + #ui/Catalogue/CatalogueSideBarWidget.ui ) add_library(sciqlopgui ${gui_SRCS} ${UiGenerated_SRCS}) diff --git a/gui/include/Catalogue/CatalogueEventsModel.h b/gui/include/Catalogue/CatalogueEventsModel.h index b0ba54c..a92eb45 100644 --- a/gui/include/Catalogue/CatalogueEventsModel.h +++ b/gui/include/Catalogue/CatalogueEventsModel.h @@ -5,62 +5,77 @@ #include #include #include +#include -class DBCatalogue; -class DBEvent; -class DBEventProduct; +#include Q_DECLARE_LOGGING_CATEGORY(LOG_CatalogueEventsModel) -class CatalogueEventsModel : public QAbstractItemModel { +class CatalogueEventsModel : public QAbstractItemModel +{ Q_OBJECT signals: void modelSorted(); public: - CatalogueEventsModel(QObject *parent = nullptr); - - enum class Column { Name, TStart, TEnd, Tags, Product, Validation, NbColumn }; - - void setSourceCatalogues(const QVector > &catalogues); - void setEvents(const QVector > &events); - void addEvent(const std::shared_ptr &event); - void removeEvent(const std::shared_ptr &event); - QVector > events() const; - - enum class ItemType { Root, Event, EventProduct }; - ItemType itemTypeOf(const QModelIndex &index) const; - std::shared_ptr getEvent(const QModelIndex &index) const; - std::shared_ptr getParentEvent(const QModelIndex &index) const; - std::shared_ptr getEventProduct(const QModelIndex &index) const; + CatalogueEventsModel(QObject* parent = nullptr); + + enum class Column + { + Name, + TStart, + TEnd, + Tags, + Product, + Validation, + NbColumn + }; + + void setSourceCatalogues(const QVector>& catalogues); + void setEvents(const std::vector& events); + void addEvent(const std::shared_ptr& event); + void removeEvent(const std::shared_ptr& event); + std::vector events() const; + + enum class ItemType + { + Root, + Event, + EventProduct + }; + ItemType itemTypeOf(const QModelIndex& index) const; + CatalogueController::Event_ptr getEvent(const QModelIndex& index) const; + CatalogueController::Event_ptr getParentEvent(const QModelIndex& index) const; + std::optional getEventProduct(const QModelIndex& index) const; /// Refresh the data for the specified event - void refreshEvent(const std::shared_ptr &event, bool refreshEventProducts = false); + void refreshEvent( + const CatalogueController::Event_ptr& event, bool refreshEventProducts = false); /// Returns a QModelIndex which represent the specified event - QModelIndex indexOf(const std::shared_ptr &event) const; + QModelIndex indexOf(const CatalogueController::Event_ptr& event) const; /// Marks a change flag on the specified event to allow sorting on the validation column - void setEventHasChanges(const std::shared_ptr &event, bool hasChanges); + void setEventHasChanges(const std::shared_ptr& event, bool hasChanges); /// Returns true if the specified event has unsaved changes - bool eventsHasChanges(const std::shared_ptr &event) const; + bool eventsHasChanges(const std::shared_ptr& event) const; // Model - QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; - QModelIndex parent(const QModelIndex &index) const; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - int columnCount(const QModelIndex &parent = QModelIndex()) const override; - Qt::ItemFlags flags(const QModelIndex &index) const override; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - QVariant headerData(int section, Qt::Orientation orientation, - int role = Qt::DisplayRole) const override; + QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const; + QModelIndex parent(const QModelIndex& index) const; + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + int columnCount(const QModelIndex& parent = QModelIndex()) const override; + Qt::ItemFlags flags(const QModelIndex& index) const override; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + QVariant headerData( + int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override; Qt::DropActions supportedDragActions() const override; QStringList mimeTypes() const override; - QMimeData *mimeData(const QModelIndexList &indexes) const override; + QMimeData* mimeData(const QModelIndexList& indexes) const override; private: class CatalogueEventsModelPrivate; diff --git a/gui/include/Catalogue2/eventsmodel.h b/gui/include/Catalogue2/eventsmodel.h new file mode 100644 index 0000000..88bbc73 --- /dev/null +++ b/gui/include/Catalogue2/eventsmodel.h @@ -0,0 +1,71 @@ +#ifndef EVENTSMODEL_H +#define EVENTSMODEL_H +#include +#include +#include + +class EventsModel : public QAbstractItemModel +{ + Q_OBJECT + std::vector _events; + + enum class ItemType + { + None, + Event, + Product + }; + + enum class Columns + { + Name = 0, + TStart = 1, + TEnd = 2, + Tags = 3, + Product = 4, + Validation = 5, + NbColumn = 6 + }; + + const std::array(Columns::NbColumn)> ColumnsNames + = { "Name", "Start time", "Stop time", "Tags", "Product(s)", "" }; + + +public: + EventsModel(QObject* parent = nullptr); + + + ItemType type(const QModelIndex& index) const; + + Qt::ItemFlags flags(const QModelIndex& index) const override + { + return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled; + } + QVariant data(int col, const CatalogueController::Event_ptr& event) const; + QVariant data(int col, const CatalogueController::Product_t& product) const; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + + QModelIndex index( + int row, int column, const QModelIndex& parent = QModelIndex()) const override; + + QModelIndex parent(const QModelIndex& index) const override; + + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + + int columnCount(const QModelIndex& parent = QModelIndex()) const override; + + QVariant headerData( + int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + + void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override; + +public slots: + void setEvents(std::vector events) + { + beginResetModel(); + std::swap(_events, events); + endResetModel(); + } +}; + +#endif // EVENTSMODEL_H diff --git a/gui/include/Catalogue2/eventstreeview.h b/gui/include/Catalogue2/eventstreeview.h new file mode 100644 index 0000000..e5e7581 --- /dev/null +++ b/gui/include/Catalogue2/eventstreeview.h @@ -0,0 +1,18 @@ +#ifndef EVENTSTREEVIEW_H +#define EVENTSTREEVIEW_H + +#include +#include +#include + +class EventsTreeView : public QTreeView +{ + Q_OBJECT +public: + EventsTreeView(QWidget* parent = nullptr); + +public slots: + void setEvents(std::vector events); +}; + +#endif // EVENTSTREEVIEW_H diff --git a/gui/include/Catalogue2/repositoriesmodel.h b/gui/include/Catalogue2/repositoriesmodel.h new file mode 100644 index 0000000..f6b4069 --- /dev/null +++ b/gui/include/Catalogue2/repositoriesmodel.h @@ -0,0 +1,83 @@ +#ifndef REPOSITORIESMODEL_H +#define REPOSITORIESMODEL_H +#include +#include +#include +#include + +class RepositoriesModel : public QAbstractItemModel +{ + Q_OBJECT + + + enum class ItemType + { + None, + Catalogue, + Repository + }; + + struct RepoModelItem + { + ItemType type; + std::variant item; + RepoModelItem() : type { ItemType::None } {} + RepoModelItem(const QString& repo); + RepoModelItem(const CatalogueController::Catalogue_ptr& catalogue, RepoModelItem* parent) + : type { ItemType::Catalogue } + , item { catalogue } + , parent { parent } + , icon { ":/icones/catalogue.png" } + { + } + QString repository() const { return std::get(item); } + CatalogueController::Catalogue_ptr catalogue() const + { + return std::get(item); + } + QVariant data(int role) const; + QString text() const + { + if (type == ItemType::Catalogue) + return QString::fromStdString(catalogue()->name); + if (type == ItemType::Repository) + return repository(); + return QString(); + } + std::vector> children; + RepoModelItem* parent = nullptr; + QIcon icon; + }; + + std::vector> _items; + + inline RepoModelItem* to_item(const QModelIndex& index) const + { + return static_cast(index.internalPointer()); + } + +public: + RepositoriesModel(QObject* parent = nullptr); + + ItemType type(const QModelIndex& index) const; + + Qt::ItemFlags flags(const QModelIndex& index) const override + { + return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled; + } + + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + + QModelIndex index( + int row, int column, const QModelIndex& parent = QModelIndex()) const override; + + QModelIndex parent(const QModelIndex& index) const override; + + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + + int columnCount(const QModelIndex& parent = QModelIndex()) const override { return 1; } +public slots: + void refresh(); +}; + +#endif // REPOSITORIESMODEL_H diff --git a/gui/src/Catalogue/CatalogueActionManager.cpp b/gui/src/Catalogue/CatalogueActionManager.cpp index 10f3c8b..6d99052 100644 --- a/gui/src/Catalogue/CatalogueActionManager.cpp +++ b/gui/src/Catalogue/CatalogueActionManager.cpp @@ -12,10 +12,13 @@ #include #include -#include -#include -#include -#include +//#include +//#include +//#include +//#include + +#include +#include #include #include @@ -30,80 +33,88 @@ const auto CATALOGUE_CREATE_EVENT_MENU_NAME = QObject::tr("New Event..."); const auto DEFAULT_EVENT_NAME = QObject::tr("Event"); const auto DEFAULT_CATALOGUE_NAME = QObject::tr("Catalogue"); -struct CatalogueActionManager::CatalogueActionManagerPrivate { +struct CatalogueActionManager::CatalogueActionManagerPrivate +{ - CatalogueExplorer *m_CatalogueExplorer = nullptr; - QVector > m_CreateInCatalogueActions; + CatalogueExplorer* m_CatalogueExplorer = nullptr; + QVector> m_CreateInCatalogueActions; - CatalogueActionManagerPrivate(CatalogueExplorer *catalogueExplorer) + CatalogueActionManagerPrivate(CatalogueExplorer* catalogueExplorer) : m_CatalogueExplorer(catalogueExplorer) { } - void createEventFromZones(const QString &eventName, - const QVector &zones, - const std::shared_ptr &catalogue = nullptr) + void createEventFromZones(const QString& eventName, + const QVector& zones, + const CatalogueController::Catalogue_ptr& catalogue = nullptr) { - auto event = std::make_shared(); - event->setName(eventName); + auto event = CatalogueController::make_event_ptr(); + event->name = eventName.toStdString(); - std::list productList; - for (auto zone : zones) { + // std::list productList; + for (auto zone : zones) + { auto graph = zone->parentGraphWidget(); - for (auto var : graph->variables()) { - auto eventProduct = std::make_shared(); - eventProduct->setEvent(*event); + for (auto var : graph->variables()) + { + auto eventProduct = CatalogueController::Product_t(); auto productId = var->metadata().value(DataSourceItem::ID_DATA_KEY, "UnknownID").toString(); auto zoneRange = zone->range(); - eventProduct->setTStart(zoneRange.m_TStart); - eventProduct->setTEnd(zoneRange.m_TEnd); + eventProduct.startTime = zoneRange.m_TStart; + eventProduct.stopTime = zoneRange.m_TEnd; - eventProduct->setProductId(productId); - - productList.push_back(*eventProduct); + eventProduct.name = productId.toStdString(); + event->products.push_back(std::move(eventProduct)); } } - event->setEventProducts(productList); - - sqpApp->catalogueController().addEvent(event); - - - if (catalogue) { - catalogue->addEvent(event->getUniqId()); - sqpApp->catalogueController().updateCatalogue(catalogue); - m_CatalogueExplorer->sideBarWidget().setCatalogueChanges(catalogue, true); - if (m_CatalogueExplorer->eventsWidget().displayedCatalogues().contains(catalogue)) { - m_CatalogueExplorer->eventsWidget().addEvent(event); - m_CatalogueExplorer->eventsWidget().setEventChanges(event, true); - } + sqpApp->catalogueController().add(event); + + + if (catalogue) + { + catalogue->add(event); + // TODO use notifications + // this shouldn't know GUI stuff and care about which widget to update + // sqpApp->catalogueController().updateCatalogue(catalogue); + // m_CatalogueExplorer->sideBarWidget().setCatalogueChanges(catalogue, true); + // if + // (m_CatalogueExplorer->eventsWidget().displayedCatalogues().contains(catalogue)) + // { + // m_CatalogueExplorer->eventsWidget().addEvent(event); + // m_CatalogueExplorer->eventsWidget().setEventChanges(event, true); + // } } - else if (m_CatalogueExplorer->eventsWidget().isAllEventsDisplayed()) { - m_CatalogueExplorer->eventsWidget().addEvent(event); - m_CatalogueExplorer->eventsWidget().setEventChanges(event, true); + else if (m_CatalogueExplorer->eventsWidget().isAllEventsDisplayed()) + { + // m_CatalogueExplorer->eventsWidget().addEvent(event); + // m_CatalogueExplorer->eventsWidget().setEventChanges(event, true); } } SelectionZoneAction::EnableFunction createEventEnableFuntion() const { return [](auto zones) { - // Checks that all variables in the zones doesn't refer to the same product QSet usedDatasource; - for (auto zone : zones) { + for (auto zone : zones) + { auto graph = zone->parentGraphWidget(); auto variables = graph->variables(); - for (auto var : variables) { + for (auto var : variables) + { auto datasourceId = var->metadata().value(DataSourceItem::ID_DATA_KEY).toString(); - if (!usedDatasource.contains(datasourceId)) { + if (!usedDatasource.contains(datasourceId)) + { usedDatasource.insert(datasourceId); } - else { + else + { return false; } } @@ -114,61 +125,66 @@ struct CatalogueActionManager::CatalogueActionManagerPrivate { } }; -CatalogueActionManager::CatalogueActionManager(CatalogueExplorer *catalogueExplorer) - : impl{spimpl::make_unique_impl(catalogueExplorer)} +CatalogueActionManager::CatalogueActionManager(CatalogueExplorer* catalogueExplorer) + : impl { spimpl::make_unique_impl(catalogueExplorer) } { } void CatalogueActionManager::installSelectionZoneActions() { - auto &actionController = sqpApp->actionsGuiController(); - - auto createEventAction = actionController.addSectionZoneAction( - {CATALOGUE_MENU_NAME, CATALOGUE_CREATE_EVENT_MENU_NAME}, QObject::tr("Without Catalogue"), - [this](auto zones) { impl->createEventFromZones(DEFAULT_EVENT_NAME, zones); }); - createEventAction->setEnableFunction(impl->createEventEnableFuntion()); - createEventAction->setAllowedFiltering(false); - - auto createEventInNewCatalogueAction = actionController.addSectionZoneAction( - {CATALOGUE_MENU_NAME, CATALOGUE_CREATE_EVENT_MENU_NAME}, QObject::tr("In New Catalogue"), - [this](auto zones) { - - auto newCatalogue = std::make_shared(); - newCatalogue->setName(DEFAULT_CATALOGUE_NAME); - sqpApp->catalogueController().addCatalogue(newCatalogue); - impl->m_CatalogueExplorer->sideBarWidget().addCatalogue(newCatalogue, - REPOSITORY_DEFAULT); - - impl->createEventFromZones(DEFAULT_EVENT_NAME, zones, newCatalogue); - }); - createEventInNewCatalogueAction->setEnableFunction(impl->createEventEnableFuntion()); - createEventInNewCatalogueAction->setAllowedFiltering(false); - - refreshCreateInCatalogueAction(); - - actionController.addFilterForMenu({CATALOGUE_MENU_NAME, CATALOGUE_CREATE_EVENT_MENU_NAME}); + // auto &actionController = sqpApp->actionsGuiController(); + + // auto createEventAction = actionController.addSectionZoneAction( + // {CATALOGUE_MENU_NAME, CATALOGUE_CREATE_EVENT_MENU_NAME}, QObject::tr("Without + // Catalogue"), [this](auto zones) { impl->createEventFromZones(DEFAULT_EVENT_NAME, + // zones); }); + // createEventAction->setEnableFunction(impl->createEventEnableFuntion()); + // createEventAction->setAllowedFiltering(false); + + // auto createEventInNewCatalogueAction = actionController.addSectionZoneAction( + // {CATALOGUE_MENU_NAME, CATALOGUE_CREATE_EVENT_MENU_NAME}, QObject::tr("In New + // Catalogue"), [this](auto zones) { + + // auto newCatalogue = std::make_shared(); + // newCatalogue->setName(DEFAULT_CATALOGUE_NAME); + // sqpApp->catalogueController().addCatalogue(newCatalogue); + // impl->m_CatalogueExplorer->sideBarWidget().addCatalogue(newCatalogue, + // REPOSITORY_DEFAULT); + + // impl->createEventFromZones(DEFAULT_EVENT_NAME, zones, newCatalogue); + // }); + // createEventInNewCatalogueAction->setEnableFunction(impl->createEventEnableFuntion()); + // createEventInNewCatalogueAction->setAllowedFiltering(false); + + // refreshCreateInCatalogueAction(); + + // actionController.addFilterForMenu({CATALOGUE_MENU_NAME, + // CATALOGUE_CREATE_EVENT_MENU_NAME}); } void CatalogueActionManager::refreshCreateInCatalogueAction() { - auto &actionController = sqpApp->actionsGuiController(); - - for (auto action : impl->m_CreateInCatalogueActions) { - actionController.removeAction(action); - } - impl->m_CreateInCatalogueActions.clear(); - - auto allCatalogues - = impl->m_CatalogueExplorer->sideBarWidget().getCatalogues(REPOSITORY_DEFAULT); - - for (auto catalogue : allCatalogues) { - auto catalogueName = catalogue->getName(); - auto createEventInCatalogueAction = actionController.addSectionZoneAction( - {CATALOGUE_MENU_NAME, CATALOGUE_CREATE_EVENT_MENU_NAME}, - QObject::tr("In \"").append(catalogueName).append("\""), [this, catalogue](auto zones) { - impl->createEventFromZones(DEFAULT_EVENT_NAME, zones, catalogue); - }); - createEventInCatalogueAction->setEnableFunction(impl->createEventEnableFuntion()); - impl->m_CreateInCatalogueActions << createEventInCatalogueAction; - } + // auto& actionController = sqpApp->actionsGuiController(); + + // for (auto action : impl->m_CreateInCatalogueActions) + // { + // actionController.removeAction(action); + // } + // impl->m_CreateInCatalogueActions.clear(); + + // auto allCatalogues + // = impl->m_CatalogueExplorer->sideBarWidget().getCatalogues(REPOSITORY_DEFAULT); + + // for (auto catalogue : allCatalogues) + // { + // auto catalogueName = catalogue->getName(); + // auto createEventInCatalogueAction = actionController.addSectionZoneAction( + // { CATALOGUE_MENU_NAME, CATALOGUE_CREATE_EVENT_MENU_NAME }, + // QObject::tr("In \"").append(catalogueName).append("\""), [this, catalogue](auto + // zones) { + // impl->createEventFromZones(DEFAULT_EVENT_NAME, zones, catalogue); + // }); + // createEventInCatalogueAction->setEnableFunction(impl->createEventEnableFuntion()); + // impl->m_CreateInCatalogueActions << createEventInCatalogueAction; + // } } diff --git a/gui/src/Catalogue/CatalogueEventsModel.cpp b/gui/src/Catalogue/CatalogueEventsModel.cpp index 0a3571b..db27a73 100644 --- a/gui/src/Catalogue/CatalogueEventsModel.cpp +++ b/gui/src/Catalogue/CatalogueEventsModel.cpp @@ -3,10 +3,8 @@ #include #include #include -#include -#include -#include #include +#include #include #include