##// END OF EJS Templates
Catalog side bar
trabillard -
r1133:36b99d8a1584
parent child
Show More
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -1,21 +1,25
1 #ifndef CATALOGUESIDEBARWIDGET_H
1 #ifndef SCIQLOP_CATALOGUESIDEBARWIDGET_H
2 #define CATALOGUESIDEBARWIDGET_H
2 #define SCIQLOP_CATALOGUESIDEBARWIDGET_H
3
3
4 #include <Common/spimpl.h>
4 #include <QWidget>
5 #include <QWidget>
5
6
6 namespace Ui {
7 namespace Ui {
7 class CatalogueSideBarWidget;
8 class CatalogueSideBarWidget;
8 }
9 }
9
10
10 class CatalogueSideBarWidget : public QWidget {
11 class CatalogueSideBarWidget : public QWidget {
11 Q_OBJECT
12 Q_OBJECT
12
13
13 public:
14 public:
14 explicit CatalogueSideBarWidget(QWidget *parent = 0);
15 explicit CatalogueSideBarWidget(QWidget *parent = 0);
15 ~CatalogueSideBarWidget();
16 virtual ~CatalogueSideBarWidget();
16
17
17 private:
18 private:
18 Ui::CatalogueSideBarWidget *ui;
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
@@ -1,26 +1,28
1 <RCC>
1 <RCC>
2 <qresource prefix="/">
2 <qresource prefix="/">
3 <file>icones/dataSourceComponent.png</file>
3 <file>icones/dataSourceComponent.png</file>
4 <file>icones/dataSourceNode.png</file>
4 <file>icones/dataSourceNode.png</file>
5 <file>icones/dataSourceProduct.png</file>
5 <file>icones/dataSourceProduct.png</file>
6 <file>icones/dataSourceRoot.png</file>
6 <file>icones/dataSourceRoot.png</file>
7 <file>icones/delete.png</file>
7 <file>icones/delete.png</file>
8 <file>icones/down.png</file>
8 <file>icones/down.png</file>
9 <file>icones/openInspector.png</file>
9 <file>icones/openInspector.png</file>
10 <file>icones/next.png</file>
10 <file>icones/next.png</file>
11 <file>icones/plot.png</file>
11 <file>icones/plot.png</file>
12 <file>icones/previous.png</file>
12 <file>icones/previous.png</file>
13 <file>icones/unplot.png</file>
13 <file>icones/unplot.png</file>
14 <file>icones/up.png</file>
14 <file>icones/up.png</file>
15 <file>icones/time.png</file>
15 <file>icones/time.png</file>
16 <file>icones/zoom.png</file>
16 <file>icones/zoom.png</file>
17 <file>icones/rectangle.png</file>
17 <file>icones/rectangle.png</file>
18 <file>icones/drag.png</file>
18 <file>icones/drag.png</file>
19 <file>icones/cursor.png</file>
19 <file>icones/cursor.png</file>
20 <file>icones/pointer.png</file>
20 <file>icones/pointer.png</file>
21 <file>icones/catalogue.png</file>
21 <file>icones/catalogue.png</file>
22 <file>icones/add.png</file>
22 <file>icones/add.png</file>
23 <file>icones/remove.png</file>
23 <file>icones/remove.png</file>
24 <file>icones/chart.png</file>
24 <file>icones/chart.png</file>
25 <file>icones/allEvents.png</file>
26 <file>icones/trash.png</file>
25 </qresource>
27 </qresource>
26 </RCC>
28 </RCC>
@@ -1,13 +1,46
1 #include "Catalogue/CatalogueSideBarWidget.h"
1 #include "Catalogue/CatalogueSideBarWidget.h"
2 #include "ui_CatalogueSideBarWidget.h"
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 CatalogueSideBarWidget::CatalogueSideBarWidget(QWidget *parent)
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 ui->setupUi(this);
19 ui->setupUi(this);
20 impl->configureTreeWidget(ui->treeWidget);
8 }
21 }
9
22
10 CatalogueSideBarWidget::~CatalogueSideBarWidget()
23 CatalogueSideBarWidget::~CatalogueSideBarWidget()
11 {
24 {
12 delete ui;
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 }
@@ -1,56 +1,83
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>CatalogueExplorer</class>
3 <class>CatalogueExplorer</class>
4 <widget class="QDialog" name="CatalogueExplorer">
4 <widget class="QDialog" name="CatalogueExplorer">
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>775</width>
9 <width>755</width>
10 <height>512</height>
10 <height>481</height>
11 </rect>
11 </rect>
12 </property>
12 </property>
13 <property name="windowTitle">
13 <property name="windowTitle">
14 <string>Catalogue Explorer</string>
14 <string>Catalogue Explorer</string>
15 </property>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout">
16 <layout class="QVBoxLayout" name="verticalLayout">
17 <item>
17 <item>
18 <widget class="QSplitter" name="horizontalSplitter">
18 <widget class="QSplitter" name="horizontalSplitter">
19 <property name="orientation">
19 <property name="orientation">
20 <enum>Qt::Horizontal</enum>
20 <enum>Qt::Horizontal</enum>
21 </property>
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 <widget class="QSplitter" name="verticalSplitter">
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 <property name="orientation">
37 <property name="orientation">
25 <enum>Qt::Vertical</enum>
38 <enum>Qt::Vertical</enum>
26 </property>
39 </property>
27 <widget class="CatalogueEventsWidget" name="events" native="true"/>
40 <widget class="CatalogueEventsWidget" name="events" native="true">
28 <widget class="CatalogueInspectorWidget" name="inspector" 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 </widget>
56 </widget>
30 </widget>
57 </widget>
31 </item>
58 </item>
32 </layout>
59 </layout>
33 </widget>
60 </widget>
34 <customwidgets>
61 <customwidgets>
35 <customwidget>
62 <customwidget>
36 <class>CatalogueSideBarWidget</class>
63 <class>CatalogueSideBarWidget</class>
37 <extends>QWidget</extends>
64 <extends>QWidget</extends>
38 <header>Catalogue/CatalogueSideBarWidget.h</header>
65 <header>Catalogue/CatalogueSideBarWidget.h</header>
39 <container>1</container>
66 <container>1</container>
40 </customwidget>
67 </customwidget>
41 <customwidget>
68 <customwidget>
42 <class>CatalogueEventsWidget</class>
69 <class>CatalogueEventsWidget</class>
43 <extends>QWidget</extends>
70 <extends>QWidget</extends>
44 <header>Catalogue/CatalogueEventsWidget.h</header>
71 <header>Catalogue/CatalogueEventsWidget.h</header>
45 <container>1</container>
72 <container>1</container>
46 </customwidget>
73 </customwidget>
47 <customwidget>
74 <customwidget>
48 <class>CatalogueInspectorWidget</class>
75 <class>CatalogueInspectorWidget</class>
49 <extends>QWidget</extends>
76 <extends>QWidget</extends>
50 <header>Catalogue/CatalogueInspectorWidget.h</header>
77 <header>Catalogue/CatalogueInspectorWidget.h</header>
51 <container>1</container>
78 <container>1</container>
52 </customwidget>
79 </customwidget>
53 </customwidgets>
80 </customwidgets>
54 <resources/>
81 <resources/>
55 <connections/>
82 <connections/>
56 </ui>
83 </ui>
@@ -1,81 +1,90
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>CatalogueSideBarWidget</class>
3 <class>CatalogueSideBarWidget</class>
4 <widget class="QWidget" name="CatalogueSideBarWidget">
4 <widget class="QWidget" name="CatalogueSideBarWidget">
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>330</width>
9 <width>330</width>
10 <height>523</height>
10 <height>523</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">
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 <item>
29 <item>
18 <layout class="QHBoxLayout" name="horizontalLayout">
30 <layout class="QHBoxLayout" name="horizontalLayout">
19 <item>
31 <item>
20 <widget class="QToolButton" name="btnAdd">
32 <widget class="QToolButton" name="btnAdd">
21 <property name="text">
33 <property name="text">
22 <string>+</string>
34 <string>+</string>
23 </property>
35 </property>
24 <property name="icon">
36 <property name="icon">
25 <iconset resource="../../resources/sqpguiresources.qrc">
37 <iconset>
26 <normaloff>:/icones/add.png</normaloff>:/icones/add.png</iconset>
38 <normaloff>:/icones/add.png</normaloff>:/icones/add.png</iconset>
27 </property>
39 </property>
28 <property name="autoRaise">
40 <property name="autoRaise">
29 <bool>true</bool>
41 <bool>true</bool>
30 </property>
42 </property>
31 </widget>
43 </widget>
32 </item>
44 </item>
33 <item>
45 <item>
34 <widget class="QToolButton" name="btnRemove">
46 <widget class="QToolButton" name="btnRemove">
35 <property name="text">
47 <property name="text">
36 <string> - </string>
48 <string> - </string>
37 </property>
49 </property>
38 <property name="icon">
50 <property name="icon">
39 <iconset resource="../../resources/sqpguiresources.qrc">
51 <iconset>
40 <normaloff>:/icones/remove.png</normaloff>:/icones/remove.png</iconset>
52 <normaloff>:/icones/remove.png</normaloff>:/icones/remove.png</iconset>
41 </property>
53 </property>
42 <property name="autoRaise">
54 <property name="autoRaise">
43 <bool>true</bool>
55 <bool>true</bool>
44 </property>
56 </property>
45 </widget>
57 </widget>
46 </item>
58 </item>
47 <item>
59 <item>
48 <spacer name="horizontalSpacer">
60 <spacer name="horizontalSpacer">
49 <property name="orientation">
61 <property name="orientation">
50 <enum>Qt::Horizontal</enum>
62 <enum>Qt::Horizontal</enum>
51 </property>
63 </property>
52 <property name="sizeHint" stdset="0">
64 <property name="sizeHint" stdset="0">
53 <size>
65 <size>
54 <width>40</width>
66 <width>40</width>
55 <height>20</height>
67 <height>20</height>
56 </size>
68 </size>
57 </property>
69 </property>
58 </spacer>
70 </spacer>
59 </item>
71 </item>
60 </layout>
72 </layout>
61 </item>
73 </item>
62 <item>
74 <item>
63 <widget class="QTreeWidget" name="treeWidget">
75 <widget class="QTreeWidget" name="treeWidget">
64 <attribute name="headerVisible">
76 <attribute name="headerVisible">
65 <bool>false</bool>
77 <bool>false</bool>
66 </attribute>
78 </attribute>
67 <column>
79 <column>
68 <property name="text">
80 <property name="text">
69 <string notr="true">1</string>
81 <string notr="true">1</string>
70 </property>
82 </property>
71 </column>
83 </column>
72 </widget>
84 </widget>
73 </item>
85 </item>
74 </layout>
86 </layout>
75 </widget>
87 </widget>
76 <resources>
88 <resources/>
77 <include location="../../resources/sqpguiresources.qrc"/>
78 <include location="../../resources/sqpguiresources.qrc"/>
79 </resources>
80 <connections/>
89 <connections/>
81 </ui>
90 </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