##// END OF EJS Templates
Skeleton to fill the inspector with the selection
trabillard -
r1140:342312d662e7
parent child
Show More
@@ -1,31 +1,31
1 #ifndef SCIQLOP_CATALOGUEEVENTSWIDGET_H
1 #ifndef SCIQLOP_CATALOGUEEVENTSWIDGET_H
2 #define SCIQLOP_CATALOGUEEVENTSWIDGET_H
2 #define SCIQLOP_CATALOGUEEVENTSWIDGET_H
3
3
4 #include <Common/spimpl.h>
4 #include <Common/spimpl.h>
5 #include <QWidget>
5 #include <QWidget>
6
6
7 namespace Ui {
7 namespace Ui {
8 class CatalogueEventsWidget;
8 class CatalogueEventsWidget;
9 }
9 }
10
10
11 class CatalogueEventsWidget : public QWidget {
11 class CatalogueEventsWidget : public QWidget {
12 Q_OBJECT
12 Q_OBJECT
13
13
14 signals:
14 signals:
15 void eventSelected();
15 void eventSelected(const QString &event);
16
16
17 public:
17 public:
18 explicit CatalogueEventsWidget(QWidget *parent = 0);
18 explicit CatalogueEventsWidget(QWidget *parent = 0);
19 virtual ~CatalogueEventsWidget();
19 virtual ~CatalogueEventsWidget();
20
20
21 public slots:
21 public slots:
22 void populateWithCatalogue(const QString &catalogue);
22 void populateWithCatalogue(const QString &catalogue);
23
23
24 private:
24 private:
25 Ui::CatalogueEventsWidget *ui;
25 Ui::CatalogueEventsWidget *ui;
26
26
27 class CatalogueEventsWidgetPrivate;
27 class CatalogueEventsWidgetPrivate;
28 spimpl::unique_impl_ptr<CatalogueEventsWidgetPrivate> impl;
28 spimpl::unique_impl_ptr<CatalogueEventsWidgetPrivate> impl;
29 };
29 };
30
30
31 #endif // SCIQLOP_CATALOGUEEVENTSWIDGET_H
31 #endif // SCIQLOP_CATALOGUEEVENTSWIDGET_H
@@ -1,29 +1,32
1 #ifndef SCIQLOP_CATALOGUEINSPECTORWIDGET_H
1 #ifndef SCIQLOP_CATALOGUEINSPECTORWIDGET_H
2 #define SCIQLOP_CATALOGUEINSPECTORWIDGET_H
2 #define SCIQLOP_CATALOGUEINSPECTORWIDGET_H
3
3
4 #include <QWidget>
4 #include <QWidget>
5
5
6 namespace Ui {
6 namespace Ui {
7 class CatalogueInspectorWidget;
7 class CatalogueInspectorWidget;
8 }
8 }
9
9
10 class CatalogueInspectorWidget : public QWidget {
10 class CatalogueInspectorWidget : public QWidget {
11 Q_OBJECT
11 Q_OBJECT
12
12
13 public:
13 public:
14 explicit CatalogueInspectorWidget(QWidget *parent = 0);
14 explicit CatalogueInspectorWidget(QWidget *parent = 0);
15 virtual ~CatalogueInspectorWidget();
15 virtual ~CatalogueInspectorWidget();
16
16
17 /// Enum matching the pages inside the stacked widget
17 /// Enum matching the pages inside the stacked widget
18 enum class Page { Empty, CatalogueProperties, EventProperties };
18 enum class Page { Empty, CatalogueProperties, EventProperties };
19
19
20 Page currentPage() const;
20 Page currentPage() const;
21
21
22 void setEvent(const QString &event);
23 void setCatalogue(const QString &catalogue);
24
22 public slots:
25 public slots:
23 void showPage(Page page);
26 void showPage(Page page);
24
27
25 private:
28 private:
26 Ui::CatalogueInspectorWidget *ui;
29 Ui::CatalogueInspectorWidget *ui;
27 };
30 };
28
31
29 #endif // SCIQLOP_CATALOGUEINSPECTORWIDGET_H
32 #endif // SCIQLOP_CATALOGUEINSPECTORWIDGET_H
@@ -1,80 +1,99
1 #include "Catalogue/CatalogueEventsWidget.h"
1 #include "Catalogue/CatalogueEventsWidget.h"
2 #include "ui_CatalogueEventsWidget.h"
2 #include "ui_CatalogueEventsWidget.h"
3
3
4 #include <QtDebug>
5
4 struct CatalogueEventsWidget::CatalogueEventsWidgetPrivate {
6 struct CatalogueEventsWidget::CatalogueEventsWidgetPrivate {
5 void addEventItem(const QStringList &data, QTableWidget *tableWidget);
7 void addEventItem(const QStringList &data, QTableWidget *tableWidget);
6
8
7 enum class Column { Event, TStart, TEnd, Tags, Product, NbColumn };
9 enum class Column { Event, TStart, TEnd, Tags, Product, NbColumn };
8 QStringList columnNames() { return QStringList{"Event", "TStart", "TEnd", "Tags", "Product"}; }
10 QStringList columnNames() { return QStringList{"Event", "TStart", "TEnd", "Tags", "Product"}; }
9 };
11 };
10
12
11
13
12 CatalogueEventsWidget::CatalogueEventsWidget(QWidget *parent)
14 CatalogueEventsWidget::CatalogueEventsWidget(QWidget *parent)
13 : QWidget(parent),
15 : QWidget(parent),
14 ui(new Ui::CatalogueEventsWidget),
16 ui(new Ui::CatalogueEventsWidget),
15 impl{spimpl::make_unique_impl<CatalogueEventsWidgetPrivate>()}
17 impl{spimpl::make_unique_impl<CatalogueEventsWidgetPrivate>()}
16 {
18 {
17 ui->setupUi(this);
19 ui->setupUi(this);
18
20
19 connect(ui->btnTime, &QToolButton::clicked, [this](auto checked) {
21 connect(ui->btnTime, &QToolButton::clicked, [this](auto checked) {
20 if (checked) {
22 if (checked) {
21 ui->btnChart->setChecked(false);
23 ui->btnChart->setChecked(false);
22 }
24 }
23 });
25 });
24
26
25 connect(ui->btnChart, &QToolButton::clicked, [this](auto checked) {
27 connect(ui->btnChart, &QToolButton::clicked, [this](auto checked) {
26 if (checked) {
28 if (checked) {
27 ui->btnTime->setChecked(false);
29 ui->btnTime->setChecked(false);
28 }
30 }
29 });
31 });
30
32
31 connect(ui->tableWidget, &QTableWidget::cellClicked,
33 connect(ui->tableWidget, &QTableWidget::cellClicked, [this](auto row, auto column) {
32 [this](auto row, auto column) { emit this->eventSelected(); });
34 auto event = ui->tableWidget->item(row, 0)->text();
35 emit this->eventSelected(event);
36 });
37
38 connect(ui->tableWidget, &QTableWidget::currentItemChanged,
39 [this](auto current, auto previous) {
40 if (current && current->row() >= 0) {
41 auto event = ui->tableWidget->item(current->row(), 0)->text();
42 emit this->eventSelected(event);
43 }
44 });
45
46 connect(ui->tableWidget, &QTableWidget::itemSelectionChanged, [this]() {
47 auto selection = ui->tableWidget->selectedRanges();
48 auto isSingleSelection = selection.count() == 1 && selection.first().rowCount() == 1;
49 ui->btnChart->setEnabled(isSingleSelection);
50 ui->btnTime->setEnabled(isSingleSelection);
51 });
33
52
34 Q_ASSERT(impl->columnNames().count() == (int)CatalogueEventsWidgetPrivate::Column::NbColumn);
53 Q_ASSERT(impl->columnNames().count() == (int)CatalogueEventsWidgetPrivate::Column::NbColumn);
35 ui->tableWidget->setColumnCount((int)CatalogueEventsWidgetPrivate::Column::NbColumn);
54 ui->tableWidget->setColumnCount((int)CatalogueEventsWidgetPrivate::Column::NbColumn);
36 ui->tableWidget->setHorizontalHeaderLabels(impl->columnNames());
55 ui->tableWidget->setHorizontalHeaderLabels(impl->columnNames());
37 ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
56 ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
38 ui->tableWidget->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
57 ui->tableWidget->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
39 ui->tableWidget->horizontalHeader()->setSortIndicatorShown(true);
58 ui->tableWidget->horizontalHeader()->setSortIndicatorShown(true);
40 }
59 }
41
60
42 CatalogueEventsWidget::~CatalogueEventsWidget()
61 CatalogueEventsWidget::~CatalogueEventsWidget()
43 {
62 {
44 delete ui;
63 delete ui;
45 }
64 }
46
65
47 void CatalogueEventsWidget::populateWithCatalogue(const QString &catalogue)
66 void CatalogueEventsWidget::populateWithCatalogue(const QString &catalogue)
48 {
67 {
49 ui->tableWidget->clearContents();
68 ui->tableWidget->clearContents();
50 ui->tableWidget->setRowCount(0);
69 ui->tableWidget->setRowCount(0);
51
70
52 // TODO
71 // TODO
53 impl->addEventItem(
72 impl->addEventItem(
54 {catalogue + " - Event 1", "12/12/2012 12:12", "12/12/2042 12:52", "cloud", "mfi/b_gse42"},
73 {catalogue + " - Event 1", "12/12/2012 12:12", "12/12/2042 12:52", "cloud", "mfi/b_gse42"},
55 ui->tableWidget);
74 ui->tableWidget);
56 impl->addEventItem(
75 impl->addEventItem(
57 {catalogue + " - Event 2", "12/12/2012 12:10", "12/12/2042 12:42", "Acloud", "mfi/b_gse1"},
76 {catalogue + " - Event 2", "12/12/2012 12:10", "12/12/2042 12:42", "Acloud", "mfi/b_gse1"},
58 ui->tableWidget);
77 ui->tableWidget);
59 impl->addEventItem(
78 impl->addEventItem(
60 {catalogue + " - Event 3", "12/12/2012 12:22", "12/12/2042 12:12", "Gcloud", "mfi/b_gse2"},
79 {catalogue + " - Event 3", "12/12/2012 12:22", "12/12/2042 12:12", "Gcloud", "mfi/b_gse2"},
61 ui->tableWidget);
80 ui->tableWidget);
62 impl->addEventItem(
81 impl->addEventItem(
63 {catalogue + " - Event 4", "12/12/2012 12:00", "12/12/2042 12:62", "Bcloud", "mfi/b_gse3"},
82 {catalogue + " - Event 4", "12/12/2012 12:00", "12/12/2042 12:62", "Bcloud", "mfi/b_gse3"},
64 ui->tableWidget);
83 ui->tableWidget);
65 }
84 }
66
85
67 void CatalogueEventsWidget::CatalogueEventsWidgetPrivate::addEventItem(const QStringList &data,
86 void CatalogueEventsWidget::CatalogueEventsWidgetPrivate::addEventItem(const QStringList &data,
68 QTableWidget *tableWidget)
87 QTableWidget *tableWidget)
69 {
88 {
70 tableWidget->setSortingEnabled(false);
89 tableWidget->setSortingEnabled(false);
71 auto row = tableWidget->rowCount();
90 auto row = tableWidget->rowCount();
72 tableWidget->setRowCount(row + 1);
91 tableWidget->setRowCount(row + 1);
73
92
74 for (auto i = 0; i < (int)Column::NbColumn; ++i) {
93 for (auto i = 0; i < (int)Column::NbColumn; ++i) {
75 auto item = new QTableWidgetItem(data.value(i));
94 auto item = new QTableWidgetItem(data.value(i));
76 item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
95 item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
77 tableWidget->setItem(row, i, item);
96 tableWidget->setItem(row, i, item);
78 }
97 }
79 tableWidget->setSortingEnabled(true);
98 tableWidget->setSortingEnabled(true);
80 }
99 }
@@ -1,22 +1,22
1 #include "Catalogue/CatalogueExplorer.h"
1 #include "Catalogue/CatalogueExplorer.h"
2 #include "ui_CatalogueExplorer.h"
2 #include "ui_CatalogueExplorer.h"
3
3
4 CatalogueExplorer::CatalogueExplorer(QWidget *parent)
4 CatalogueExplorer::CatalogueExplorer(QWidget *parent)
5 : QDialog(parent, Qt::Dialog | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint),
5 : QDialog(parent, Qt::Dialog | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint),
6 ui(new Ui::CatalogueExplorer)
6 ui(new Ui::CatalogueExplorer)
7 {
7 {
8 ui->setupUi(this);
8 ui->setupUi(this);
9
9
10 connect(ui->catalogues, &CatalogueSideBarWidget::catalogueSelected, [this](auto name) {
10 connect(ui->catalogues, &CatalogueSideBarWidget::catalogueSelected, [this](auto name) {
11 ui->inspector->showPage(CatalogueInspectorWidget::Page::CatalogueProperties);
11 ui->inspector->setEvent(name);
12 ui->events->populateWithCatalogue(name);
12 ui->events->populateWithCatalogue(name);
13 });
13 });
14
14
15 connect(ui->events, &CatalogueEventsWidget::eventSelected,
15 connect(ui->events, &CatalogueEventsWidget::eventSelected,
16 [this]() { ui->inspector->showPage(CatalogueInspectorWidget::Page::EventProperties); });
16 [this](auto name) { ui->inspector->setCatalogue(name); });
17 }
17 }
18
18
19 CatalogueExplorer::~CatalogueExplorer()
19 CatalogueExplorer::~CatalogueExplorer()
20 {
20 {
21 delete ui;
21 delete ui;
22 }
22 }
@@ -1,24 +1,36
1 #include "Catalogue/CatalogueInspectorWidget.h"
1 #include "Catalogue/CatalogueInspectorWidget.h"
2 #include "ui_CatalogueInspectorWidget.h"
2 #include "ui_CatalogueInspectorWidget.h"
3
3
4 CatalogueInspectorWidget::CatalogueInspectorWidget(QWidget *parent)
4 CatalogueInspectorWidget::CatalogueInspectorWidget(QWidget *parent)
5 : QWidget(parent), ui(new Ui::CatalogueInspectorWidget)
5 : QWidget(parent), ui(new Ui::CatalogueInspectorWidget)
6 {
6 {
7 ui->setupUi(this);
7 ui->setupUi(this);
8 showPage(Page::Empty);
8 showPage(Page::Empty);
9 }
9 }
10
10
11 CatalogueInspectorWidget::~CatalogueInspectorWidget()
11 CatalogueInspectorWidget::~CatalogueInspectorWidget()
12 {
12 {
13 delete ui;
13 delete ui;
14 }
14 }
15
15
16 void CatalogueInspectorWidget::showPage(CatalogueInspectorWidget::Page page)
16 void CatalogueInspectorWidget::showPage(CatalogueInspectorWidget::Page page)
17 {
17 {
18 ui->stackedWidget->setCurrentIndex(static_cast<int>(page));
18 ui->stackedWidget->setCurrentIndex(static_cast<int>(page));
19 }
19 }
20
20
21 CatalogueInspectorWidget::Page CatalogueInspectorWidget::currentPage() const
21 CatalogueInspectorWidget::Page CatalogueInspectorWidget::currentPage() const
22 {
22 {
23 return static_cast<Page>(ui->stackedWidget->currentIndex());
23 return static_cast<Page>(ui->stackedWidget->currentIndex());
24 }
24 }
25
26 void CatalogueInspectorWidget::setEvent(const QString &event)
27 {
28 showPage(Page::EventProperties);
29 ui->leEventName->setText(event);
30 }
31
32 void CatalogueInspectorWidget::setCatalogue(const QString &catalogue)
33 {
34 showPage(Page::CatalogueProperties);
35 ui->leCatalogueName->setText(catalogue);
36 }
@@ -1,98 +1,101
1 #include "Catalogue/CatalogueSideBarWidget.h"
1 #include "Catalogue/CatalogueSideBarWidget.h"
2 #include "ui_CatalogueSideBarWidget.h"
2 #include "ui_CatalogueSideBarWidget.h"
3
3
4 constexpr auto ALL_EVENT_ITEM_TYPE = QTreeWidgetItem::UserType;
4 constexpr auto ALL_EVENT_ITEM_TYPE = QTreeWidgetItem::UserType;
5 constexpr auto TRASH_ITEM_TYPE = QTreeWidgetItem::UserType + 1;
5 constexpr auto TRASH_ITEM_TYPE = QTreeWidgetItem::UserType + 1;
6 constexpr auto CATALOGUE_ITEM_TYPE = QTreeWidgetItem::UserType + 2;
6 constexpr auto CATALOGUE_ITEM_TYPE = QTreeWidgetItem::UserType + 2;
7 constexpr auto DATABASE_ITEM_TYPE = QTreeWidgetItem::UserType + 3;
7 constexpr auto DATABASE_ITEM_TYPE = QTreeWidgetItem::UserType + 3;
8
8
9
9
10 struct CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate {
10 struct CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate {
11 void configureTreeWidget(QTreeWidget *treeWidget);
11 void configureTreeWidget(QTreeWidget *treeWidget);
12 QTreeWidgetItem *addDatabaseItem(const QString &name, QTreeWidget *treeWidget);
12 QTreeWidgetItem *addDatabaseItem(const QString &name, QTreeWidget *treeWidget);
13 void addCatalogueItem(const QString &name, QTreeWidgetItem *parentDatabaseItem);
13 void addCatalogueItem(const QString &name, QTreeWidgetItem *parentDatabaseItem);
14 };
14 };
15
15
16 CatalogueSideBarWidget::CatalogueSideBarWidget(QWidget *parent)
16 CatalogueSideBarWidget::CatalogueSideBarWidget(QWidget *parent)
17 : QWidget(parent),
17 : QWidget(parent),
18 ui(new Ui::CatalogueSideBarWidget),
18 ui(new Ui::CatalogueSideBarWidget),
19 impl{spimpl::make_unique_impl<CatalogueSideBarWidgetPrivate>()}
19 impl{spimpl::make_unique_impl<CatalogueSideBarWidgetPrivate>()}
20 {
20 {
21 ui->setupUi(this);
21 ui->setupUi(this);
22 impl->configureTreeWidget(ui->treeWidget);
22 impl->configureTreeWidget(ui->treeWidget);
23
23
24 connect(ui->treeWidget, &QTreeWidget::itemClicked, [this](auto item) {
24 auto emitSelection = [this](auto item) {
25 switch (item->type()) {
25 switch (item->type()) {
26 case CATALOGUE_ITEM_TYPE:
26 case CATALOGUE_ITEM_TYPE:
27 emit this->catalogueSelected(item->text(0));
27 emit this->catalogueSelected(item->text(0));
28 break;
28 break;
29 case ALL_EVENT_ITEM_TYPE:
29 case ALL_EVENT_ITEM_TYPE:
30 emit this->allEventsSelected();
30 emit this->allEventsSelected();
31 break;
31 break;
32 case TRASH_ITEM_TYPE:
32 case TRASH_ITEM_TYPE:
33 emit this->trashSelected();
33 emit this->trashSelected();
34 break;
34 break;
35 case DATABASE_ITEM_TYPE:
35 case DATABASE_ITEM_TYPE:
36 default:
36 default:
37 break;
37 break;
38 }
38 }
39 });
39 };
40
41 connect(ui->treeWidget, &QTreeWidget::itemClicked, emitSelection);
42 connect(ui->treeWidget, &QTreeWidget::currentItemChanged, emitSelection);
40 }
43 }
41
44
42 CatalogueSideBarWidget::~CatalogueSideBarWidget()
45 CatalogueSideBarWidget::~CatalogueSideBarWidget()
43 {
46 {
44 delete ui;
47 delete ui;
45 }
48 }
46
49
47 void CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate::configureTreeWidget(
50 void CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate::configureTreeWidget(
48 QTreeWidget *treeWidget)
51 QTreeWidget *treeWidget)
49 {
52 {
50 auto allEventsItem = new QTreeWidgetItem({"All Events"}, ALL_EVENT_ITEM_TYPE);
53 auto allEventsItem = new QTreeWidgetItem({"All Events"}, ALL_EVENT_ITEM_TYPE);
51 allEventsItem->setIcon(0, QIcon(":/icones/allEvents.png"));
54 allEventsItem->setIcon(0, QIcon(":/icones/allEvents.png"));
52 treeWidget->addTopLevelItem(allEventsItem);
55 treeWidget->addTopLevelItem(allEventsItem);
53
56
54 auto trashItem = new QTreeWidgetItem({"Trash"}, TRASH_ITEM_TYPE);
57 auto trashItem = new QTreeWidgetItem({"Trash"}, TRASH_ITEM_TYPE);
55 trashItem->setIcon(0, QIcon(":/icones/trash.png"));
58 trashItem->setIcon(0, QIcon(":/icones/trash.png"));
56 treeWidget->addTopLevelItem(trashItem);
59 treeWidget->addTopLevelItem(trashItem);
57
60
58 auto separator = new QFrame(treeWidget);
61 auto separator = new QFrame(treeWidget);
59 separator->setFrameShape(QFrame::HLine);
62 separator->setFrameShape(QFrame::HLine);
60
63
61 auto separatorItem = new QTreeWidgetItem();
64 auto separatorItem = new QTreeWidgetItem();
62 separatorItem->setFlags(Qt::NoItemFlags);
65 separatorItem->setFlags(Qt::NoItemFlags);
63 treeWidget->addTopLevelItem(separatorItem);
66 treeWidget->addTopLevelItem(separatorItem);
64 treeWidget->setItemWidget(separatorItem, 0, separator);
67 treeWidget->setItemWidget(separatorItem, 0, separator);
65
68
66 // Test
69 // Test
67 auto db = addDatabaseItem("Database 1", treeWidget);
70 auto db = addDatabaseItem("Database 1", treeWidget);
68 addCatalogueItem("Catalogue 1", db);
71 addCatalogueItem("Catalogue 1", db);
69 addCatalogueItem("Catalogue 2", db);
72 addCatalogueItem("Catalogue 2", db);
70 addCatalogueItem("Catalogue 3", db);
73 addCatalogueItem("Catalogue 3", db);
71 addCatalogueItem("Catalogue 4", db);
74 addCatalogueItem("Catalogue 4", db);
72
75
73 auto db2 = addDatabaseItem("Database 2", treeWidget);
76 auto db2 = addDatabaseItem("Database 2", treeWidget);
74 addCatalogueItem("Catalogue A", db2);
77 addCatalogueItem("Catalogue A", db2);
75 addCatalogueItem("Catalogue B", db2);
78 addCatalogueItem("Catalogue B", db2);
76 addCatalogueItem("Catalogue C", db2);
79 addCatalogueItem("Catalogue C", db2);
77
80
78 treeWidget->expandAll();
81 treeWidget->expandAll();
79 }
82 }
80
83
81 QTreeWidgetItem *
84 QTreeWidgetItem *
82 CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate::addDatabaseItem(const QString &name,
85 CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate::addDatabaseItem(const QString &name,
83 QTreeWidget *treeWidget)
86 QTreeWidget *treeWidget)
84 {
87 {
85 auto databaseItem = new QTreeWidgetItem({name}, DATABASE_ITEM_TYPE);
88 auto databaseItem = new QTreeWidgetItem({name}, DATABASE_ITEM_TYPE);
86 databaseItem->setIcon(0, QIcon(":/icones/database.png"));
89 databaseItem->setIcon(0, QIcon(":/icones/database.png"));
87 treeWidget->addTopLevelItem(databaseItem);
90 treeWidget->addTopLevelItem(databaseItem);
88
91
89 return databaseItem;
92 return databaseItem;
90 }
93 }
91
94
92 void CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate::addCatalogueItem(
95 void CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate::addCatalogueItem(
93 const QString &name, QTreeWidgetItem *parentDatabaseItem)
96 const QString &name, QTreeWidgetItem *parentDatabaseItem)
94 {
97 {
95 auto catalogueItem = new QTreeWidgetItem({name}, CATALOGUE_ITEM_TYPE);
98 auto catalogueItem = new QTreeWidgetItem({name}, CATALOGUE_ITEM_TYPE);
96 catalogueItem->setIcon(0, QIcon(":/icones/catalogue.png"));
99 catalogueItem->setIcon(0, QIcon(":/icones/catalogue.png"));
97 parentDatabaseItem->addChild(catalogueItem);
100 parentDatabaseItem->addChild(catalogueItem);
98 }
101 }
@@ -1,214 +1,214
1 <?xml version="1.0" encoding="UTF-8"?>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ui version="4.0">
2 <ui version="4.0">
3 <class>CatalogueInspectorWidget</class>
3 <class>CatalogueInspectorWidget</class>
4 <widget class="QWidget" name="CatalogueInspectorWidget">
4 <widget class="QWidget" name="CatalogueInspectorWidget">
5 <property name="geometry">
5 <property name="geometry">
6 <rect>
6 <rect>
7 <x>0</x>
7 <x>0</x>
8 <y>0</y>
8 <y>0</y>
9 <width>400</width>
9 <width>400</width>
10 <height>300</height>
10 <height>300</height>
11 </rect>
11 </rect>
12 </property>
12 </property>
13 <property name="windowTitle">
13 <property name="windowTitle">
14 <string>Form</string>
14 <string>Form</string>
15 </property>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout_2">
16 <layout class="QVBoxLayout" name="verticalLayout_2">
17 <property name="leftMargin">
17 <property name="leftMargin">
18 <number>0</number>
18 <number>0</number>
19 </property>
19 </property>
20 <property name="topMargin">
20 <property name="topMargin">
21 <number>0</number>
21 <number>0</number>
22 </property>
22 </property>
23 <property name="rightMargin">
23 <property name="rightMargin">
24 <number>0</number>
24 <number>0</number>
25 </property>
25 </property>
26 <property name="bottomMargin">
26 <property name="bottomMargin">
27 <number>0</number>
27 <number>0</number>
28 </property>
28 </property>
29 <item>
29 <item>
30 <widget class="QFrame" name="frame">
30 <widget class="QFrame" name="frame">
31 <property name="frameShape">
31 <property name="frameShape">
32 <enum>QFrame::Box</enum>
32 <enum>QFrame::Box</enum>
33 </property>
33 </property>
34 <property name="frameShadow">
34 <property name="frameShadow">
35 <enum>QFrame::Sunken</enum>
35 <enum>QFrame::Sunken</enum>
36 </property>
36 </property>
37 <property name="lineWidth">
37 <property name="lineWidth">
38 <number>1</number>
38 <number>1</number>
39 </property>
39 </property>
40 <layout class="QVBoxLayout" name="verticalLayout">
40 <layout class="QVBoxLayout" name="verticalLayout">
41 <property name="leftMargin">
41 <property name="leftMargin">
42 <number>0</number>
42 <number>0</number>
43 </property>
43 </property>
44 <property name="topMargin">
44 <property name="topMargin">
45 <number>0</number>
45 <number>0</number>
46 </property>
46 </property>
47 <property name="rightMargin">
47 <property name="rightMargin">
48 <number>0</number>
48 <number>0</number>
49 </property>
49 </property>
50 <property name="bottomMargin">
50 <property name="bottomMargin">
51 <number>0</number>
51 <number>0</number>
52 </property>
52 </property>
53 <item>
53 <item>
54 <widget class="QStackedWidget" name="stackedWidget">
54 <widget class="QStackedWidget" name="stackedWidget">
55 <property name="currentIndex">
55 <property name="currentIndex">
56 <number>2</number>
56 <number>1</number>
57 </property>
57 </property>
58 <widget class="QWidget" name="emptyPage"/>
58 <widget class="QWidget" name="emptyPage"/>
59 <widget class="QWidget" name="catalogueInspectorPage">
59 <widget class="QWidget" name="catalogueInspectorPage">
60 <layout class="QGridLayout" name="gridLayout_2">
60 <layout class="QGridLayout" name="gridLayout_2">
61 <item row="1" column="0">
61 <item row="1" column="0">
62 <widget class="QLabel" name="label_7">
62 <widget class="QLabel" name="label_7">
63 <property name="text">
63 <property name="text">
64 <string>Name</string>
64 <string>Name</string>
65 </property>
65 </property>
66 </widget>
66 </widget>
67 </item>
67 </item>
68 <item row="1" column="1">
68 <item row="1" column="1">
69 <widget class="QLineEdit" name="lineEdit_5"/>
69 <widget class="QLineEdit" name="leCatalogueName"/>
70 </item>
70 </item>
71 <item row="2" column="0">
71 <item row="2" column="0">
72 <widget class="QLabel" name="label_8">
72 <widget class="QLabel" name="label_8">
73 <property name="text">
73 <property name="text">
74 <string>Author</string>
74 <string>Author</string>
75 </property>
75 </property>
76 </widget>
76 </widget>
77 </item>
77 </item>
78 <item row="2" column="1">
78 <item row="2" column="1">
79 <widget class="QLineEdit" name="lineEdit_6">
79 <widget class="QLineEdit" name="leCatalogueAuthor">
80 <property name="text">
80 <property name="text">
81 <string/>
81 <string/>
82 </property>
82 </property>
83 </widget>
83 </widget>
84 </item>
84 </item>
85 <item row="3" column="1">
85 <item row="3" column="1">
86 <spacer name="verticalSpacer_2">
86 <spacer name="verticalSpacer_2">
87 <property name="orientation">
87 <property name="orientation">
88 <enum>Qt::Vertical</enum>
88 <enum>Qt::Vertical</enum>
89 </property>
89 </property>
90 <property name="sizeHint" stdset="0">
90 <property name="sizeHint" stdset="0">
91 <size>
91 <size>
92 <width>20</width>
92 <width>20</width>
93 <height>40</height>
93 <height>40</height>
94 </size>
94 </size>
95 </property>
95 </property>
96 </spacer>
96 </spacer>
97 </item>
97 </item>
98 <item row="0" column="0" colspan="2">
98 <item row="0" column="0" colspan="2">
99 <widget class="QLabel" name="label_9">
99 <widget class="QLabel" name="label_9">
100 <property name="font">
100 <property name="font">
101 <font>
101 <font>
102 <pointsize>10</pointsize>
102 <pointsize>10</pointsize>
103 <weight>75</weight>
103 <weight>75</weight>
104 <bold>true</bold>
104 <bold>true</bold>
105 </font>
105 </font>
106 </property>
106 </property>
107 <property name="text">
107 <property name="text">
108 <string>Catalogue Properties</string>
108 <string>Catalogue Properties</string>
109 </property>
109 </property>
110 </widget>
110 </widget>
111 </item>
111 </item>
112 </layout>
112 </layout>
113 </widget>
113 </widget>
114 <widget class="QWidget" name="eventInspectorPage">
114 <widget class="QWidget" name="eventInspectorPage">
115 <layout class="QGridLayout" name="gridLayout">
115 <layout class="QGridLayout" name="gridLayout">
116 <item row="5" column="1">
116 <item row="5" column="1">
117 <widget class="QDateTimeEdit" name="dateTimeEdit_2"/>
117 <widget class="QDateTimeEdit" name="dateTimeEventTEnd"/>
118 </item>
118 </item>
119 <item row="4" column="0">
119 <item row="4" column="0">
120 <widget class="QLabel" name="label_4">
120 <widget class="QLabel" name="label_4">
121 <property name="text">
121 <property name="text">
122 <string>TStart</string>
122 <string>TStart</string>
123 </property>
123 </property>
124 </widget>
124 </widget>
125 </item>
125 </item>
126 <item row="6" column="0">
126 <item row="6" column="0">
127 <widget class="QLabel" name="label_6">
127 <widget class="QLabel" name="label_6">
128 <property name="text">
128 <property name="text">
129 <string>Tags</string>
129 <string>Tags</string>
130 </property>
130 </property>
131 </widget>
131 </widget>
132 </item>
132 </item>
133 <item row="3" column="0">
133 <item row="3" column="0">
134 <widget class="QLabel" name="label_3">
134 <widget class="QLabel" name="label_3">
135 <property name="text">
135 <property name="text">
136 <string>Product</string>
136 <string>Product</string>
137 </property>
137 </property>
138 </widget>
138 </widget>
139 </item>
139 </item>
140 <item row="3" column="1">
140 <item row="3" column="1">
141 <widget class="QLineEdit" name="lineEdit_3"/>
141 <widget class="QLineEdit" name="leEventProduct"/>
142 </item>
142 </item>
143 <item row="5" column="0">
143 <item row="5" column="0">
144 <widget class="QLabel" name="label_5">
144 <widget class="QLabel" name="label_5">
145 <property name="text">
145 <property name="text">
146 <string>Tend</string>
146 <string>Tend</string>
147 </property>
147 </property>
148 </widget>
148 </widget>
149 </item>
149 </item>
150 <item row="4" column="1">
150 <item row="4" column="1">
151 <widget class="QDateTimeEdit" name="dateTimeEdit"/>
151 <widget class="QDateTimeEdit" name="dateTimeEventTStart"/>
152 </item>
152 </item>
153 <item row="2" column="0">
153 <item row="2" column="0">
154 <widget class="QLabel" name="label_2">
154 <widget class="QLabel" name="label_2">
155 <property name="text">
155 <property name="text">
156 <string>Mission</string>
156 <string>Mission</string>
157 </property>
157 </property>
158 </widget>
158 </widget>
159 </item>
159 </item>
160 <item row="1" column="1">
160 <item row="1" column="1">
161 <widget class="QLineEdit" name="lineEdit"/>
161 <widget class="QLineEdit" name="leEventName"/>
162 </item>
162 </item>
163 <item row="1" column="0">
163 <item row="1" column="0">
164 <widget class="QLabel" name="label">
164 <widget class="QLabel" name="label">
165 <property name="text">
165 <property name="text">
166 <string>Name</string>
166 <string>Name</string>
167 </property>
167 </property>
168 </widget>
168 </widget>
169 </item>
169 </item>
170 <item row="2" column="1">
170 <item row="2" column="1">
171 <widget class="QLineEdit" name="lineEdit_2"/>
171 <widget class="QLineEdit" name="leEventMission"/>
172 </item>
172 </item>
173 <item row="6" column="1">
173 <item row="6" column="1">
174 <widget class="QLineEdit" name="lineEdit_4"/>
174 <widget class="QLineEdit" name="leEventTags"/>
175 </item>
175 </item>
176 <item row="7" column="1">
176 <item row="7" column="1">
177 <spacer name="verticalSpacer">
177 <spacer name="verticalSpacer">
178 <property name="orientation">
178 <property name="orientation">
179 <enum>Qt::Vertical</enum>
179 <enum>Qt::Vertical</enum>
180 </property>
180 </property>
181 <property name="sizeHint" stdset="0">
181 <property name="sizeHint" stdset="0">
182 <size>
182 <size>
183 <width>20</width>
183 <width>20</width>
184 <height>40</height>
184 <height>40</height>
185 </size>
185 </size>
186 </property>
186 </property>
187 </spacer>
187 </spacer>
188 </item>
188 </item>
189 <item row="0" column="0" colspan="2">
189 <item row="0" column="0" colspan="2">
190 <widget class="QLabel" name="label_10">
190 <widget class="QLabel" name="label_10">
191 <property name="font">
191 <property name="font">
192 <font>
192 <font>
193 <pointsize>10</pointsize>
193 <pointsize>10</pointsize>
194 <weight>75</weight>
194 <weight>75</weight>
195 <bold>true</bold>
195 <bold>true</bold>
196 </font>
196 </font>
197 </property>
197 </property>
198 <property name="text">
198 <property name="text">
199 <string>Event Properties</string>
199 <string>Event Properties</string>
200 </property>
200 </property>
201 </widget>
201 </widget>
202 </item>
202 </item>
203 </layout>
203 </layout>
204 </widget>
204 </widget>
205 </widget>
205 </widget>
206 </item>
206 </item>
207 </layout>
207 </layout>
208 </widget>
208 </widget>
209 </item>
209 </item>
210 </layout>
210 </layout>
211 </widget>
211 </widget>
212 <resources/>
212 <resources/>
213 <connections/>
213 <connections/>
214 </ui>
214 </ui>
General Comments 3
Under Review
author

Auto status change to "Under Review"

Approved

Status change > Approved

You need to be logged in to leave comments. Login now