Changeset View
Changeset View
Standalone View
Standalone View
tests/components/progressbar3.qml
- This file was added.
1 | import QtQuick 2.0 | ||||
---|---|---|---|---|---|
2 | | ||||
3 | import org.kde.plasma.components 3.0 as PlasmaComponents | ||||
4 | | ||||
5 | Rectangle { | ||||
6 | id: root | ||||
7 | | ||||
8 | color: "white" | ||||
9 | width: 900 | ||||
10 | height: 600 | ||||
11 | | ||||
12 | Flow { | ||||
13 | anchors.fill: parent | ||||
14 | anchors.margins: 20 | ||||
15 | spacing: 20 | ||||
16 | | ||||
17 | Column { | ||||
18 | Text { | ||||
19 | text: "0%" | ||||
20 | } | ||||
21 | PlasmaComponents.ProgressBar { | ||||
22 | from: 0 | ||||
23 | to: 100 | ||||
24 | value: 0 | ||||
25 | } | ||||
26 | } | ||||
27 | | ||||
28 | Column { | ||||
29 | Text { | ||||
30 | text: "50%" | ||||
31 | } | ||||
32 | PlasmaComponents.ProgressBar { | ||||
33 | from: 0 | ||||
34 | to: 100 | ||||
35 | value: 50 | ||||
36 | } | ||||
37 | } | ||||
38 | | ||||
39 | Column { | ||||
40 | Text { | ||||
41 | text: "100%" | ||||
42 | } | ||||
43 | PlasmaComponents.ProgressBar { | ||||
44 | from: 0 | ||||
45 | to: 100 | ||||
46 | value: 100 | ||||
47 | } | ||||
48 | } | ||||
49 | | ||||
50 | Column { | ||||
51 | Text { | ||||
52 | text: "Make sure the bar does\nnot leak outside" | ||||
53 | } | ||||
54 | PlasmaComponents.ProgressBar { | ||||
55 | from: 0 | ||||
56 | to: 200 | ||||
57 | value: 1 | ||||
58 | } | ||||
59 | } | ||||
60 | | ||||
61 | Column { | ||||
62 | Text { | ||||
63 | text: "should look like 100%" | ||||
64 | } | ||||
65 | PlasmaComponents.ProgressBar { | ||||
66 | from: 0 | ||||
67 | to: 100 | ||||
68 | value: 110 | ||||
69 | } | ||||
70 | } | ||||
71 | | ||||
72 | Column { | ||||
73 | Text { | ||||
74 | text: "QA Style 50%" | ||||
75 | } | ||||
76 | PlasmaComponents.ProgressBar { | ||||
77 | from: -100 | ||||
78 | to: 100 | ||||
79 | value: 0 | ||||
80 | } | ||||
81 | } | ||||
82 | | ||||
83 | Column { | ||||
84 | Text { | ||||
85 | text: "should look like 0%" | ||||
86 | } | ||||
87 | PlasmaComponents.ProgressBar { | ||||
88 | from: 0 | ||||
89 | to: 100 | ||||
90 | value: -10 | ||||
91 | } | ||||
92 | } | ||||
93 | | ||||
94 | Column { | ||||
95 | Text { | ||||
96 | text: "should be a continuous movement,<br>from one end to the other and back" | ||||
97 | } | ||||
98 | PlasmaComponents.ProgressBar { | ||||
99 | indeterminate: indeterminateCheckBox.checked | ||||
100 | value: 0.5 | ||||
101 | } | ||||
102 | } | ||||
103 | | ||||
104 | Column { | ||||
105 | Text { | ||||
106 | text: "Checking and unchecking should not break the layout,<br>should look like 50% if unchecked" | ||||
107 | } | ||||
108 | PlasmaComponents.CheckBox { | ||||
109 | id: indeterminateCheckBox | ||||
110 | text: "Indeterminate" | ||||
111 | checked: true | ||||
112 | } | ||||
113 | } | ||||
114 | | ||||
115 | } | ||||
116 | } |