##// END OF EJS Templates
Displays all events
trabillard -
r1160:74146413d633
parent child
Show More
@@ -36,6 +36,7 public:
36
36
37 public slots:
37 public slots:
38 void populateWithCatalogues(const QVector<std::shared_ptr<DBCatalogue> > &catalogues);
38 void populateWithCatalogues(const QVector<std::shared_ptr<DBCatalogue> > &catalogues);
39 void populateWithAllEvents();
39
40
40 private:
41 private:
41 Ui::CatalogueEventsWidget *ui;
42 Ui::CatalogueEventsWidget *ui;
@@ -314,3 +314,15 void CatalogueEventsWidget::populateWithCatalogues(
314
314
315 impl->setEvents(events, ui->treeView);
315 impl->setEvents(events, ui->treeView);
316 }
316 }
317
318 void CatalogueEventsWidget::populateWithAllEvents()
319 {
320 auto allEvents = sqpApp->catalogueController().retrieveAllEvents();
321
322 QVector<std::shared_ptr<DBEvent> > events;
323 for (auto event : allEvents) {
324 events << event;
325 }
326
327 impl->setEvents(events, ui->treeView);
328 }
@@ -34,8 +34,10 CatalogueExplorer::CatalogueExplorer(QWidget *parent)
34 connect(ui->catalogues, &CatalogueSideBarWidget::trashSelected,
34 connect(ui->catalogues, &CatalogueSideBarWidget::trashSelected,
35 [this]() { ui->inspector->showPage(CatalogueInspectorWidget::Page::Empty); });
35 [this]() { ui->inspector->showPage(CatalogueInspectorWidget::Page::Empty); });
36
36
37 connect(ui->catalogues, &CatalogueSideBarWidget::allEventsSelected,
37 connect(ui->catalogues, &CatalogueSideBarWidget::allEventsSelected, [this]() {
38 [this]() { ui->inspector->showPage(CatalogueInspectorWidget::Page::Empty); });
38 ui->inspector->showPage(CatalogueInspectorWidget::Page::Empty);
39 ui->events->populateWithAllEvents();
40 });
39
41
40 connect(ui->catalogues, &CatalogueSideBarWidget::selectionCleared,
42 connect(ui->catalogues, &CatalogueSideBarWidget::selectionCleared,
41 [this]() { ui->inspector->showPage(CatalogueInspectorWidget::Page::Empty); });
43 [this]() { ui->inspector->showPage(CatalogueInspectorWidget::Page::Empty); });
General Comments 0
You need to be logged in to leave comments. Login now