##// END OF EJS Templates
Inspector
trabillard -
r1134:d0842d2b09d4
parent child
Show More
@@ -1,21 +1,29
1 #ifndef CATALOGUEINSPECTORWIDGET_H
1 #ifndef SCIQLOP_CATALOGUEINSPECTORWIDGET_H
2 #define 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 ~CatalogueInspectorWidget();
15 virtual ~CatalogueInspectorWidget();
16
17 /// Enum matching the pages inside the stacked widget
18 enum class Page { Empty, CatalogueProperties, EventProperties };
19
20 Page currentPage() const;
21
22 public slots:
23 void showPage(Page page);
16
24
17 private:
25 private:
18 Ui::CatalogueInspectorWidget *ui;
26 Ui::CatalogueInspectorWidget *ui;
19 };
27 };
20
28
21 #endif // CATALOGUEINSPECTORWIDGET_H
29 #endif // SCIQLOP_CATALOGUEINSPECTORWIDGET_H
@@ -1,13 +1,24
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 }
9 }
9
10
10 CatalogueInspectorWidget::~CatalogueInspectorWidget()
11 CatalogueInspectorWidget::~CatalogueInspectorWidget()
11 {
12 {
12 delete ui;
13 delete ui;
13 }
14 }
15
16 void CatalogueInspectorWidget::showPage(CatalogueInspectorWidget::Page page)
17 {
18 ui->stackedWidget->setCurrentIndex(static_cast<int>(page));
19 }
20
21 CatalogueInspectorWidget::Page CatalogueInspectorWidget::currentPage() const
22 {
23 return static_cast<Page>(ui->stackedWidget->currentIndex());
24 }
@@ -1,173 +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">
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 <widget class="QGroupBox" name="groupBox">
30 <widget class="QFrame" name="frame">
19 <property name="title">
31 <property name="frameShape">
20 <string>Inspector</string>
32 <enum>QFrame::Box</enum>
21 </property>
33 </property>
22 <property name="flat">
34 <property name="frameShadow">
23 <bool>false</bool>
35 <enum>QFrame::Sunken</enum>
36 </property>
37 <property name="lineWidth">
38 <number>1</number>
24 </property>
39 </property>
25 <layout class="QVBoxLayout" name="verticalLayout">
40 <layout class="QVBoxLayout" name="verticalLayout">
26 <property name="spacing">
27 <number>0</number>
28 </property>
29 <property name="leftMargin">
41 <property name="leftMargin">
30 <number>0</number>
42 <number>0</number>
31 </property>
43 </property>
32 <property name="topMargin">
44 <property name="topMargin">
33 <number>0</number>
45 <number>0</number>
34 </property>
46 </property>
35 <property name="rightMargin">
47 <property name="rightMargin">
36 <number>0</number>
48 <number>0</number>
37 </property>
49 </property>
38 <property name="bottomMargin">
50 <property name="bottomMargin">
39 <number>0</number>
51 <number>0</number>
40 </property>
52 </property>
41 <item>
53 <item>
42 <widget class="QStackedWidget" name="stackedWidget">
54 <widget class="QStackedWidget" name="stackedWidget">
43 <property name="currentIndex">
55 <property name="currentIndex">
44 <number>0</number>
56 <number>2</number>
45 </property>
57 </property>
58 <widget class="QWidget" name="emptyPage"/>
46 <widget class="QWidget" name="catalogueInspectorPage">
59 <widget class="QWidget" name="catalogueInspectorPage">
47 <layout class="QGridLayout" name="gridLayout_2">
60 <layout class="QGridLayout" name="gridLayout_2">
48 <item row="0" column="0">
61 <item row="1" column="0">
49 <widget class="QLabel" name="label_7">
62 <widget class="QLabel" name="label_7">
50 <property name="text">
63 <property name="text">
51 <string>Name</string>
64 <string>Name</string>
52 </property>
65 </property>
53 </widget>
66 </widget>
54 </item>
67 </item>
55 <item row="0" column="1">
68 <item row="1" column="1">
56 <widget class="QLineEdit" name="lineEdit_5"/>
69 <widget class="QLineEdit" name="lineEdit_5"/>
57 </item>
70 </item>
58 <item row="1" column="0">
71 <item row="2" column="0">
59 <widget class="QLabel" name="label_8">
72 <widget class="QLabel" name="label_8">
60 <property name="text">
73 <property name="text">
61 <string>Author</string>
74 <string>Author</string>
62 </property>
75 </property>
63 </widget>
76 </widget>
64 </item>
77 </item>
65 <item row="1" column="1">
78 <item row="2" column="1">
66 <widget class="QLineEdit" name="lineEdit_6">
79 <widget class="QLineEdit" name="lineEdit_6">
67 <property name="text">
80 <property name="text">
68 <string/>
81 <string/>
69 </property>
82 </property>
70 </widget>
83 </widget>
71 </item>
84 </item>
72 <item row="2" column="1">
85 <item row="3" column="1">
73 <spacer name="verticalSpacer_2">
86 <spacer name="verticalSpacer_2">
74 <property name="orientation">
87 <property name="orientation">
75 <enum>Qt::Vertical</enum>
88 <enum>Qt::Vertical</enum>
76 </property>
89 </property>
77 <property name="sizeHint" stdset="0">
90 <property name="sizeHint" stdset="0">
78 <size>
91 <size>
79 <width>20</width>
92 <width>20</width>
80 <height>40</height>
93 <height>40</height>
81 </size>
94 </size>
82 </property>
95 </property>
83 </spacer>
96 </spacer>
84 </item>
97 </item>
98 <item row="0" column="0" colspan="2">
99 <widget class="QLabel" name="label_9">
100 <property name="font">
101 <font>
102 <pointsize>10</pointsize>
103 <weight>75</weight>
104 <bold>true</bold>
105 </font>
106 </property>
107 <property name="text">
108 <string>Catalogue Properties</string>
109 </property>
110 </widget>
111 </item>
85 </layout>
112 </layout>
86 </widget>
113 </widget>
87 <widget class="QWidget" name="eventInspectorPage">
114 <widget class="QWidget" name="eventInspectorPage">
88 <layout class="QGridLayout" name="gridLayout">
115 <layout class="QGridLayout" name="gridLayout">
89 <item row="4" column="1">
116 <item row="5" column="1">
90 <widget class="QDateTimeEdit" name="dateTimeEdit_2"/>
117 <widget class="QDateTimeEdit" name="dateTimeEdit_2"/>
91 </item>
118 </item>
92 <item row="3" column="0">
119 <item row="4" column="0">
93 <widget class="QLabel" name="label_4">
120 <widget class="QLabel" name="label_4">
94 <property name="text">
121 <property name="text">
95 <string>TStart</string>
122 <string>TStart</string>
96 </property>
123 </property>
97 </widget>
124 </widget>
98 </item>
125 </item>
99 <item row="5" column="0">
126 <item row="6" column="0">
100 <widget class="QLabel" name="label_6">
127 <widget class="QLabel" name="label_6">
101 <property name="text">
128 <property name="text">
102 <string>Tags</string>
129 <string>Tags</string>
103 </property>
130 </property>
104 </widget>
131 </widget>
105 </item>
132 </item>
106 <item row="2" column="0">
133 <item row="3" column="0">
107 <widget class="QLabel" name="label_3">
134 <widget class="QLabel" name="label_3">
108 <property name="text">
135 <property name="text">
109 <string>Product</string>
136 <string>Product</string>
110 </property>
137 </property>
111 </widget>
138 </widget>
112 </item>
139 </item>
113 <item row="2" column="1">
140 <item row="3" column="1">
114 <widget class="QLineEdit" name="lineEdit_3"/>
141 <widget class="QLineEdit" name="lineEdit_3"/>
115 </item>
142 </item>
116 <item row="4" column="0">
143 <item row="5" column="0">
117 <widget class="QLabel" name="label_5">
144 <widget class="QLabel" name="label_5">
118 <property name="text">
145 <property name="text">
119 <string>Tend</string>
146 <string>Tend</string>
120 </property>
147 </property>
121 </widget>
148 </widget>
122 </item>
149 </item>
123 <item row="3" column="1">
150 <item row="4" column="1">
124 <widget class="QDateTimeEdit" name="dateTimeEdit"/>
151 <widget class="QDateTimeEdit" name="dateTimeEdit"/>
125 </item>
152 </item>
126 <item row="1" column="0">
153 <item row="2" column="0">
127 <widget class="QLabel" name="label_2">
154 <widget class="QLabel" name="label_2">
128 <property name="text">
155 <property name="text">
129 <string>Mission</string>
156 <string>Mission</string>
130 </property>
157 </property>
131 </widget>
158 </widget>
132 </item>
159 </item>
133 <item row="0" column="1">
160 <item row="1" column="1">
134 <widget class="QLineEdit" name="lineEdit"/>
161 <widget class="QLineEdit" name="lineEdit"/>
135 </item>
162 </item>
136 <item row="0" column="0">
163 <item row="1" column="0">
137 <widget class="QLabel" name="label">
164 <widget class="QLabel" name="label">
138 <property name="text">
165 <property name="text">
139 <string>Event Name</string>
166 <string>Name</string>
140 </property>
167 </property>
141 </widget>
168 </widget>
142 </item>
169 </item>
143 <item row="1" column="1">
170 <item row="2" column="1">
144 <widget class="QLineEdit" name="lineEdit_2"/>
171 <widget class="QLineEdit" name="lineEdit_2"/>
145 </item>
172 </item>
146 <item row="5" column="1">
173 <item row="6" column="1">
147 <widget class="QLineEdit" name="lineEdit_4"/>
174 <widget class="QLineEdit" name="lineEdit_4"/>
148 </item>
175 </item>
149 <item row="6" column="1">
176 <item row="7" column="1">
150 <spacer name="verticalSpacer">
177 <spacer name="verticalSpacer">
151 <property name="orientation">
178 <property name="orientation">
152 <enum>Qt::Vertical</enum>
179 <enum>Qt::Vertical</enum>
153 </property>
180 </property>
154 <property name="sizeHint" stdset="0">
181 <property name="sizeHint" stdset="0">
155 <size>
182 <size>
156 <width>20</width>
183 <width>20</width>
157 <height>40</height>
184 <height>40</height>
158 </size>
185 </size>
159 </property>
186 </property>
160 </spacer>
187 </spacer>
161 </item>
188 </item>
189 <item row="0" column="0" colspan="2">
190 <widget class="QLabel" name="label_10">
191 <property name="font">
192 <font>
193 <pointsize>10</pointsize>
194 <weight>75</weight>
195 <bold>true</bold>
196 </font>
197 </property>
198 <property name="text">
199 <string>Event Properties</string>
200 </property>
201 </widget>
202 </item>
162 </layout>
203 </layout>
163 </widget>
204 </widget>
164 </widget>
205 </widget>
165 </item>
206 </item>
166 </layout>
207 </layout>
167 </widget>
208 </widget>
168 </item>
209 </item>
169 </layout>
210 </layout>
170 </widget>
211 </widget>
171 <resources/>
212 <resources/>
172 <connections/>
213 <connections/>
173 </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