diff --git a/gui/include/Catalogue/CatalogueInspectorWidget.h b/gui/include/Catalogue/CatalogueInspectorWidget.h index d08f208..4eb2e36 100644 --- a/gui/include/Catalogue/CatalogueInspectorWidget.h +++ b/gui/include/Catalogue/CatalogueInspectorWidget.h @@ -1,5 +1,5 @@ -#ifndef CATALOGUEINSPECTORWIDGET_H -#define CATALOGUEINSPECTORWIDGET_H +#ifndef SCIQLOP_CATALOGUEINSPECTORWIDGET_H +#define SCIQLOP_CATALOGUEINSPECTORWIDGET_H #include @@ -12,10 +12,18 @@ class CatalogueInspectorWidget : public QWidget { public: explicit CatalogueInspectorWidget(QWidget *parent = 0); - ~CatalogueInspectorWidget(); + virtual ~CatalogueInspectorWidget(); + + /// Enum matching the pages inside the stacked widget + enum class Page { Empty, CatalogueProperties, EventProperties }; + + Page currentPage() const; + +public slots: + void showPage(Page page); private: Ui::CatalogueInspectorWidget *ui; }; -#endif // CATALOGUEINSPECTORWIDGET_H +#endif // SCIQLOP_CATALOGUEINSPECTORWIDGET_H diff --git a/gui/src/Catalogue/CatalogueInspectorWidget.cpp b/gui/src/Catalogue/CatalogueInspectorWidget.cpp index 1e3ee05..6ef48cc 100644 --- a/gui/src/Catalogue/CatalogueInspectorWidget.cpp +++ b/gui/src/Catalogue/CatalogueInspectorWidget.cpp @@ -5,9 +5,20 @@ CatalogueInspectorWidget::CatalogueInspectorWidget(QWidget *parent) : QWidget(parent), ui(new Ui::CatalogueInspectorWidget) { ui->setupUi(this); + showPage(Page::Empty); } CatalogueInspectorWidget::~CatalogueInspectorWidget() { delete ui; } + +void CatalogueInspectorWidget::showPage(CatalogueInspectorWidget::Page page) +{ + ui->stackedWidget->setCurrentIndex(static_cast(page)); +} + +CatalogueInspectorWidget::Page CatalogueInspectorWidget::currentPage() const +{ + return static_cast(ui->stackedWidget->currentIndex()); +} diff --git a/gui/ui/Catalogue/CatalogueInspectorWidget.ui b/gui/ui/Catalogue/CatalogueInspectorWidget.ui index cfe1955..a48ffea 100644 --- a/gui/ui/Catalogue/CatalogueInspectorWidget.ui +++ b/gui/ui/Catalogue/CatalogueInspectorWidget.ui @@ -14,18 +14,30 @@ Form + + 0 + + + 0 + + + 0 + + + 0 + - - - Inspector + + + QFrame::Box - - false + + QFrame::Sunken + + + 1 - - 0 - 0 @@ -41,35 +53,36 @@ - 0 + 2 + - + Name - + - + Author - + - + Qt::Vertical @@ -82,71 +95,85 @@ + + + + + 10 + 75 + true + + + + Catalogue Properties + + + - + - + TStart - + Tags - + Product - + - + Tend - + - + Mission - + - + - Event Name + Name - + - + - + Qt::Vertical @@ -159,6 +186,20 @@ + + + + + 10 + 75 + true + + + + Event Properties + + +