|
1 | NO CONTENT: new file 100644, binary diff hidden |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -1,6 +1,7 | |||
|
1 | #ifndef CATALOGUESIDEBARWIDGET_H | |
|
2 | #define CATALOGUESIDEBARWIDGET_H | |
|
1 | #ifndef SCIQLOP_CATALOGUESIDEBARWIDGET_H | |
|
2 | #define SCIQLOP_CATALOGUESIDEBARWIDGET_H | |
|
3 | 3 | |
|
4 | #include <Common/spimpl.h> | |
|
4 | 5 | #include <QWidget> |
|
5 | 6 | |
|
6 | 7 | namespace Ui { |
@@ -12,10 +13,13 class CatalogueSideBarWidget : public QWidget { | |||
|
12 | 13 | |
|
13 | 14 | public: |
|
14 | 15 | explicit CatalogueSideBarWidget(QWidget *parent = 0); |
|
15 | ~CatalogueSideBarWidget(); | |
|
16 | virtual ~CatalogueSideBarWidget(); | |
|
16 | 17 | |
|
17 | 18 | private: |
|
18 | 19 | Ui::CatalogueSideBarWidget *ui; |
|
20 | ||
|
21 | class CatalogueSideBarWidgetPrivate; | |
|
22 | spimpl::unique_impl_ptr<CatalogueSideBarWidgetPrivate> impl; | |
|
19 | 23 | }; |
|
20 | 24 | |
|
21 | #endif // CATALOGUESIDEBARWIDGET_H | |
|
25 | #endif // SCIQLOP_CATALOGUESIDEBARWIDGET_H |
@@ -22,5 +22,7 | |||
|
22 | 22 | <file>icones/add.png</file> |
|
23 | 23 | <file>icones/remove.png</file> |
|
24 | 24 | <file>icones/chart.png</file> |
|
25 | <file>icones/allEvents.png</file> | |
|
26 | <file>icones/trash.png</file> | |
|
25 | 27 | </qresource> |
|
26 | 28 | </RCC> |
@@ -1,13 +1,46 | |||
|
1 | 1 | #include "Catalogue/CatalogueSideBarWidget.h" |
|
2 | 2 | #include "ui_CatalogueSideBarWidget.h" |
|
3 | 3 | |
|
4 | auto ALL_EVENT_ITEM_TYPE = QTreeWidgetItem::UserType; | |
|
5 | auto TRASH_ITEM_TYPE = QTreeWidgetItem::UserType + 1; | |
|
6 | auto CATALOGUE_ITEM_TYPE = QTreeWidgetItem::UserType + 2; | |
|
7 | auto DATABASE_ITEM_TYPE = QTreeWidgetItem::UserType + 3; | |
|
8 | ||
|
9 | ||
|
10 | struct CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate { | |
|
11 | void configureTreeWidget(QTreeWidget *treeWidget); | |
|
12 | }; | |
|
13 | ||
|
4 | 14 | CatalogueSideBarWidget::CatalogueSideBarWidget(QWidget *parent) |
|
5 | : QWidget(parent), ui(new Ui::CatalogueSideBarWidget) | |
|
15 | : QWidget(parent), | |
|
16 | ui(new Ui::CatalogueSideBarWidget), | |
|
17 | impl{spimpl::make_unique_impl<CatalogueSideBarWidgetPrivate>()} | |
|
6 | 18 | { |
|
7 | 19 | ui->setupUi(this); |
|
20 | impl->configureTreeWidget(ui->treeWidget); | |
|
8 | 21 | } |
|
9 | 22 | |
|
10 | 23 | CatalogueSideBarWidget::~CatalogueSideBarWidget() |
|
11 | 24 | { |
|
12 | 25 | delete ui; |
|
13 | 26 | } |
|
27 | ||
|
28 | void CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate::configureTreeWidget( | |
|
29 | QTreeWidget *treeWidget) | |
|
30 | { | |
|
31 | auto allEventsItem = new QTreeWidgetItem({"All Events"}, ALL_EVENT_ITEM_TYPE); | |
|
32 | allEventsItem->setIcon(0, QIcon(":/icones/allEvents.png")); | |
|
33 | treeWidget->addTopLevelItem(allEventsItem); | |
|
34 | ||
|
35 | auto trashItem = new QTreeWidgetItem({"Trash"}, TRASH_ITEM_TYPE); | |
|
36 | trashItem->setIcon(0, QIcon(":/icones/trash.png")); | |
|
37 | treeWidget->addTopLevelItem(trashItem); | |
|
38 | ||
|
39 | auto separator = new QFrame(treeWidget); | |
|
40 | separator->setFrameShape(QFrame::HLine); | |
|
41 | ||
|
42 | auto separatorItem = new QTreeWidgetItem(); | |
|
43 | separatorItem->setFlags(Qt::NoItemFlags); | |
|
44 | treeWidget->addTopLevelItem(separatorItem); | |
|
45 | treeWidget->setItemWidget(separatorItem, 0, separator); | |
|
46 | } |
@@ -6,8 +6,8 | |||
|
6 | 6 | <rect> |
|
7 | 7 | <x>0</x> |
|
8 | 8 | <y>0</y> |
|
9 |
<width>7 |
|
|
10 |
<height> |
|
|
9 | <width>755</width> | |
|
10 | <height>481</height> | |
|
11 | 11 | </rect> |
|
12 | 12 | </property> |
|
13 | 13 | <property name="windowTitle"> |
@@ -19,13 +19,40 | |||
|
19 | 19 | <property name="orientation"> |
|
20 | 20 | <enum>Qt::Horizontal</enum> |
|
21 | 21 | </property> |
|
22 |
<widget class="CatalogueSideBarWidget" name="catalogues" native="true" |
|
|
22 | <widget class="CatalogueSideBarWidget" name="catalogues" native="true"> | |
|
23 | <property name="sizePolicy"> | |
|
24 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | |
|
25 | <horstretch>1</horstretch> | |
|
26 | <verstretch>0</verstretch> | |
|
27 | </sizepolicy> | |
|
28 | </property> | |
|
29 | </widget> | |
|
23 | 30 | <widget class="QSplitter" name="verticalSplitter"> |
|
31 | <property name="sizePolicy"> | |
|
32 | <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> | |
|
33 | <horstretch>3</horstretch> | |
|
34 | <verstretch>0</verstretch> | |
|
35 | </sizepolicy> | |
|
36 | </property> | |
|
24 | 37 | <property name="orientation"> |
|
25 | 38 | <enum>Qt::Vertical</enum> |
|
26 | 39 | </property> |
|
27 |
<widget class="CatalogueEventsWidget" name="events" native="true" |
|
|
28 | <widget class="CatalogueInspectorWidget" name="inspector" native="true"/> | |
|
40 | <widget class="CatalogueEventsWidget" name="events" native="true"> | |
|
41 | <property name="sizePolicy"> | |
|
42 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | |
|
43 | <horstretch>0</horstretch> | |
|
44 | <verstretch>5</verstretch> | |
|
45 | </sizepolicy> | |
|
46 | </property> | |
|
47 | </widget> | |
|
48 | <widget class="CatalogueInspectorWidget" name="inspector" native="true"> | |
|
49 | <property name="sizePolicy"> | |
|
50 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | |
|
51 | <horstretch>0</horstretch> | |
|
52 | <verstretch>2</verstretch> | |
|
53 | </sizepolicy> | |
|
54 | </property> | |
|
55 | </widget> | |
|
29 | 56 | </widget> |
|
30 | 57 | </widget> |
|
31 | 58 | </item> |
@@ -14,6 +14,18 | |||
|
14 | 14 | <string>Form</string> |
|
15 | 15 | </property> |
|
16 | 16 | <layout class="QVBoxLayout" name="verticalLayout"> |
|
17 | <property name="leftMargin"> | |
|
18 | <number>0</number> | |
|
19 | </property> | |
|
20 | <property name="topMargin"> | |
|
21 | <number>0</number> | |
|
22 | </property> | |
|
23 | <property name="rightMargin"> | |
|
24 | <number>0</number> | |
|
25 | </property> | |
|
26 | <property name="bottomMargin"> | |
|
27 | <number>0</number> | |
|
28 | </property> | |
|
17 | 29 | <item> |
|
18 | 30 | <layout class="QHBoxLayout" name="horizontalLayout"> |
|
19 | 31 | <item> |
@@ -22,7 +34,7 | |||
|
22 | 34 | <string>+</string> |
|
23 | 35 | </property> |
|
24 | 36 | <property name="icon"> |
|
25 | <iconset resource="../../resources/sqpguiresources.qrc"> | |
|
37 | <iconset> | |
|
26 | 38 | <normaloff>:/icones/add.png</normaloff>:/icones/add.png</iconset> |
|
27 | 39 | </property> |
|
28 | 40 | <property name="autoRaise"> |
@@ -36,7 +48,7 | |||
|
36 | 48 | <string> - </string> |
|
37 | 49 | </property> |
|
38 | 50 | <property name="icon"> |
|
39 | <iconset resource="../../resources/sqpguiresources.qrc"> | |
|
51 | <iconset> | |
|
40 | 52 | <normaloff>:/icones/remove.png</normaloff>:/icones/remove.png</iconset> |
|
41 | 53 | </property> |
|
42 | 54 | <property name="autoRaise"> |
@@ -73,9 +85,6 | |||
|
73 | 85 | </item> |
|
74 | 86 | </layout> |
|
75 | 87 | </widget> |
|
76 | <resources> | |
|
77 | <include location="../../resources/sqpguiresources.qrc"/> | |
|
78 | <include location="../../resources/sqpguiresources.qrc"/> | |
|
79 | </resources> | |
|
88 | <resources/> | |
|
80 | 89 | <connections/> |
|
81 | 90 | </ui> |
General Comments 0
You need to be logged in to leave comments.
Login now