CatalogueExplorer.cpp
31 lines
| 934 B
| text/x-c
|
CppLexer
r1128 | #include "Catalogue/CatalogueExplorer.h" | |||
#include "ui_CatalogueExplorer.h" | ||||
r1162 | #include <DBCatalogue.h> | |||
#include <DBEvent.h> | ||||
r1128 | CatalogueExplorer::CatalogueExplorer(QWidget *parent) | |||
r1135 | : QDialog(parent, Qt::Dialog | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint), | |||
ui(new Ui::CatalogueExplorer) | ||||
r1128 | { | |||
ui->setupUi(this); | ||||
r1138 | ||||
r1162 | connect(ui->catalogues, &CatalogueSideBarWidget::catalogueSelected, [this](auto catalogue) { | |||
ui->inspector->setCatalogue(catalogue); | ||||
ui->events->populateWithCatalogue(catalogue); | ||||
r1138 | }); | |||
r1164 | connect(ui->events, &CatalogueEventsWidget::eventsSelected, [this](auto events) { | |||
if (events.count() == 1) { | ||||
ui->inspector->setEvent(events.first()); | ||||
} | ||||
else { | ||||
ui->inspector->showPage(CatalogueInspectorWidget::Page::Empty); | ||||
} | ||||
}); | ||||
r1128 | } | |||
CatalogueExplorer::~CatalogueExplorer() | ||||
{ | ||||
delete ui; | ||||
} | ||||