##// END OF EJS Templates
Inspector
trabillard -
r1134:d0842d2b09d4
parent child
Show More
@@ -1,5 +1,5
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
@@ -12,10 +12,18 class CatalogueInspectorWidget : public QWidget {
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
@@ -5,9 +5,20 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 }
@@ -14,18 +14,30
14 14 <string>Form</string>
15 15 </property>
16 16 <layout class="QVBoxLayout" name="verticalLayout_2">
17 <item>
18 <widget class="QGroupBox" name="groupBox">
19 <property name="title">
20 <string>Inspector</string>
17 <property name="leftMargin">
18 <number>0</number>
21 19 </property>
22 <property name="flat">
23 <bool>false</bool>
20 <property name="topMargin">
21 <number>0</number>
24 22 </property>
25 <layout class="QVBoxLayout" name="verticalLayout">
26 <property name="spacing">
23 <property name="rightMargin">
27 24 <number>0</number>
28 25 </property>
26 <property name="bottomMargin">
27 <number>0</number>
28 </property>
29 <item>
30 <widget class="QFrame" name="frame">
31 <property name="frameShape">
32 <enum>QFrame::Box</enum>
33 </property>
34 <property name="frameShadow">
35 <enum>QFrame::Sunken</enum>
36 </property>
37 <property name="lineWidth">
38 <number>1</number>
39 </property>
40 <layout class="QVBoxLayout" name="verticalLayout">
29 41 <property name="leftMargin">
30 42 <number>0</number>
31 43 </property>
@@ -41,35 +53,36
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>
@@ -82,71 +95,85
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>
@@ -159,6 +186,20
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>
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