##// END OF EJS Templates
updates gitignore
updates gitignore

File last commit:

r1176:20294bb49a24
r1179:52fa8e51cba2
Show More
CatalogueInspectorWidget.cpp
56 lines | 1.6 KiB | text/x-c | CppLexer
/ gui / src / Catalogue / CatalogueInspectorWidget.cpp
Sub widget classes
r1130 #include "Catalogue/CatalogueInspectorWidget.h"
#include "ui_CatalogueInspectorWidget.h"
Display catalogues and events with CatalogueAPI
r1162 #include <Common/DateUtils.h>
#include <DBCatalogue.h>
#include <DBEvent.h>
#include <DBTag.h>
Sub widget classes
r1130 CatalogueInspectorWidget::CatalogueInspectorWidget(QWidget *parent)
: QWidget(parent), ui(new Ui::CatalogueInspectorWidget)
{
ui->setupUi(this);
Inspector
r1134 showPage(Page::Empty);
Sub widget classes
r1130 }
CatalogueInspectorWidget::~CatalogueInspectorWidget()
{
delete ui;
}
Inspector
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());
}
Skeleton to fill the inspector with the selection
r1140
Adaptation to the shared pointers of catalogue controller
r1176 void CatalogueInspectorWidget::setEvent(const std::shared_ptr<DBEvent> &event)
Skeleton to fill the inspector with the selection
r1140 {
showPage(Page::EventProperties);
Adaptation to the shared pointers of catalogue controller
r1176 ui->leEventName->setText(event->getName());
ui->leEventMission->setText(event->getMission());
ui->leEventProduct->setText(event->getProduct());
Display catalogues and events with CatalogueAPI
r1162
QString tagList;
Adaptation to the shared pointers of catalogue controller
r1176 auto tags = event->getTags();
Display catalogues and events with CatalogueAPI
r1162 for (auto tag : tags) {
tagList += tag.getName();
tagList += ' ';
}
ui->leEventTags->setText(tagList);
Adaptation to the shared pointers of catalogue controller
r1176 ui->dateTimeEventTStart->setDateTime(DateUtils::dateTime(event->getTStart()));
ui->dateTimeEventTEnd->setDateTime(DateUtils::dateTime(event->getTEnd()));
Skeleton to fill the inspector with the selection
r1140 }
Adaptation to the shared pointers of catalogue controller
r1176 void CatalogueInspectorWidget::setCatalogue(const std::shared_ptr<DBCatalogue> &catalogue)
Skeleton to fill the inspector with the selection
r1140 {
showPage(Page::CatalogueProperties);
Adaptation to the shared pointers of catalogue controller
r1176 ui->leCatalogueName->setText(catalogue->getName());
ui->leCatalogueAuthor->setText(catalogue->getAuthor());
Skeleton to fill the inspector with the selection
r1140 }