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