Merge lp:~nik90/component-store/add-welcome-wizard into lp:component-store
- add-welcome-wizard
- Merge into trunk.14.10
Proposed by
Nekhelesh Ramananthan
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 43 | ||||
Proposed branch: | lp:~nik90/component-store/add-welcome-wizard | ||||
Merge into: | lp:component-store | ||||
Diff against target: |
545 lines (+484/-1) 9 files modified
ComponentStore/WelcomeWizard/Walkthrough.qml (+116/-0) ComponentStore/WelcomeWizard/ubuntu_component_store.json (+6/-0) GallerySRC/Slide1.qml (+54/-0) GallerySRC/Slide2.qml (+42/-0) GallerySRC/WelcomeWizardWidget.qml (+41/-0) GallerySRC/WidgetsModel.qml (+5/-0) docs/_components/listitemwithactions.rst (+1/-1) docs/_components/welcomewizard.rst (+218/-0) docs/index.rst (+1/-0) |
||||
To merge this branch: | bzr merge lp:~nik90/component-store/add-welcome-wizard | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Touch Community Dev | Pending | ||
Review via email: mp+251599@code.launchpad.net |
Commit message
Added welcome wizard component
Description of the change
Adds welcome wizard component
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added directory 'ComponentStore/WelcomeWizard' | |||
2 | === added file 'ComponentStore/WelcomeWizard/Walkthrough.qml' | |||
3 | --- ComponentStore/WelcomeWizard/Walkthrough.qml 1970-01-01 00:00:00 +0000 | |||
4 | +++ ComponentStore/WelcomeWizard/Walkthrough.qml 2015-03-03 14:08:25 +0000 | |||
5 | @@ -0,0 +1,116 @@ | |||
6 | 1 | import QtQuick 2.3 | ||
7 | 2 | import Ubuntu.Components 1.1 | ||
8 | 3 | import Ubuntu.Components.ListItems 1.0 as ListItem | ||
9 | 4 | |||
10 | 5 | Page { | ||
11 | 6 | id: walkthrough | ||
12 | 7 | |||
13 | 8 | // Property to set the app name used in the walkthrough | ||
14 | 9 | property string appName | ||
15 | 10 | |||
16 | 11 | // Property to check if this is the first run or not | ||
17 | 12 | property bool isFirstRun: true | ||
18 | 13 | |||
19 | 14 | // Property to store the slides shown in the walkthrough (Each slide is a component defined in a separate file for simplicity) | ||
20 | 15 | property list<Component> model | ||
21 | 16 | |||
22 | 17 | // Property to set the color of bottom cirle to indicate the user's progress | ||
23 | 18 | property color completeColor: "green" | ||
24 | 19 | |||
25 | 20 | // Property to set the color of the bottom circle to indicate the slide still left to cover | ||
26 | 21 | property color inCompleteColor: "grey" | ||
27 | 22 | |||
28 | 23 | // Property to set the color of the skip welcome wizard text | ||
29 | 24 | property color skipTextColor: "grey" | ||
30 | 25 | |||
31 | 26 | // Property to signal walkthrough completion | ||
32 | 27 | signal finished | ||
33 | 28 | |||
34 | 29 | // ListView to show the slides | ||
35 | 30 | ListView { | ||
36 | 31 | id: listView | ||
37 | 32 | anchors { | ||
38 | 33 | left: parent.left | ||
39 | 34 | right: parent.right | ||
40 | 35 | top: skipLabel.bottom | ||
41 | 36 | bottom: separator.top | ||
42 | 37 | } | ||
43 | 38 | |||
44 | 39 | model: walkthrough.model | ||
45 | 40 | snapMode: ListView.SnapOneItem | ||
46 | 41 | orientation: Qt.Horizontal | ||
47 | 42 | highlightMoveDuration: UbuntuAnimation.FastDuration | ||
48 | 43 | highlightRangeMode: ListView.StrictlyEnforceRange | ||
49 | 44 | highlightFollowsCurrentItem: true | ||
50 | 45 | |||
51 | 46 | delegate: Item { | ||
52 | 47 | width: listView.width | ||
53 | 48 | height: listView.height | ||
54 | 49 | clip: true | ||
55 | 50 | |||
56 | 51 | Loader { | ||
57 | 52 | anchors { | ||
58 | 53 | fill: parent | ||
59 | 54 | margins: units.gu(2) | ||
60 | 55 | } | ||
61 | 56 | |||
62 | 57 | sourceComponent: modelData | ||
63 | 58 | } | ||
64 | 59 | } | ||
65 | 60 | } | ||
66 | 61 | |||
67 | 62 | // Label to skip the walkthrough. Only visible on the first slide | ||
68 | 63 | Label { | ||
69 | 64 | id: skipLabel | ||
70 | 65 | |||
71 | 66 | color: skipTextColor | ||
72 | 67 | fontSize: "small" | ||
73 | 68 | width: contentWidth | ||
74 | 69 | text: listView.currentIndex === 0 ? i18n.tr("Already used %1? <b>Skip the tutorial</b>").arg(appName) : i18n.tr("Skip") | ||
75 | 70 | |||
76 | 71 | anchors { | ||
77 | 72 | top: parent.top | ||
78 | 73 | left: parent.left | ||
79 | 74 | margins: units.gu(2) | ||
80 | 75 | } | ||
81 | 76 | |||
82 | 77 | MouseArea { | ||
83 | 78 | anchors.fill: parent | ||
84 | 79 | onClicked: walkthrough.finished() | ||
85 | 80 | } | ||
86 | 81 | } | ||
87 | 82 | |||
88 | 83 | // Separator between walkthrough slides and slide indicator | ||
89 | 84 | ListItem.ThinDivider { | ||
90 | 85 | id: separator | ||
91 | 86 | anchors.bottom: slideIndicator.top | ||
92 | 87 | } | ||
93 | 88 | |||
94 | 89 | // Indicator element to represent the current slide of the walkthrough | ||
95 | 90 | Row { | ||
96 | 91 | id: slideIndicator | ||
97 | 92 | height: units.gu(6) | ||
98 | 93 | spacing: units.gu(2) | ||
99 | 94 | anchors { | ||
100 | 95 | bottom: parent.bottom | ||
101 | 96 | horizontalCenter: parent.horizontalCenter | ||
102 | 97 | } | ||
103 | 98 | |||
104 | 99 | Repeater { | ||
105 | 100 | model: walkthrough.model.length | ||
106 | 101 | delegate: Rectangle { | ||
107 | 102 | height: width | ||
108 | 103 | radius: width/2 | ||
109 | 104 | width: units.gu(2) | ||
110 | 105 | antialiasing: true | ||
111 | 106 | anchors.verticalCenter: parent.verticalCenter | ||
112 | 107 | color: listView.currentIndex >= index ? completeColor : inCompleteColor | ||
113 | 108 | Behavior on color { | ||
114 | 109 | ColorAnimation { | ||
115 | 110 | duration: UbuntuAnimation.FastDuration | ||
116 | 111 | } | ||
117 | 112 | } | ||
118 | 113 | } | ||
119 | 114 | } | ||
120 | 115 | } | ||
121 | 116 | } | ||
122 | 0 | 117 | ||
123 | === added file 'ComponentStore/WelcomeWizard/ubuntu_component_store.json' | |||
124 | --- ComponentStore/WelcomeWizard/ubuntu_component_store.json 1970-01-01 00:00:00 +0000 | |||
125 | +++ ComponentStore/WelcomeWizard/ubuntu_component_store.json 2015-03-03 14:08:25 +0000 | |||
126 | @@ -0,0 +1,6 @@ | |||
127 | 1 | { | ||
128 | 2 | "name": "WelcomeWizard", | ||
129 | 3 | "description": "This widget adds a welcome wizard to help introduce the app to users.", | ||
130 | 4 | "version": "1.0", | ||
131 | 5 | "documentation_url": "http://ubuntu-component-store.readthedocs.org/en/latest/_components/circleimage.html" | ||
132 | 6 | } | ||
133 | 0 | 7 | ||
134 | === added file 'GallerySRC/Slide1.qml' | |||
135 | --- GallerySRC/Slide1.qml 1970-01-01 00:00:00 +0000 | |||
136 | +++ GallerySRC/Slide1.qml 2015-03-03 14:08:25 +0000 | |||
137 | @@ -0,0 +1,54 @@ | |||
138 | 1 | import QtQuick 2.3 | ||
139 | 2 | import Ubuntu.Components 1.1 | ||
140 | 3 | |||
141 | 4 | // Slide 1 | ||
142 | 5 | Component { | ||
143 | 6 | id: slide1 | ||
144 | 7 | Item { | ||
145 | 8 | id: slide1Container | ||
146 | 9 | |||
147 | 10 | UbuntuShape { | ||
148 | 11 | anchors { | ||
149 | 12 | bottom: textColumn.top | ||
150 | 13 | bottomMargin: units.gu(4) | ||
151 | 14 | horizontalCenter: parent.horizontalCenter | ||
152 | 15 | } | ||
153 | 16 | |||
154 | 17 | image: Image { | ||
155 | 18 | smooth: true | ||
156 | 19 | antialiasing: true | ||
157 | 20 | fillMode: Image.PreserveAspectFit | ||
158 | 21 | source: Qt.resolvedUrl("assets/flashback.png") | ||
159 | 22 | } | ||
160 | 23 | } | ||
161 | 24 | |||
162 | 25 | Column { | ||
163 | 26 | id: textColumn | ||
164 | 27 | |||
165 | 28 | anchors.centerIn: parent | ||
166 | 29 | |||
167 | 30 | Label { | ||
168 | 31 | text: "Welcome to" | ||
169 | 32 | fontSize: "x-large" | ||
170 | 33 | height: contentHeight | ||
171 | 34 | anchors.horizontalCenter: parent.horizontalCenter | ||
172 | 35 | } | ||
173 | 36 | Label { | ||
174 | 37 | text: "Component Store Gallery" | ||
175 | 38 | font.bold: true | ||
176 | 39 | height: contentHeight | ||
177 | 40 | font.pixelSize: units.dp(50) | ||
178 | 41 | anchors.horizontalCenter: parent.horizontalCenter | ||
179 | 42 | } | ||
180 | 43 | } | ||
181 | 44 | |||
182 | 45 | Label { | ||
183 | 46 | id: swipeText | ||
184 | 47 | text: "Swipe left to continue" | ||
185 | 48 | horizontalAlignment: Text.AlignHCenter | ||
186 | 49 | anchors.bottom: parent.bottom | ||
187 | 50 | anchors.bottomMargin: units.gu(2) | ||
188 | 51 | anchors.horizontalCenter: parent.horizontalCenter | ||
189 | 52 | } | ||
190 | 53 | } | ||
191 | 54 | } | ||
192 | 0 | 55 | ||
193 | === added file 'GallerySRC/Slide2.qml' | |||
194 | --- GallerySRC/Slide2.qml 1970-01-01 00:00:00 +0000 | |||
195 | +++ GallerySRC/Slide2.qml 2015-03-03 14:08:25 +0000 | |||
196 | @@ -0,0 +1,42 @@ | |||
197 | 1 | import QtQuick 2.3 | ||
198 | 2 | import Ubuntu.Components 1.1 | ||
199 | 3 | |||
200 | 4 | // Slide 2 | ||
201 | 5 | Component { | ||
202 | 6 | id: slide2 | ||
203 | 7 | Item { | ||
204 | 8 | id: slide2Container | ||
205 | 9 | |||
206 | 10 | Column { | ||
207 | 11 | id: mainColumn | ||
208 | 12 | spacing: units.gu(4) | ||
209 | 13 | anchors.fill: parent | ||
210 | 14 | |||
211 | 15 | Label { | ||
212 | 16 | id: introductionText | ||
213 | 17 | text: "Component Store Gallery" | ||
214 | 18 | font.bold: true | ||
215 | 19 | fontSize: "x-large" | ||
216 | 20 | anchors.horizontalCenter: parent.horizontalCenter | ||
217 | 21 | } | ||
218 | 22 | |||
219 | 23 | Image { | ||
220 | 24 | id: centerImage | ||
221 | 25 | height: parent.height - bodyText.contentHeight - introductionText.height - 4*mainColumn.spacing | ||
222 | 26 | fillMode: Image.PreserveAspectFit | ||
223 | 27 | anchors.horizontalCenter: parent.horizontalCenter | ||
224 | 28 | source: Qt.resolvedUrl("assets/flashback.png") | ||
225 | 29 | } | ||
226 | 30 | |||
227 | 31 | Label { | ||
228 | 32 | id: bodyText | ||
229 | 33 | anchors.left: parent.left | ||
230 | 34 | anchors.right: parent.right | ||
231 | 35 | wrapMode: Text.WordWrap | ||
232 | 36 | font.pixelSize: units.dp(17) | ||
233 | 37 | horizontalAlignment: Text.AlignHCenter | ||
234 | 38 | text: "Component Store Gallery is a frontend app to the component store and provides a demo of all the components in the store. \n\nUbuntu Touch's first component store!" | ||
235 | 39 | } | ||
236 | 40 | } | ||
237 | 41 | } | ||
238 | 42 | } | ||
239 | 0 | 43 | ||
240 | === added file 'GallerySRC/WelcomeWizardWidget.qml' | |||
241 | --- GallerySRC/WelcomeWizardWidget.qml 1970-01-01 00:00:00 +0000 | |||
242 | +++ GallerySRC/WelcomeWizardWidget.qml 2015-03-03 14:08:25 +0000 | |||
243 | @@ -0,0 +1,41 @@ | |||
244 | 1 | import QtQuick 2.0 | ||
245 | 2 | import Ubuntu.Components 1.1 | ||
246 | 3 | import "../ComponentStore/WelcomeWizard" | ||
247 | 4 | |||
248 | 5 | TemplateWidgetPage { | ||
249 | 6 | id: welcomeWizardWidget | ||
250 | 7 | |||
251 | 8 | title: "Welcome Wizard" | ||
252 | 9 | author: "Nekhelesh Ramananthan, Michael Spencer" | ||
253 | 10 | email: "nik90@ubuntu.com" | ||
254 | 11 | license: "GNU General Public License v3.0" | ||
255 | 12 | description: "This widget adds a welcome wizard which helps showcase the \ | ||
256 | 13 | app features to the user." | ||
257 | 14 | |||
258 | 15 | Component { | ||
259 | 16 | id: pageComponent | ||
260 | 17 | Walkthrough { | ||
261 | 18 | id: walkthrough | ||
262 | 19 | |||
263 | 20 | appName: "Component Store Gallery" | ||
264 | 21 | |||
265 | 22 | onFinished: { | ||
266 | 23 | console.log("Welcome Wizard Complete!") | ||
267 | 24 | stack.pop() | ||
268 | 25 | } | ||
269 | 26 | |||
270 | 27 | model: [ | ||
271 | 28 | Slide1{}, | ||
272 | 29 | Slide2{} | ||
273 | 30 | ] | ||
274 | 31 | } | ||
275 | 32 | } | ||
276 | 33 | |||
277 | 34 | content: Button { | ||
278 | 35 | text: "Preview Welcome Wizard Component" | ||
279 | 36 | color: "Green" | ||
280 | 37 | height: units.gu(6) | ||
281 | 38 | onClicked: stack.push(pageComponent) | ||
282 | 39 | anchors.centerIn: parent | ||
283 | 40 | } | ||
284 | 41 | } | ||
285 | 0 | 42 | ||
286 | === modified file 'GallerySRC/WidgetsModel.qml' | |||
287 | --- GallerySRC/WidgetsModel.qml 2014-11-15 13:52:44 +0000 | |||
288 | +++ GallerySRC/WidgetsModel.qml 2015-03-03 14:08:25 +0000 | |||
289 | @@ -32,4 +32,9 @@ | |||
290 | 32 | label: "Radial Bottom Edge" | 32 | label: "Radial Bottom Edge" |
291 | 33 | source: "GallerySRC/RadialBottomEdgeWidget.qml" | 33 | source: "GallerySRC/RadialBottomEdgeWidget.qml" |
292 | 34 | } | 34 | } |
293 | 35 | |||
294 | 36 | ListElement { | ||
295 | 37 | label: "Welcome Wizard" | ||
296 | 38 | source: "GallerySRC/WelcomeWizardWidget.qml" | ||
297 | 39 | } | ||
298 | 35 | } | 40 | } |
299 | 36 | 41 | ||
300 | === modified file 'docs/_components/listitemwithactions.rst' | |||
301 | --- docs/_components/listitemwithactions.rst 2014-11-15 14:59:11 +0000 | |||
302 | +++ docs/_components/listitemwithactions.rst 2015-03-03 14:08:25 +0000 | |||
303 | @@ -116,7 +116,7 @@ | |||
304 | 116 | 116 | ||
305 | 117 | Label { | 117 | Label { |
306 | 118 | id: subTitle | 118 | id: subTitle |
308 | 119 | text: "SubTitle | 119 | text: "SubTitle" |
309 | 120 | } | 120 | } |
310 | 121 | } | 121 | } |
311 | 122 | 122 | ||
312 | 123 | 123 | ||
313 | === added file 'docs/_components/welcomewizard.rst' | |||
314 | --- docs/_components/welcomewizard.rst 1970-01-01 00:00:00 +0000 | |||
315 | +++ docs/_components/welcomewizard.rst 2015-03-03 14:08:25 +0000 | |||
316 | @@ -0,0 +1,218 @@ | |||
317 | 1 | Welcome Wizard | ||
318 | 2 | ============== | ||
319 | 3 | |||
320 | 4 | +----------+----------------------------------------+ | ||
321 | 5 | | Author | Nekhelesh Ramananthan, Michael Spencer | | ||
322 | 6 | +----------+-------------+--------------------------+ | ||
323 | 7 | | License | BSD License | | ||
324 | 8 | +----------+----------------------------------------+ | ||
325 | 9 | | Contact | nik90@ubuntu.com | | ||
326 | 10 | +----------+----------------------------------------+ | ||
327 | 11 | | Framework| ubuntu-sdk-14.10 | | ||
328 | 12 | +----------+----------------------------------------+ | ||
329 | 13 | |||
330 | 14 | This component shows users a welcome wizard which can be used to introduce | ||
331 | 15 | and showcase the features of the app to guide the user. The API of this | ||
332 | 16 | component is rather simple and provides a lot of freedom to the developer | ||
333 | 17 | to present his content. | ||
334 | 18 | |||
335 | 19 | It is recommended to put the Walkthrough{} component inside a qml Component{} | ||
336 | 20 | since it is not run frequently. Walkthrough derives from a Page. So push it | ||
337 | 21 | into a pagestack to show the welcome wizard as shown below in the example. | ||
338 | 22 | |||
339 | 23 | Example: | ||
340 | 24 | |||
341 | 25 | MainView.qml | ||
342 | 26 | |||
343 | 27 | .. code-block:: qml | ||
344 | 28 | |||
345 | 29 | MainView | ||
346 | 30 | { | ||
347 | 31 | Component { | ||
348 | 32 | id: pageComponent | ||
349 | 33 | Walkthrough { | ||
350 | 34 | id: walkthrough | ||
351 | 35 | |||
352 | 36 | appName: "Component Store Gallery" | ||
353 | 37 | |||
354 | 38 | onFinished: { | ||
355 | 39 | console.log("Welcome Wizard Complete!") | ||
356 | 40 | // Here perhaps save isFirstRun variable to the disk | ||
357 | 41 | stack.pop() | ||
358 | 42 | } | ||
359 | 43 | |||
360 | 44 | model: [ | ||
361 | 45 | Slide1{}, | ||
362 | 46 | Slide2{} | ||
363 | 47 | ] | ||
364 | 48 | } | ||
365 | 49 | } | ||
366 | 50 | |||
367 | 51 | component.onCompleted: pagestack.push(pageComponent) | ||
368 | 52 | } | ||
369 | 53 | |||
370 | 54 | Slide1.qml | ||
371 | 55 | |||
372 | 56 | .. code-block:: qml | ||
373 | 57 | |||
374 | 58 | import QtQuick 2.3 | ||
375 | 59 | import Ubuntu.Components 1.1 | ||
376 | 60 | |||
377 | 61 | // Slide 1 | ||
378 | 62 | Component { | ||
379 | 63 | id: slide1 | ||
380 | 64 | Item { | ||
381 | 65 | id: slide1Container | ||
382 | 66 | |||
383 | 67 | UbuntuShape { | ||
384 | 68 | anchors { | ||
385 | 69 | bottom: textColumn.top | ||
386 | 70 | bottomMargin: units.gu(4) | ||
387 | 71 | horizontalCenter: parent.horizontalCenter | ||
388 | 72 | } | ||
389 | 73 | |||
390 | 74 | image: Image { | ||
391 | 75 | smooth: true | ||
392 | 76 | antialiasing: true | ||
393 | 77 | fillMode: Image.PreserveAspectFit | ||
394 | 78 | source: Qt.resolvedUrl("assets/flashback.png") | ||
395 | 79 | } | ||
396 | 80 | } | ||
397 | 81 | |||
398 | 82 | Column { | ||
399 | 83 | id: textColumn | ||
400 | 84 | |||
401 | 85 | anchors.centerIn: parent | ||
402 | 86 | |||
403 | 87 | Label { | ||
404 | 88 | text: "Welcome to" | ||
405 | 89 | fontSize: "x-large" | ||
406 | 90 | height: contentHeight | ||
407 | 91 | anchors.horizontalCenter: parent.horizontalCenter | ||
408 | 92 | } | ||
409 | 93 | Label { | ||
410 | 94 | text: "Component Store Gallery" | ||
411 | 95 | font.bold: true | ||
412 | 96 | height: contentHeight | ||
413 | 97 | font.pixelSize: units.dp(50) | ||
414 | 98 | anchors.horizontalCenter: parent.horizontalCenter | ||
415 | 99 | } | ||
416 | 100 | } | ||
417 | 101 | |||
418 | 102 | Label { | ||
419 | 103 | id: swipeText | ||
420 | 104 | text: "Swipe left to continue" | ||
421 | 105 | horizontalAlignment: Text.AlignHCenter | ||
422 | 106 | anchors.bottom: parent.bottom | ||
423 | 107 | anchors.bottomMargin: units.gu(2) | ||
424 | 108 | anchors.horizontalCenter: parent.horizontalCenter | ||
425 | 109 | } | ||
426 | 110 | } | ||
427 | 111 | } | ||
428 | 112 | |||
429 | 113 | .. image:: ../_images/welcomewizard.png | ||
430 | 114 | :align: center | ||
431 | 115 | |||
432 | 116 | Properties | ||
433 | 117 | ---------- | ||
434 | 118 | |||
435 | 119 | - :ref:`appName`: string | ||
436 | 120 | - :ref:`isFirstRun`: boolean | ||
437 | 121 | - :ref:`model`: Item<list> | ||
438 | 122 | - :ref:`completeColor`: color | ||
439 | 123 | - :ref:`inCompleteColor`: color | ||
440 | 124 | - :ref:`skipTextColor`: color | ||
441 | 125 | |||
442 | 126 | Signals | ||
443 | 127 | ------- | ||
444 | 128 | |||
445 | 129 | - :ref:`finished()` | ||
446 | 130 | |||
447 | 131 | Property Documentation | ||
448 | 132 | ---------------------- | ||
449 | 133 | |||
450 | 134 | .. _appName: | ||
451 | 135 | |||
452 | 136 | appName | ||
453 | 137 | ^^^^^^^ | ||
454 | 138 | |||
455 | 139 | Name of the application that is shown in some parts of the welcome wizard. | ||
456 | 140 | |||
457 | 141 | .. _isFirstRun: | ||
458 | 142 | |||
459 | 143 | isFirstRun | ||
460 | 144 | ^^^^^^^^^^ | ||
461 | 145 | |||
462 | 146 | Boolean property to determine if the welcome wizard was run for the first time | ||
463 | 147 | or not. It is recommended to store this variable to the disk using U1dB or Qt.labs.settings | ||
464 | 148 | to remember the welcome wizard run state. | ||
465 | 149 | |||
466 | 150 | .. _model: | ||
467 | 151 | |||
468 | 152 | model | ||
469 | 153 | ^^^^^ | ||
470 | 154 | |||
471 | 155 | This property stores the welcome wizards slides that are shown to the user. | ||
472 | 156 | Create your content and store them in separate files per slide. So if you | ||
473 | 157 | have 3 slides in your welcome wizard, you could define them as Slide1.qml, | ||
474 | 158 | Slide2.qml and Slide3.qml and then reference them as, | ||
475 | 159 | |||
476 | 160 | .. code-block:: qml | ||
477 | 161 | |||
478 | 162 | model: [ | ||
479 | 163 | Slide1{}, | ||
480 | 164 | Slide2{}, | ||
481 | 165 | Slide3{} | ||
482 | 166 | ] | ||
483 | 167 | |||
484 | 168 | The slides should only contain the content you want to show. Everything else like the | ||
485 | 169 | dots, divider, title etc are handled by the welcome wizard component itself. Think of these | ||
486 | 170 | slides as delegates in a listview which only house the content itself. | ||
487 | 171 | |||
488 | 172 | .. _completeColor: | ||
489 | 173 | |||
490 | 174 | completeColor | ||
491 | 175 | ^^^^^^^^^^^^^ | ||
492 | 176 | |||
493 | 177 | This property sets the color of the bottom circle to indicate the progress of the user. By | ||
494 | 178 | default it is green. | ||
495 | 179 | |||
496 | 180 | .. _inCompleteColor: | ||
497 | 181 | |||
498 | 182 | inCompleteColor | ||
499 | 183 | ^^^^^^^^^^^^^^^ | ||
500 | 184 | |||
501 | 185 | This property sets the color of the bottom circle to indicate the slides left in the wizard. | ||
502 | 186 | By default it is grey. | ||
503 | 187 | |||
504 | 188 | .. _skipTextColor: | ||
505 | 189 | |||
506 | 190 | skipTextColor | ||
507 | 191 | ^^^^^^^^^^^^^ | ||
508 | 192 | |||
509 | 193 | This property sets the color of the skip text shown at the top of the welcome wizard. | ||
510 | 194 | |||
511 | 195 | Signal Documentation | ||
512 | 196 | -------------------- | ||
513 | 197 | |||
514 | 198 | .. _finished(): | ||
515 | 199 | |||
516 | 200 | finished() | ||
517 | 201 | ^^^^^^^^^^ | ||
518 | 202 | |||
519 | 203 | This signal is fired automatically when the user press the skip button. It can also be made | ||
520 | 204 | to fire manually to exit the welcome wizard. You can perform exit tasks when this signal is fired | ||
521 | 205 | like updating the :ref:`isFirstRun` variable and storing to disk etc. | ||
522 | 206 | |||
523 | 207 | .. code-block:: qml | ||
524 | 208 | |||
525 | 209 | Button { | ||
526 | 210 | id: continueButton | ||
527 | 211 | color: "Green" | ||
528 | 212 | height: units.gu(5) | ||
529 | 213 | width: units.gu(25) | ||
530 | 214 | text: "Exit Welcome Wizard" | ||
531 | 215 | anchors.horizontalCenter: parent.horizontalCenter | ||
532 | 216 | onClicked: finished() | ||
533 | 217 | } | ||
534 | 218 | |||
535 | 0 | 219 | ||
536 | === added file 'docs/_images/welcomewizard.png' | |||
537 | 1 | Binary files docs/_images/welcomewizard.png 1970-01-01 00:00:00 +0000 and docs/_images/welcomewizard.png 2015-03-03 14:08:25 +0000 differ | 220 | Binary files docs/_images/welcomewizard.png 1970-01-01 00:00:00 +0000 and docs/_images/welcomewizard.png 2015-03-03 14:08:25 +0000 differ |
538 | === modified file 'docs/index.rst' | |||
539 | --- docs/index.rst 2014-11-15 14:50:47 +0000 | |||
540 | +++ docs/index.rst 2015-03-03 14:08:25 +0000 | |||
541 | @@ -54,3 +54,4 @@ | |||
542 | 54 | _components/listitemwithactions | 54 | _components/listitemwithactions |
543 | 55 | _components/pagewithbottomedge | 55 | _components/pagewithbottomedge |
544 | 56 | _components/radialbottomedge | 56 | _components/radialbottomedge |
545 | 57 | _components/welcomewizard |