From ffe37c282008c7578e862bff5826df8bf614c461 2019-04-30 15:56:51 From: Alexis Jeandet Date: 2019-04-30 15:56:51 Subject: [PATCH] Set revision to 1.1.0 some work to bring back catalogs Signed-off-by: Alexis Jeandet --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d038079..21bd188 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.6) -set(SCIQLOP_VERSION 1.0.0) +set(SCIQLOP_VERSION 1.1.0) project(SciQLOP VERSION ${SCIQLOP_VERSION} DESCRIPTION "SciQLOP (SCIentific Qt application for Learning from Observations of Plasmas) is an ergonomic and powerful tool enabling visualization and analysis of in situ spacecraft plasma data." diff --git a/app/src/MainWindow.cpp b/app/src/MainWindow.cpp index 5133a0a..f0d4cfc 100644 --- a/app/src/MainWindow.cpp +++ b/app/src/MainWindow.cpp @@ -23,7 +23,7 @@ #include "ui_MainWindow.h" #include -//#include +#include #include #include #include @@ -64,7 +64,7 @@ public: , m_LastOpenRightInspectorSize {} , m_GeneralSettingsWidget { new SqpSettingsGeneralWidget { mainWindow } } , m_SettingsDialog { new SqpSettingsDialog { mainWindow } } - //, m_CatalogExplorer { new CatalogueExplorer { mainWindow } } + , m_CatalogExplorer { new CataloguesBrowser { mainWindow } } { } @@ -75,7 +75,7 @@ public: /// Settings dialog. MainWindow has the ownership SqpSettingsDialog* m_SettingsDialog; /// Catalogue dialog. MainWindow has the ownership - // CatalogueExplorer* m_CatalogExplorer; + CataloguesBrowser* m_CatalogExplorer; bool checkDataToSave(QWidget* parentWidget); }; @@ -272,8 +272,8 @@ 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 // diff --git a/core b/core index 854c014..39bf3ff 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 854c0145877d96f95e0fb6ba08e32cb15cd49cf9 +Subproject commit 39bf3ff40b41fc01170241f3e471c708c866118b diff --git a/gui/include/Catalogue2/browser.h b/gui/include/Catalogue2/browser.h index a154d35..45df41e 100644 --- a/gui/include/Catalogue2/browser.h +++ b/gui/include/Catalogue2/browser.h @@ -1,27 +1,30 @@ #ifndef BROWSER_H #define BROWSER_H -#include #include +#include -namespace Ui { +namespace Ui +{ class Browser; } -class Browser : public QWidget +class CataloguesBrowser : public QWidget { Q_OBJECT public: - explicit Browser(QWidget *parent = nullptr); - ~Browser(); + explicit CataloguesBrowser(QWidget* parent = nullptr); + ~CataloguesBrowser(); private slots: void repositorySelected(const QString& repo); void catalogueSelected(const CatalogueController::Catalogue_ptr& catalogue); void eventSelected(const CatalogueController::Event_ptr& event); - void productSelected(const CatalogueController::Product_t& product, const CatalogueController::Event_ptr& event); + void productSelected( + const CatalogueController::Product_t& product, const CatalogueController::Event_ptr& event); + private: - Ui::Browser *ui; + Ui::Browser* ui; }; #endif // BROWSER_H diff --git a/gui/src/Catalogue2/browser.cpp b/gui/src/Catalogue2/browser.cpp index ebc568b..182472f 100644 --- a/gui/src/Catalogue2/browser.cpp +++ b/gui/src/Catalogue2/browser.cpp @@ -2,23 +2,25 @@ #include "ui_browser.h" #include -Browser::Browser(QWidget* parent) : QWidget(parent), ui(new Ui::Browser) +CataloguesBrowser::CataloguesBrowser(QWidget* parent) + : QWidget(parent, Qt::Window), ui(new Ui::Browser) { ui->setupUi(this); connect(ui->repositories, &RepositoriesTreeView::repositorySelected, this, - &Browser::repositorySelected); + &CataloguesBrowser::repositorySelected); connect(ui->repositories, &RepositoriesTreeView::catalogueSelected, this, - &Browser::catalogueSelected); - connect(ui->events, &EventsTreeView::eventSelected, this, &Browser::eventSelected); - connect(ui->events, &EventsTreeView::productSelected, this, &Browser::productSelected); + &CataloguesBrowser::catalogueSelected); + connect(ui->events, &EventsTreeView::eventSelected, this, &CataloguesBrowser::eventSelected); + connect( + ui->events, &EventsTreeView::productSelected, this, &CataloguesBrowser::productSelected); } -Browser::~Browser() +CataloguesBrowser::~CataloguesBrowser() { delete ui; } -void Browser::repositorySelected(const QString& repo) +void CataloguesBrowser::repositorySelected(const QString& repo) { this->ui->Infos->setCurrentIndex(0); this->ui->events->setEvents(sqpApp->catalogueController().events(repo)); @@ -29,7 +31,7 @@ void Browser::repositorySelected(const QString& repo) QString::number(sqpApp->catalogueController().events(repo).size())); } -void Browser::catalogueSelected(const CatalogueController::Catalogue_ptr& catalogue) +void CataloguesBrowser::catalogueSelected(const CatalogueController::Catalogue_ptr& catalogue) { this->ui->Infos->setCurrentIndex(1); this->ui->events->setEvents(sqpApp->catalogueController().events(catalogue)); @@ -37,14 +39,15 @@ void Browser::catalogueSelected(const CatalogueController::Catalogue_ptr& catalo QString::number(sqpApp->catalogueController().events(catalogue).size())); } -void Browser::eventSelected(const CatalogueController::Event_ptr& event) +void CataloguesBrowser::eventSelected(const CatalogueController::Event_ptr& event) { this->ui->Infos->setCurrentIndex(2); this->ui->Event->setEvent(event); } -void Browser::productSelected(const CatalogueController::Product_t& product, const CatalogueController::Event_ptr& event) +void CataloguesBrowser::productSelected( + const CatalogueController::Product_t& product, const CatalogueController::Event_ptr& event) { this->ui->Infos->setCurrentIndex(2); - this->ui->Event->setProduct(product,event); + this->ui->Event->setProduct(product, event); } diff --git a/gui/tests/catalogue/browser/main.cpp b/gui/tests/catalogue/browser/main.cpp index b7f991c..2b942cb 100644 --- a/gui/tests/catalogue/browser/main.cpp +++ b/gui/tests/catalogue/browser/main.cpp @@ -48,7 +48,7 @@ int main(int argc, char* argv[]) QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); SqpApplication a { argc, argv }; - Browser w; + CataloguesBrowser w; sqpApp->catalogueController().add("test"); sqpApp->catalogueController().add("stuff"); sqpApp->catalogueController().add("default"); diff --git a/meson.build b/meson.build index 297774a..977bbb8 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('SciQLOP', 'cpp',default_options : ['cpp_std=c++17'], meson_version:'>=0.47.0') -add_global_arguments('-DSCIQLOP_VERSION="1.0.0"', language : 'cpp') +add_global_arguments('-DSCIQLOP_VERSION="1.1.0"', language : 'cpp') qt5 = import('qt5') qt5core = dependency('qt5', modules : 'Core')