##// END OF EJS Templates
Inspector
trabillard -
r1099:d0842d2b09d4
parent child
Show More
@@ -1,5 +1,5
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
@@ -12,10 +12,18 class CatalogueInspectorWidget : public QWidget {
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
@@ -5,9 +5,20 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 }
@@ -14,18 +14,30
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>
@@ -41,35 +53,36
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>
@@ -82,71 +95,85
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>
@@ -159,6 +186,20
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>
General Comments 0
You need to be logged in to leave comments. Login now