@@ -0,0 +1,25 | |||
|
1 | #ifndef SCIQLOP_DATASOURCEWIDGET_H | |
|
2 | #define SCIQLOP_DATASOURCEWIDGET_H | |
|
3 | ||
|
4 | #include <Common/spimpl.h> | |
|
5 | ||
|
6 | #include <QWidget> | |
|
7 | ||
|
8 | class DataSourceItem; | |
|
9 | ||
|
10 | /** | |
|
11 | * @brief The DataSourceWidget handles the graphical representation (as a tree) of the data sources | |
|
12 | * attached to SciQlop. | |
|
13 | */ | |
|
14 | class DataSourceWidget : public QWidget { | |
|
15 | Q_OBJECT | |
|
16 | ||
|
17 | public: | |
|
18 | explicit DataSourceWidget(QWidget *parent = 0); | |
|
19 | ||
|
20 | private: | |
|
21 | class DataSourceWidgetPrivate; | |
|
22 | spimpl::unique_impl_ptr<DataSourceWidgetPrivate> impl; | |
|
23 | }; | |
|
24 | ||
|
25 | #endif // SCIQLOP_DATASOURCEWIDGET_H |
@@ -0,0 +1,36 | |||
|
1 | #include <DataSource/DataSourceWidget.h> | |
|
2 | ||
|
3 | #include <ui_DataSourceWidget.h> | |
|
4 | ||
|
5 | #include <DataSource/DataSourceItem.h> | |
|
6 | #include <DataSource/DataSourceTreeWidgetItem.h> | |
|
7 | ||
|
8 | namespace { | |
|
9 | ||
|
10 | /// Number of columns displayed in the tree | |
|
11 | const auto TREE_NB_COLUMNS = 1; | |
|
12 | ||
|
13 | /// Header labels for the tree | |
|
14 | const auto TREE_HEADER_LABELS = QStringList{QObject::tr("Name")}; | |
|
15 | ||
|
16 | } // namespace | |
|
17 | ||
|
18 | class DataSourceWidget::DataSourceWidgetPrivate { | |
|
19 | public: | |
|
20 | explicit DataSourceWidgetPrivate(DataSourceWidget &widget) | |
|
21 | : m_Ui{std::make_unique<Ui::DataSourceWidget>()} | |
|
22 | { | |
|
23 | m_Ui->setupUi(&widget); | |
|
24 | ||
|
25 | // Set tree properties | |
|
26 | m_Ui->treeWidget->setColumnCount(TREE_NB_COLUMNS); | |
|
27 | m_Ui->treeWidget->setHeaderLabels(TREE_HEADER_LABELS); | |
|
28 | } | |
|
29 | ||
|
30 | std::unique_ptr<Ui::DataSourceWidget> m_Ui; | |
|
31 | }; | |
|
32 | ||
|
33 | DataSourceWidget::DataSourceWidget(QWidget *parent) | |
|
34 | : QWidget{parent}, impl{spimpl::make_unique_impl<DataSourceWidgetPrivate>(*this)} | |
|
35 | { | |
|
36 | } |
@@ -0,0 +1,24 | |||
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
|
2 | <ui version="4.0"> | |
|
3 | <class>DataSourceWidget</class> | |
|
4 | <widget class="QWidget" name="DataSourceWidget"> | |
|
5 | <property name="geometry"> | |
|
6 | <rect> | |
|
7 | <x>0</x> | |
|
8 | <y>0</y> | |
|
9 | <width>400</width> | |
|
10 | <height>300</height> | |
|
11 | </rect> | |
|
12 | </property> | |
|
13 | <property name="windowTitle"> | |
|
14 | <string>Data sources</string> | |
|
15 | </property> | |
|
16 | <layout class="QGridLayout" name="gridLayout"> | |
|
17 | <item row="0" column="0"> | |
|
18 | <widget class="QTreeWidget" name="treeWidget"/> | |
|
19 | </item> | |
|
20 | </layout> | |
|
21 | </widget> | |
|
22 | <resources/> | |
|
23 | <connections/> | |
|
24 | </ui> |
@@ -1,208 +1,214 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <ui version="4.0"> |
|
3 | 3 | <class>MainWindow</class> |
|
4 | 4 | <widget class="QMainWindow" name="MainWindow"> |
|
5 | 5 | <property name="geometry"> |
|
6 | 6 | <rect> |
|
7 | 7 | <x>0</x> |
|
8 | 8 | <y>0</y> |
|
9 | 9 | <width>800</width> |
|
10 | 10 | <height>600</height> |
|
11 | 11 | </rect> |
|
12 | 12 | </property> |
|
13 | 13 | <property name="windowTitle"> |
|
14 | 14 | <string>QLop</string> |
|
15 | 15 | </property> |
|
16 | 16 | <property name="dockNestingEnabled"> |
|
17 | 17 | <bool>true</bool> |
|
18 | 18 | </property> |
|
19 | 19 | <widget class="QWidget" name="centralWidget"> |
|
20 | 20 | <property name="enabled"> |
|
21 | 21 | <bool>true</bool> |
|
22 | 22 | </property> |
|
23 | 23 | <property name="sizePolicy"> |
|
24 | 24 | <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> |
|
25 | 25 | <horstretch>0</horstretch> |
|
26 | 26 | <verstretch>0</verstretch> |
|
27 | 27 | </sizepolicy> |
|
28 | 28 | </property> |
|
29 | 29 | <property name="maximumSize"> |
|
30 | 30 | <size> |
|
31 | 31 | <width>16777215</width> |
|
32 | 32 | <height>16777215</height> |
|
33 | 33 | </size> |
|
34 | 34 | </property> |
|
35 | 35 | <layout class="QHBoxLayout" name="horizontalLayout"> |
|
36 | 36 | <property name="spacing"> |
|
37 | 37 | <number>3</number> |
|
38 | 38 | </property> |
|
39 | 39 | <property name="leftMargin"> |
|
40 | 40 | <number>0</number> |
|
41 | 41 | </property> |
|
42 | 42 | <property name="topMargin"> |
|
43 | 43 | <number>0</number> |
|
44 | 44 | </property> |
|
45 | 45 | <property name="rightMargin"> |
|
46 | 46 | <number>0</number> |
|
47 | 47 | </property> |
|
48 | 48 | <property name="bottomMargin"> |
|
49 | 49 | <number>0</number> |
|
50 | 50 | </property> |
|
51 | 51 | <item> |
|
52 | 52 | <widget class="QWidget" name="leftInspectorWidget" native="true"> |
|
53 | 53 | <layout class="QHBoxLayout" name="horizontalLayout_2"> |
|
54 | 54 | <property name="spacing"> |
|
55 | 55 | <number>3</number> |
|
56 | 56 | </property> |
|
57 | 57 | <property name="leftMargin"> |
|
58 | 58 | <number>0</number> |
|
59 | 59 | </property> |
|
60 | 60 | <property name="topMargin"> |
|
61 | 61 | <number>0</number> |
|
62 | 62 | </property> |
|
63 | 63 | <property name="rightMargin"> |
|
64 | 64 | <number>0</number> |
|
65 | 65 | </property> |
|
66 | 66 | <property name="bottomMargin"> |
|
67 | 67 | <number>0</number> |
|
68 | 68 | </property> |
|
69 | 69 | <item> |
|
70 | 70 | <widget class="QWidget" name="widget" native="true"> |
|
71 | 71 | <layout class="QVBoxLayout" name="verticalLayout"> |
|
72 | 72 | <property name="spacing"> |
|
73 | 73 | <number>3</number> |
|
74 | 74 | </property> |
|
75 | 75 | <property name="leftMargin"> |
|
76 | 76 | <number>0</number> |
|
77 | 77 | </property> |
|
78 | 78 | <property name="topMargin"> |
|
79 | 79 | <number>0</number> |
|
80 | 80 | </property> |
|
81 | 81 | <property name="rightMargin"> |
|
82 | 82 | <number>0</number> |
|
83 | 83 | </property> |
|
84 | 84 | <property name="bottomMargin"> |
|
85 | 85 | <number>0</number> |
|
86 | 86 | </property> |
|
87 | 87 | <item> |
|
88 |
<widget class=" |
|
|
88 | <widget class="DataSourceWidget" name="dataSourceWidget" native="true"/> | |
|
89 | 89 | </item> |
|
90 | 90 | <item> |
|
91 | 91 | <widget class="QWidget" name="dateTimeWidget" native="true"/> |
|
92 | 92 | </item> |
|
93 | 93 | <item> |
|
94 | 94 | <widget class="QWidget" name="variableInspectorWidget" native="true"/> |
|
95 | 95 | </item> |
|
96 | 96 | </layout> |
|
97 | 97 | </widget> |
|
98 | 98 | </item> |
|
99 | 99 | <item> |
|
100 | 100 | <widget class="SqpSidePane" name="leftInspectorSidePane" native="true"> |
|
101 | 101 | <layout class="QVBoxLayout" name="verticalLayout_2"> |
|
102 | 102 | <property name="spacing"> |
|
103 | 103 | <number>3</number> |
|
104 | 104 | </property> |
|
105 | 105 | <property name="leftMargin"> |
|
106 | 106 | <number>0</number> |
|
107 | 107 | </property> |
|
108 | 108 | <property name="topMargin"> |
|
109 | 109 | <number>0</number> |
|
110 | 110 | </property> |
|
111 | 111 | <property name="rightMargin"> |
|
112 | 112 | <number>0</number> |
|
113 | 113 | </property> |
|
114 | 114 | <property name="bottomMargin"> |
|
115 | 115 | <number>0</number> |
|
116 | 116 | </property> |
|
117 | 117 | </layout> |
|
118 | 118 | </widget> |
|
119 | 119 | </item> |
|
120 | 120 | </layout> |
|
121 | 121 | </widget> |
|
122 | 122 | </item> |
|
123 | 123 | <item> |
|
124 | 124 | <widget class="VisualizationWidget" name="view" native="true"/> |
|
125 | 125 | </item> |
|
126 | 126 | <item> |
|
127 | 127 | <widget class="QWidget" name="rightInspectorWidget" native="true"> |
|
128 | 128 | <layout class="QHBoxLayout" name="horizontalLayout_3"> |
|
129 | 129 | <property name="spacing"> |
|
130 | 130 | <number>3</number> |
|
131 | 131 | </property> |
|
132 | 132 | <property name="leftMargin"> |
|
133 | 133 | <number>0</number> |
|
134 | 134 | </property> |
|
135 | 135 | <property name="topMargin"> |
|
136 | 136 | <number>0</number> |
|
137 | 137 | </property> |
|
138 | 138 | <property name="rightMargin"> |
|
139 | 139 | <number>0</number> |
|
140 | 140 | </property> |
|
141 | 141 | <property name="bottomMargin"> |
|
142 | 142 | <number>0</number> |
|
143 | 143 | </property> |
|
144 | 144 | <item> |
|
145 | 145 | <widget class="SqpSidePane" name="rightInspectorSidePane" native="true"/> |
|
146 | 146 | </item> |
|
147 | 147 | <item> |
|
148 | 148 | <widget class="QWidget" name="widget_2" native="true"> |
|
149 | 149 | <layout class="QVBoxLayout" name="verticalLayout_3"> |
|
150 | 150 | <property name="spacing"> |
|
151 | 151 | <number>3</number> |
|
152 | 152 | </property> |
|
153 | 153 | <property name="leftMargin"> |
|
154 | 154 | <number>0</number> |
|
155 | 155 | </property> |
|
156 | 156 | <property name="topMargin"> |
|
157 | 157 | <number>0</number> |
|
158 | 158 | </property> |
|
159 | 159 | <property name="rightMargin"> |
|
160 | 160 | <number>0</number> |
|
161 | 161 | </property> |
|
162 | 162 | <property name="bottomMargin"> |
|
163 | 163 | <number>0</number> |
|
164 | 164 | </property> |
|
165 | 165 | <item> |
|
166 | 166 | <widget class="QWidget" name="commonPropertyInspectorWidget" native="true"/> |
|
167 | 167 | </item> |
|
168 | 168 | <item> |
|
169 | 169 | <widget class="QWidget" name="catalogWidget" native="true"/> |
|
170 | 170 | </item> |
|
171 | 171 | </layout> |
|
172 | 172 | </widget> |
|
173 | 173 | </item> |
|
174 | 174 | </layout> |
|
175 | 175 | </widget> |
|
176 | 176 | </item> |
|
177 | 177 | </layout> |
|
178 | 178 | </widget> |
|
179 | 179 | <widget class="QMenuBar" name="menuBar"> |
|
180 | 180 | <property name="geometry"> |
|
181 | 181 | <rect> |
|
182 | 182 | <x>0</x> |
|
183 | 183 | <y>0</y> |
|
184 | 184 | <width>800</width> |
|
185 | 185 | <height>26</height> |
|
186 | 186 | </rect> |
|
187 | 187 | </property> |
|
188 | 188 | </widget> |
|
189 | 189 | <widget class="QStatusBar" name="statusBar"/> |
|
190 | 190 | </widget> |
|
191 | 191 | <layoutdefault spacing="6" margin="11"/> |
|
192 | 192 | <customwidgets> |
|
193 | 193 | <customwidget> |
|
194 | 194 | <class>VisualizationWidget</class> |
|
195 | 195 | <extends>QWidget</extends> |
|
196 | 196 | <header location="global">visualization/VisualizationWidget.h</header> |
|
197 | 197 | <container>1</container> |
|
198 | 198 | </customwidget> |
|
199 | 199 | <customwidget> |
|
200 | 200 | <class>SqpSidePane</class> |
|
201 | 201 | <extends>QWidget</extends> |
|
202 | 202 | <header location="global">sidepane/SqpSidePane.h</header> |
|
203 | 203 | <container>1</container> |
|
204 | 204 | </customwidget> |
|
205 | <customwidget> | |
|
206 | <class>DataSourceWidget</class> | |
|
207 | <extends>QWidget</extends> | |
|
208 | <header location="global">DataSource/DataSourceWidget.h</header> | |
|
209 | <container>1</container> | |
|
210 | </customwidget> | |
|
205 | 211 | </customwidgets> |
|
206 | 212 | <resources/> |
|
207 | 213 | <connections/> |
|
208 | 214 | </ui> |
General Comments 0
You need to be logged in to leave comments.
Login now