CatalogueInspectorWidget.cpp
36 lines
| 981 B
| text/x-c
|
CppLexer
r1130 | #include "Catalogue/CatalogueInspectorWidget.h" | |||
#include "ui_CatalogueInspectorWidget.h" | ||||
CatalogueInspectorWidget::CatalogueInspectorWidget(QWidget *parent) | ||||
: QWidget(parent), ui(new Ui::CatalogueInspectorWidget) | ||||
{ | ||||
ui->setupUi(this); | ||||
r1134 | showPage(Page::Empty); | |||
r1130 | } | |||
CatalogueInspectorWidget::~CatalogueInspectorWidget() | ||||
{ | ||||
delete ui; | ||||
} | ||||
r1134 | ||||
void CatalogueInspectorWidget::showPage(CatalogueInspectorWidget::Page page) | ||||
{ | ||||
ui->stackedWidget->setCurrentIndex(static_cast<int>(page)); | ||||
} | ||||
CatalogueInspectorWidget::Page CatalogueInspectorWidget::currentPage() const | ||||
{ | ||||
return static_cast<Page>(ui->stackedWidget->currentIndex()); | ||||
} | ||||
r1140 | ||||
void CatalogueInspectorWidget::setEvent(const QString &event) | ||||
{ | ||||
showPage(Page::EventProperties); | ||||
ui->leEventName->setText(event); | ||||
} | ||||
void CatalogueInspectorWidget::setCatalogue(const QString &catalogue) | ||||
{ | ||||
showPage(Page::CatalogueProperties); | ||||
ui->leCatalogueName->setText(catalogue); | ||||
} | ||||