summaryrefslogtreecommitdiffstats
path: root/examples/qmlandroid/catalog/qml/ProgressView.qml
blob: b073ec5c3a21b965cb8d2fbd1de3f1c0c0e18e56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import android.view 0.21
import android.widget 0.21
import android.support.v7.widget 0.21

ScrollView {
    LinearLayout {
        padding: 48
        orientation: LinearLayout.VERTICAL

        CardView {
            LinearLayout {
                padding: 48
                orientation: LinearLayout.VERTICAL

                TextView { text: "ProgressBar"; textSize: 18 }
                Space { LinearLayout.height: 48 }
                LinearLayout {
                    ProgressBar { style: ProgressBar.Large }
                    Space { LinearLayout.width: 48 }
                    ProgressBar { style: ProgressBar.Medium }
                    Space { LinearLayout.width: 48 }
                    ProgressBar { style: ProgressBar.Small }
                }
            }
        }

        Space { LinearLayout.height: 48 }

        CardView {
            LinearLayout {
                padding: 48
                orientation: LinearLayout.VERTICAL

                TextView { text: "ProgressBar (horizontal)"; textSize: 18 }
                Space { LinearLayout.height: 48 }
                ProgressBar {
                    indeterminate: true
                    style: ProgressBar.Horizontal
                }
                Space { LinearLayout.height: 24 }
                ProgressBar {
                    progress: primaryBar.progress
                    secondaryProgress: secondaryBar.progress
                    style: ProgressBar.Horizontal
                }
            }
        }

        Space { LinearLayout.height: 48 }

        CardView {
            LinearLayout {
                padding: 48
                orientation: LinearLayout.VERTICAL

                TextView { text: qsTr("SeekBar (%1/%2)").arg(primaryBar.progress).arg(secondaryBar.progress); textSize: 18 }
                Space { LinearLayout.height: 48 }
                SeekBar {
                    id: primaryBar
                    progress: 25
                }
                SeekBar {
                    id: secondaryBar
                    progress: 75
                }
            }
        }

        Space { LinearLayout.height: 48 }

        CardView {
            LinearLayout {
                padding: 48
                orientation: LinearLayout.VERTICAL

                TextView { text: qsTr("RatingBar (%1)").arg(ratingBar.rating); textSize: 18 }
                Space { LinearLayout.height: 48 }
                RatingBar {
                    id: ratingBar
                    rating: 3.5
                    LinearLayout.width: Layout.WRAP_CONTENT
                }
            }
        }
    }
}