Merge lp:~stefan-schwarzburg/qreator/touch-reorganized into lp:qreator/touch
- touch-reorganized
- Merge into touch
Status: | Merged |
---|---|
Merged at revision: | 15 |
Proposed branch: | lp:~stefan-schwarzburg/qreator/touch-reorganized |
Merge into: | lp:qreator/touch |
Diff against target: |
666 lines (+297/-299) 9 files modified
qrcodes/PageQrText.qml (+38/-0) qrcodes/PageQrUrl.qml (+35/-0) qrcodes/PageQrWifi.qml (+88/-0) qreator-touch.qml (+30/-298) qreator/CreatorPage.qml (+75/-0) qreator/HistoryPage.qml (+9/-0) qreator/QrCodeCanvas.qml (+2/-1) qreator/QrCodeToolBar.qml (+6/-0) qreator/ScannerPage.qml (+14/-0) |
To merge this branch: | bzr merge lp:~stefan-schwarzburg/qreator/touch-reorganized |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Planella | Approve | ||
Review via email: mp+168470@code.launchpad.net |
Commit message
Description of the change
This branch mainly reorganizes the files we use:
- a folder "qreator" for all high level pages and items (the scanner page would go in here, as well as dialogs). One file per main component
- a folder "qrcodes" for all qrcode types we support when creating qr codes. Each data type has a separate file.
Certain components now have their own file: qrcanvas, qrtoolbar
This branch also introduces tabs as the main navigation structure. It still uses a pagestack within the "create" tab.
I have tried to change as few additional things as possible, the only exception is the location of the global property "pageSpacing". When using different files for the individual components, the only properties accessable seem to be properties of root.
Schwarzburg (stefan-schwarzburg) wrote : | # |
Your changes are perfect! Thanks for merging...
Preview Diff
1 | === added directory 'qrcodes' | |||
2 | === added file 'qrcodes/PageQrText.qml' | |||
3 | --- qrcodes/PageQrText.qml 1970-01-01 00:00:00 +0000 | |||
4 | +++ qrcodes/PageQrText.qml 2013-06-10 14:58:26 +0000 | |||
5 | @@ -0,0 +1,38 @@ | |||
6 | 1 | import QtQuick 2.0 | ||
7 | 2 | import Ubuntu.Components 0.1 | ||
8 | 3 | import Ubuntu.Components.ListItems 0.1 as ListItem | ||
9 | 4 | import Ubuntu.Components.Popups 0.1 | ||
10 | 5 | import QtQuick.LocalStorage 2.0 | ||
11 | 6 | |||
12 | 7 | import "../qreator" | ||
13 | 8 | |||
14 | 9 | import "../js/qrcode.js" as Qreator | ||
15 | 10 | |||
16 | 11 | Page { | ||
17 | 12 | id: pageQrText | ||
18 | 13 | title: i18n.tr("Text QR code") | ||
19 | 14 | visible: false | ||
20 | 15 | |||
21 | 16 | Column { | ||
22 | 17 | anchors.centerIn: parent | ||
23 | 18 | spacing: root.pageSpacing | ||
24 | 19 | |||
25 | 20 | TextArea { | ||
26 | 21 | id: textQrCodeText | ||
27 | 22 | placeholderText: i18n.tr("Type the text to encode") | ||
28 | 23 | autoSize: true | ||
29 | 24 | maximumLineCount: 5 | ||
30 | 25 | width: units.gu(33) | ||
31 | 26 | |||
32 | 27 | onTextChanged: {qrcanvastext.requestQrCodePaint(text)} | ||
33 | 28 | } | ||
34 | 29 | |||
35 | 30 | QrCodeCanvas { | ||
36 | 31 | id: qrcanvastext | ||
37 | 32 | width: units.gu(33) | ||
38 | 33 | height: units.gu(33) | ||
39 | 34 | } | ||
40 | 35 | } | ||
41 | 36 | tools: QrCodeToolBar{} | ||
42 | 37 | } | ||
43 | 38 | |||
44 | 0 | 39 | ||
45 | === added file 'qrcodes/PageQrUrl.qml' | |||
46 | --- qrcodes/PageQrUrl.qml 1970-01-01 00:00:00 +0000 | |||
47 | +++ qrcodes/PageQrUrl.qml 2013-06-10 14:58:26 +0000 | |||
48 | @@ -0,0 +1,35 @@ | |||
49 | 1 | import QtQuick 2.0 | ||
50 | 2 | import Ubuntu.Components 0.1 | ||
51 | 3 | import Ubuntu.Components.ListItems 0.1 as ListItem | ||
52 | 4 | import Ubuntu.Components.Popups 0.1 | ||
53 | 5 | import QtQuick.LocalStorage 2.0 | ||
54 | 6 | |||
55 | 7 | import "../qreator" | ||
56 | 8 | |||
57 | 9 | |||
58 | 10 | Page { | ||
59 | 11 | id: pageQrUrl | ||
60 | 12 | title: i18n.tr("URL QR code") | ||
61 | 13 | visible: false | ||
62 | 14 | |||
63 | 15 | Column { | ||
64 | 16 | anchors.centerIn: parent | ||
65 | 17 | spacing: root.pageSpacing | ||
66 | 18 | |||
67 | 19 | TextField { | ||
68 | 20 | id: textQrCodeUrl | ||
69 | 21 | width: units.gu(33) | ||
70 | 22 | placeholderText: i18n.tr("Type the URL to encode") | ||
71 | 23 | hasClearButton: true | ||
72 | 24 | |||
73 | 25 | onTextChanged: {qrcanvasurl.requestQrCodePaint(text)} | ||
74 | 26 | } | ||
75 | 27 | |||
76 | 28 | QrCodeCanvas { | ||
77 | 29 | id: qrcanvasurl | ||
78 | 30 | width: units.gu(33) | ||
79 | 31 | height: units.gu(33) | ||
80 | 32 | } | ||
81 | 33 | } | ||
82 | 34 | tools: QrCodeToolBar{} | ||
83 | 35 | } | ||
84 | 0 | 36 | ||
85 | === added file 'qrcodes/PageQrWifi.qml' | |||
86 | --- qrcodes/PageQrWifi.qml 1970-01-01 00:00:00 +0000 | |||
87 | +++ qrcodes/PageQrWifi.qml 2013-06-10 14:58:26 +0000 | |||
88 | @@ -0,0 +1,88 @@ | |||
89 | 1 | import QtQuick 2.0 | ||
90 | 2 | import Ubuntu.Components 0.1 | ||
91 | 3 | import Ubuntu.Components.ListItems 0.1 as ListItem | ||
92 | 4 | import Ubuntu.Components.Popups 0.1 | ||
93 | 5 | import QtQuick.LocalStorage 2.0 | ||
94 | 6 | |||
95 | 7 | import "../qreator" | ||
96 | 8 | |||
97 | 9 | |||
98 | 10 | Page { | ||
99 | 11 | id: pageQrWifi | ||
100 | 12 | title: i18n.tr("Wireless access QR code") | ||
101 | 13 | visible: false | ||
102 | 14 | |||
103 | 15 | ListModel { | ||
104 | 16 | id: wifiSecurity | ||
105 | 17 | ListElement { | ||
106 | 18 | security: "WPA" | ||
107 | 19 | index: 0 | ||
108 | 20 | } | ||
109 | 21 | ListElement { | ||
110 | 22 | security: "WEP" | ||
111 | 23 | index: 1 | ||
112 | 24 | } | ||
113 | 25 | ListElement { | ||
114 | 26 | security: "No security" | ||
115 | 27 | index: 2 | ||
116 | 28 | } | ||
117 | 29 | } | ||
118 | 30 | |||
119 | 31 | Column { | ||
120 | 32 | anchors.centerIn: parent | ||
121 | 33 | spacing: units.gu(4) | ||
122 | 34 | |||
123 | 35 | Column { | ||
124 | 36 | spacing: units.gu(2) | ||
125 | 37 | |||
126 | 38 | TextField { | ||
127 | 39 | id: textQrCodeSsid | ||
128 | 40 | placeholderText: i18n.tr("Type the wifi network's identifier") | ||
129 | 41 | hasClearButton: true | ||
130 | 42 | width: units.gu(33) | ||
131 | 43 | |||
132 | 44 | onTextChanged: {qrcanvaswifi.requestQrCodePaint(text)} | ||
133 | 45 | } | ||
134 | 46 | |||
135 | 47 | Button { | ||
136 | 48 | id: selectorSecurity | ||
137 | 49 | //property int currencyIndex: 0 | ||
138 | 50 | //property TextField input: inputFrom | ||
139 | 51 | //text: currencies.getCurrency(currencyIndex) | ||
140 | 52 | // open the popover | ||
141 | 53 | text: i18n.tr("Select security") | ||
142 | 54 | width: units.gu(33) | ||
143 | 55 | onClicked: PopupUtils.open(popoverWifiSecurity, selectorSecurity) | ||
144 | 56 | onTextChanged: {qrcanvaswifi.requestQrCodePaint(text)} | ||
145 | 57 | } | ||
146 | 58 | |||
147 | 59 | Row { | ||
148 | 60 | spacing: units.gu(2) | ||
149 | 61 | |||
150 | 62 | TextField { | ||
151 | 63 | id: textQrCodePassword | ||
152 | 64 | placeholderText: i18n.tr("Type the wifi network's password") | ||
153 | 65 | hasClearButton: true | ||
154 | 66 | echoMode: switchPassword.checked ? TextInput.Normal : TextInput.Password | ||
155 | 67 | width: units.gu(33) - parent.spacing - switchPassword.width | ||
156 | 68 | |||
157 | 69 | onTextChanged: {qrcanvaswifi.requestQrCodePaint(text)} | ||
158 | 70 | } | ||
159 | 71 | |||
160 | 72 | Switch { | ||
161 | 73 | id: switchPassword | ||
162 | 74 | checked: false | ||
163 | 75 | |||
164 | 76 | //onClicked: | ||
165 | 77 | } | ||
166 | 78 | } | ||
167 | 79 | } | ||
168 | 80 | |||
169 | 81 | QrCodeCanvas { | ||
170 | 82 | id: qrcanvaswifi | ||
171 | 83 | width: units.gu(33) | ||
172 | 84 | height: units.gu(33) | ||
173 | 85 | } | ||
174 | 86 | } | ||
175 | 87 | tools: QrCodeToolBar{} | ||
176 | 88 | } | ||
177 | 0 | \ No newline at end of file | 89 | \ No newline at end of file |
178 | 1 | 90 | ||
179 | === added directory 'qreator' | |||
180 | === modified file 'qreator-touch.qml' | |||
181 | --- qreator-touch.qml 2013-05-20 13:31:05 +0000 | |||
182 | +++ qreator-touch.qml 2013-06-10 14:58:26 +0000 | |||
183 | @@ -1,11 +1,14 @@ | |||
184 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
185 | 2 | import Ubuntu.Components 0.1 | 2 | import Ubuntu.Components 0.1 |
186 | 3 | |||
187 | 3 | import Ubuntu.Components.ListItems 0.1 as ListItem | 4 | import Ubuntu.Components.ListItems 0.1 as ListItem |
188 | 4 | import Ubuntu.Components.Popups 0.1 | 5 | import Ubuntu.Components.Popups 0.1 |
189 | 5 | import QtGraphicalEffects 1.0 | 6 | import QtGraphicalEffects 1.0 |
190 | 6 | 7 | ||
191 | 8 | import "qreator" | ||
192 | 9 | |||
193 | 7 | MainView { | 10 | MainView { |
195 | 8 | // We defint objectName for functional testing purposes | 11 | // We define objectName for functional testing purposes |
196 | 9 | // (autopilot-qt5) | 12 | // (autopilot-qt5) |
197 | 10 | objectName: "mainView" | 13 | objectName: "mainView" |
198 | 11 | applicationName: "qreator-touch" | 14 | applicationName: "qreator-touch" |
199 | @@ -14,302 +17,31 @@ | |||
200 | 14 | width: units.gu(50) | 17 | width: units.gu(50) |
201 | 15 | height: units.gu(75) | 18 | height: units.gu(75) |
202 | 16 | 19 | ||
500 | 17 | PageStack { | 20 | property real pageSpacing: units.gu(6) |
501 | 18 | id: pageStack | 21 | |
502 | 19 | property real pageSpacing: units.gu(6) | 22 | Tabs { |
503 | 20 | 23 | id: tabs | |
504 | 21 | anchors { | 24 | Tab { |
505 | 22 | fill: parent | 25 | objectName: "TabScanner" |
506 | 23 | } | 26 | title: i18n.tr("Scan") |
507 | 24 | 27 | page: ScannerPage { | |
508 | 25 | Component.onCompleted: push(pageRoot) | 28 | id: scannerPage |
509 | 26 | 29 | } | |
510 | 27 | Page { | 30 | } |
511 | 28 | id: pageRoot | 31 | Tab { |
512 | 29 | title: i18n.tr("QR code type") | 32 | objectName: "TabQreator" |
513 | 30 | visible: false | 33 | title: i18n.tr("Create") |
514 | 31 | 34 | page: CreatorPage { | |
515 | 32 | Column { | 35 | id: creatorPage |
516 | 33 | anchors.fill: parent | 36 | } |
517 | 34 | ListItem.Standard { | 37 | } |
518 | 35 | id: itemQrText | 38 | Tab { |
519 | 36 | text: i18n.tr("Text") | 39 | objectName: "TabHistory" |
520 | 37 | icon: Qt.resolvedUrl("img/text.png") | 40 | title: i18n.tr("History") |
521 | 38 | onClicked: pageStack.push(pageQrText) | 41 | page: HistoryPage { |
522 | 39 | progression: true | 42 | id: historyPage |
523 | 40 | } | 43 | } |
524 | 41 | ListItem.Standard { | 44 | } |
525 | 42 | id: itemQrUrl | 45 | } |
229 | 43 | text: i18n.tr("URL") | ||
230 | 44 | icon: Qt.resolvedUrl("img/url.png") | ||
231 | 45 | onClicked: pageStack.push(pageQrUrl) | ||
232 | 46 | progression: true | ||
233 | 47 | } | ||
234 | 48 | ListItem.Standard { | ||
235 | 49 | id: itemQrWifi | ||
236 | 50 | text: i18n.tr("Wifi") | ||
237 | 51 | icon: Qt.resolvedUrl("img/wifi.png") | ||
238 | 52 | onClicked: pageStack.push(pageQrWifi) | ||
239 | 53 | progression: true | ||
240 | 54 | } | ||
241 | 55 | } | ||
242 | 56 | |||
243 | 57 | tools: ToolbarActions { | ||
244 | 58 | Action { | ||
245 | 59 | text: i18n.tr("About") | ||
246 | 60 | iconSource: Qt.resolvedUrl("img/about.png") | ||
247 | 61 | onTriggered: pageStack.push(pageAbout) | ||
248 | 62 | } | ||
249 | 63 | Action { | ||
250 | 64 | text: i18n.tr("History") | ||
251 | 65 | iconSource: Qt.resolvedUrl("img/history.png") | ||
252 | 66 | onTriggered: pageStack.push(pageHistory) | ||
253 | 67 | } | ||
254 | 68 | Action { | ||
255 | 69 | text: i18n.tr("Settings") | ||
256 | 70 | iconSource: Qt.resolvedUrl("img/settings.png") | ||
257 | 71 | onTriggered: pageStack.push(pageSettings) | ||
258 | 72 | } | ||
259 | 73 | } | ||
260 | 74 | } | ||
261 | 75 | |||
262 | 76 | Page { | ||
263 | 77 | id: pageQrText | ||
264 | 78 | title: i18n.tr("Text QR code") | ||
265 | 79 | visible: false | ||
266 | 80 | |||
267 | 81 | Column { | ||
268 | 82 | anchors.centerIn: parent | ||
269 | 83 | spacing: pageStack.pageSpacing | ||
270 | 84 | |||
271 | 85 | TextArea { | ||
272 | 86 | id: textQrCodeText | ||
273 | 87 | placeholderText: i18n.tr("Type the text to encode") | ||
274 | 88 | autoSize: true | ||
275 | 89 | maximumLineCount: 5 | ||
276 | 90 | width: units.gu(33) | ||
277 | 91 | |||
278 | 92 | onTextChanged: {qrcanvastext.requestQrCodePaint(text)} | ||
279 | 93 | } | ||
280 | 94 | |||
281 | 95 | QrCodeCanvas { | ||
282 | 96 | id: qrcanvastext | ||
283 | 97 | width: units.gu(33) | ||
284 | 98 | height: units.gu(33) | ||
285 | 99 | } | ||
286 | 100 | } | ||
287 | 101 | |||
288 | 102 | } | ||
289 | 103 | |||
290 | 104 | Page { | ||
291 | 105 | id: pageQrUrl | ||
292 | 106 | title: i18n.tr("URL QR code") | ||
293 | 107 | visible: false | ||
294 | 108 | |||
295 | 109 | Column { | ||
296 | 110 | anchors.centerIn: parent | ||
297 | 111 | spacing: pageStack.pageSpacing | ||
298 | 112 | |||
299 | 113 | TextField { | ||
300 | 114 | id: textQrCodeUrl | ||
301 | 115 | width: units.gu(33) | ||
302 | 116 | placeholderText: i18n.tr("Type the URL to encode") | ||
303 | 117 | hasClearButton: true | ||
304 | 118 | |||
305 | 119 | onTextChanged: {qrcanvasurl.requestQrCodePaint(text)} | ||
306 | 120 | } | ||
307 | 121 | |||
308 | 122 | QrCodeCanvas { | ||
309 | 123 | id: qrcanvasurl | ||
310 | 124 | width: units.gu(33) | ||
311 | 125 | height: units.gu(33) | ||
312 | 126 | } | ||
313 | 127 | } | ||
314 | 128 | |||
315 | 129 | //tools: Loader {sourceComponent: qrcodetoolbar} | ||
316 | 130 | //tools: qrcodetoolbar | ||
317 | 131 | } | ||
318 | 132 | |||
319 | 133 | Page { | ||
320 | 134 | id: pageQrWifi | ||
321 | 135 | title: i18n.tr("Wireless access QR code") | ||
322 | 136 | visible: false | ||
323 | 137 | |||
324 | 138 | ListModel { | ||
325 | 139 | id: wifiSecurity | ||
326 | 140 | ListElement { | ||
327 | 141 | security: "WPA" | ||
328 | 142 | index: 0 | ||
329 | 143 | } | ||
330 | 144 | ListElement { | ||
331 | 145 | security: "WEP" | ||
332 | 146 | index: 1 | ||
333 | 147 | } | ||
334 | 148 | ListElement { | ||
335 | 149 | security: "No security" | ||
336 | 150 | index: 2 | ||
337 | 151 | } | ||
338 | 152 | } | ||
339 | 153 | |||
340 | 154 | Column { | ||
341 | 155 | anchors.centerIn: parent | ||
342 | 156 | spacing: units.gu(4) | ||
343 | 157 | |||
344 | 158 | Column { | ||
345 | 159 | spacing: units.gu(2) | ||
346 | 160 | |||
347 | 161 | TextField { | ||
348 | 162 | id: textQrCodeSsid | ||
349 | 163 | placeholderText: i18n.tr("Type the wifi network's identifier") | ||
350 | 164 | hasClearButton: true | ||
351 | 165 | width: units.gu(33) | ||
352 | 166 | |||
353 | 167 | onTextChanged: {qrcanvaswifi.requestQrCodePaint(text)} | ||
354 | 168 | } | ||
355 | 169 | |||
356 | 170 | Button { | ||
357 | 171 | id: selectorSecurity | ||
358 | 172 | //property int currencyIndex: 0 | ||
359 | 173 | //property TextField input: inputFrom | ||
360 | 174 | //text: currencies.getCurrency(currencyIndex) | ||
361 | 175 | // open the popover | ||
362 | 176 | text: i18n.tr("Select security") | ||
363 | 177 | width: units.gu(33) | ||
364 | 178 | onClicked: PopupUtils.open(popoverWifiSecurity, selectorSecurity) | ||
365 | 179 | onTextChanged: {qrcanvaswifi.requestQrCodePaint(text)} | ||
366 | 180 | } | ||
367 | 181 | |||
368 | 182 | Row { | ||
369 | 183 | spacing: units.gu(2) | ||
370 | 184 | |||
371 | 185 | TextField { | ||
372 | 186 | id: textQrCodePassword | ||
373 | 187 | placeholderText: i18n.tr("Type the wifi network's password") | ||
374 | 188 | hasClearButton: true | ||
375 | 189 | echoMode: switchPassword.checked ? TextInput.Normal : TextInput.Password | ||
376 | 190 | width: units.gu(33) - parent.spacing - switchPassword.width | ||
377 | 191 | |||
378 | 192 | onTextChanged: {qrcanvaswifi.requestQrCodePaint(text)} | ||
379 | 193 | } | ||
380 | 194 | |||
381 | 195 | Switch { | ||
382 | 196 | id: switchPassword | ||
383 | 197 | checked: false | ||
384 | 198 | |||
385 | 199 | //onClicked: | ||
386 | 200 | } | ||
387 | 201 | } | ||
388 | 202 | } | ||
389 | 203 | |||
390 | 204 | QrCodeCanvas { | ||
391 | 205 | id: qrcanvaswifi | ||
392 | 206 | width: units.gu(33) | ||
393 | 207 | height: units.gu(33) | ||
394 | 208 | } | ||
395 | 209 | } | ||
396 | 210 | |||
397 | 211 | } | ||
398 | 212 | |||
399 | 213 | Page { | ||
400 | 214 | id: pageSettings | ||
401 | 215 | title: i18n.tr("Settings") | ||
402 | 216 | visible: false | ||
403 | 217 | |||
404 | 218 | Column { | ||
405 | 219 | |||
406 | 220 | } | ||
407 | 221 | } | ||
408 | 222 | |||
409 | 223 | Page { | ||
410 | 224 | id: pageAbout | ||
411 | 225 | title: i18n.tr("About") | ||
412 | 226 | visible: false | ||
413 | 227 | |||
414 | 228 | Column { | ||
415 | 229 | |||
416 | 230 | } | ||
417 | 231 | } | ||
418 | 232 | |||
419 | 233 | Page { | ||
420 | 234 | id: pageHistory | ||
421 | 235 | title: i18n.tr("History") | ||
422 | 236 | visible: false | ||
423 | 237 | |||
424 | 238 | Column { | ||
425 | 239 | |||
426 | 240 | } | ||
427 | 241 | } | ||
428 | 242 | |||
429 | 243 | } | ||
430 | 244 | |||
431 | 245 | Component { | ||
432 | 246 | id: popoverWifiSecurity | ||
433 | 247 | Popover { | ||
434 | 248 | Column { | ||
435 | 249 | anchors { | ||
436 | 250 | top: parent.top | ||
437 | 251 | left: parent.left | ||
438 | 252 | right: parent.right | ||
439 | 253 | } | ||
440 | 254 | // Make sure the Popover doesn't flow off the screen | ||
441 | 255 | height: units.gu(33) //getHeight() | ||
442 | 256 | |||
443 | 257 | //units.gu(33) //wifiSecurity.count * wifiSecurity.get(0).height //units.gu(33)//root.height | ||
444 | 258 | |||
445 | 259 | function getHeight () { | ||
446 | 260 | var firstElement = wifiSecurity.get(0); | ||
447 | 261 | console.log(firstElement.security); | ||
448 | 262 | return wifiSecurity.count * firstElement.height; | ||
449 | 263 | } | ||
450 | 264 | |||
451 | 265 | |||
452 | 266 | // Header displaying title | ||
453 | 267 | ListItem.Header { | ||
454 | 268 | id: header | ||
455 | 269 | text: i18n.tr("Select security") | ||
456 | 270 | } | ||
457 | 271 | // List of security modes | ||
458 | 272 | ListView { | ||
459 | 273 | clip: true | ||
460 | 274 | width: parent.width | ||
461 | 275 | height: parent.height - header.height | ||
462 | 276 | model: wifiSecurity | ||
463 | 277 | delegate: ListItem.Standard { | ||
464 | 278 | text: security | ||
465 | 279 | onClicked: { | ||
466 | 280 | caller.text = security | ||
467 | 281 | //caller.input.update() | ||
468 | 282 | hide() | ||
469 | 283 | } | ||
470 | 284 | } | ||
471 | 285 | } | ||
472 | 286 | } | ||
473 | 287 | } | ||
474 | 288 | } | ||
475 | 289 | |||
476 | 290 | |||
477 | 291 | Component { | ||
478 | 292 | id: qrcodetoolbar | ||
479 | 293 | //Item { | ||
480 | 294 | ToolbarActions { | ||
481 | 295 | Action { | ||
482 | 296 | text: i18n.tr("Edit") | ||
483 | 297 | iconSource: Qt.resolvedUrl("img/about.png") | ||
484 | 298 | //onTriggered: pageStack.push(pageAbout) | ||
485 | 299 | } | ||
486 | 300 | Action { | ||
487 | 301 | text: i18n.tr("Save") | ||
488 | 302 | iconSource: Qt.resolvedUrl("img/history.png") | ||
489 | 303 | //onTriggered: pageStack.push(pageHistory) | ||
490 | 304 | } | ||
491 | 305 | Action { | ||
492 | 306 | text: i18n.tr("Share") | ||
493 | 307 | iconSource: Qt.resolvedUrl("img/settings.png") | ||
494 | 308 | //onTriggered: pageStack.push(pageSettings) | ||
495 | 309 | } | ||
496 | 310 | } | ||
497 | 311 | //} | ||
498 | 312 | } | ||
499 | 313 | |||
526 | 314 | } | 46 | } |
527 | 315 | 47 | ||
528 | 316 | 48 | ||
529 | === added file 'qreator/CreatorPage.qml' | |||
530 | --- qreator/CreatorPage.qml 1970-01-01 00:00:00 +0000 | |||
531 | +++ qreator/CreatorPage.qml 2013-06-10 14:58:26 +0000 | |||
532 | @@ -0,0 +1,75 @@ | |||
533 | 1 | import QtQuick 2.0 | ||
534 | 2 | import Ubuntu.Components 0.1 | ||
535 | 3 | import Ubuntu.Components.ListItems 0.1 as ListItem | ||
536 | 4 | import Ubuntu.Components.Popups 0.1 | ||
537 | 5 | import QtGraphicalEffects 1.0 | ||
538 | 6 | |||
539 | 7 | import "../qrcodes/" | ||
540 | 8 | |||
541 | 9 | PageStack { | ||
542 | 10 | id: pageStack | ||
543 | 11 | |||
544 | 12 | anchors { | ||
545 | 13 | fill: parent | ||
546 | 14 | } | ||
547 | 15 | |||
548 | 16 | Component.onCompleted: push(pageRoot) | ||
549 | 17 | |||
550 | 18 | |||
551 | 19 | // QR code datatypes | ||
552 | 20 | PageQrText {id: pageQrText} | ||
553 | 21 | PageQrUrl {id: pageQrUrl} | ||
554 | 22 | PageQrWifi {id: pageQrWifi} | ||
555 | 23 | |||
556 | 24 | |||
557 | 25 | // Overview of possible datatypes | ||
558 | 26 | Page { | ||
559 | 27 | id: pageRoot | ||
560 | 28 | title: i18n.tr("QR code type") | ||
561 | 29 | visible: false | ||
562 | 30 | |||
563 | 31 | |||
564 | 32 | Column { | ||
565 | 33 | anchors.fill: parent | ||
566 | 34 | ListItem.Standard { | ||
567 | 35 | id: itemQrText | ||
568 | 36 | text: i18n.tr("Text") | ||
569 | 37 | icon: Qt.resolvedUrl("../img/text.png") | ||
570 | 38 | onClicked: pageStack.push(pageQrText) | ||
571 | 39 | progression: true | ||
572 | 40 | } | ||
573 | 41 | ListItem.Standard { | ||
574 | 42 | id: itemQrUrl | ||
575 | 43 | text: i18n.tr("URL") | ||
576 | 44 | icon: Qt.resolvedUrl("../img/url.png") | ||
577 | 45 | onClicked: pageStack.push(pageQrUrl) | ||
578 | 46 | progression: true | ||
579 | 47 | } | ||
580 | 48 | ListItem.Standard { | ||
581 | 49 | id: itemQrWifi | ||
582 | 50 | text: i18n.tr("Wifi") | ||
583 | 51 | icon: Qt.resolvedUrl("../img/wifi.png") | ||
584 | 52 | onClicked: pageStack.push(pageQrWifi) | ||
585 | 53 | progression: true | ||
586 | 54 | } | ||
587 | 55 | } | ||
588 | 56 | |||
589 | 57 | tools: ToolbarActions { | ||
590 | 58 | Action { | ||
591 | 59 | text: i18n.tr("About") | ||
592 | 60 | iconSource: Qt.resolvedUrl("../img/about.png") | ||
593 | 61 | onTriggered: pageStack.push(pageAbout) | ||
594 | 62 | } | ||
595 | 63 | Action { | ||
596 | 64 | text: i18n.tr("History") | ||
597 | 65 | iconSource: Qt.resolvedUrl("../img/history.png") | ||
598 | 66 | onTriggered: pageStack.push(pageHistory) | ||
599 | 67 | } | ||
600 | 68 | Action { | ||
601 | 69 | text: i18n.tr("Settings") | ||
602 | 70 | iconSource: Qt.resolvedUrl("../img/settings.png") | ||
603 | 71 | onTriggered: pageStack.push(pageSettings) | ||
604 | 72 | } | ||
605 | 73 | } | ||
606 | 74 | } | ||
607 | 75 | } | ||
608 | 0 | 76 | ||
609 | === added file 'qreator/HistoryPage.qml' | |||
610 | --- qreator/HistoryPage.qml 1970-01-01 00:00:00 +0000 | |||
611 | +++ qreator/HistoryPage.qml 2013-06-10 14:58:26 +0000 | |||
612 | @@ -0,0 +1,9 @@ | |||
613 | 1 | import QtQuick 2.0 | ||
614 | 2 | import Ubuntu.Components 0.1 | ||
615 | 3 | |||
616 | 4 | Page { | ||
617 | 5 | id: pageRoot | ||
618 | 6 | title: i18n.tr("Scan") | ||
619 | 7 | visible: false | ||
620 | 8 | |||
621 | 9 | } | ||
622 | 0 | 10 | ||
623 | === renamed file 'QrCodeCanvas.qml' => 'qreator/QrCodeCanvas.qml' | |||
624 | --- QrCodeCanvas.qml 2013-02-16 14:27:12 +0000 | |||
625 | +++ qreator/QrCodeCanvas.qml 2013-06-10 14:58:26 +0000 | |||
626 | @@ -1,7 +1,8 @@ | |||
627 | 1 | import QtQuick 2.0 | 1 | import QtQuick 2.0 |
628 | 2 | import QtGraphicalEffects 1.0 | 2 | import QtGraphicalEffects 1.0 |
629 | 3 | import Ubuntu.Components 0.1 | 3 | import Ubuntu.Components 0.1 |
631 | 4 | import "js/qrcode.js" as QrCode | 4 | |
632 | 5 | import "../js/qrcode.js" as QrCode | ||
633 | 5 | 6 | ||
634 | 6 | Item { | 7 | Item { |
635 | 7 | id: container | 8 | id: container |
636 | 8 | 9 | ||
637 | === added file 'qreator/QrCodeToolBar.qml' | |||
638 | --- qreator/QrCodeToolBar.qml 1970-01-01 00:00:00 +0000 | |||
639 | +++ qreator/QrCodeToolBar.qml 2013-06-10 14:58:26 +0000 | |||
640 | @@ -0,0 +1,6 @@ | |||
641 | 1 | import QtQuick 2.0 | ||
642 | 2 | import Ubuntu.Components 0.1 | ||
643 | 3 | import QtQuick.LocalStorage 2.0 | ||
644 | 4 | |||
645 | 5 | ToolbarActions { | ||
646 | 6 | } | ||
647 | 0 | \ No newline at end of file | 7 | \ No newline at end of file |
648 | 1 | 8 | ||
649 | === added file 'qreator/ScannerPage.qml' | |||
650 | --- qreator/ScannerPage.qml 1970-01-01 00:00:00 +0000 | |||
651 | +++ qreator/ScannerPage.qml 2013-06-10 14:58:26 +0000 | |||
652 | @@ -0,0 +1,14 @@ | |||
653 | 1 | import QtQuick 2.0 | ||
654 | 2 | import Ubuntu.Components 0.1 | ||
655 | 3 | |||
656 | 4 | import Ubuntu.Components.ListItems 0.1 as ListItem | ||
657 | 5 | import Ubuntu.Components.Popups 0.1 | ||
658 | 6 | import QtGraphicalEffects 1.0 | ||
659 | 7 | |||
660 | 8 | |||
661 | 9 | Page { | ||
662 | 10 | id: pageRoot | ||
663 | 11 | title: i18n.tr("Scan") | ||
664 | 12 | visible: false | ||
665 | 13 | |||
666 | 14 | } |
Looks good to me, thanks!
Before merging to trunk, I've gone ahead and did a few extra changes. Mostly they were to fix some indentations, but the main one is that I renamed file names such as CreatorPage to Creator, as I thought they should not be dependent on the base component, especially if we change the UI at some point and they're no longer pages. I left the *Canvas and *Toolbar ones unchanged, as I thought these are intrinsically associated with their component, and the name helps clarifying what they are.
Let me know if you're ok with this changes. If not, we can always discuss and revert.
You can see the actual changes doing:
bzr qdiff -r 14.1.1..15