summaryrefslogtreecommitdiff
path: root/prototype_2016/resources/qml/Pages/Basic
diff options
context:
space:
mode:
Diffstat (limited to 'prototype_2016/resources/qml/Pages/Basic')
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/BusyIndicatorPage.qml44
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/ButtonPage.qml115
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/CheckBoxPage.qml101
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/ProgressBarPage.qml127
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml100
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/SliderPage.qml152
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/SwitchPage.qml100
7 files changed, 739 insertions, 0 deletions
diff --git a/prototype_2016/resources/qml/Pages/Basic/BusyIndicatorPage.qml b/prototype_2016/resources/qml/Pages/Basic/BusyIndicatorPage.qml
new file mode 100644
index 0000000..1a6341e
--- /dev/null
+++ b/prototype_2016/resources/qml/Pages/Basic/BusyIndicatorPage.qml
@@ -0,0 +1,44 @@
1/*
2 * This file is part of Fluid.
3 *
4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 *
6 * $BEGIN_LICENSE:MPL2$
7 *
8 * This Source Code Form is subject to the terms of the Mozilla Public
9 * License, v. 2.0. If a copy of the MPL was not distributed with this
10 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 *
12 * $END_LICENSE$
13 */
14
15import QtQuick 2.0
16import QtQuick.Controls 2.0
17import QtQuick.Layouts 1.0
18import "../.."
19
20Flickable {
21 clip: true
22 contentHeight: Math.max(layout.implicitHeight, height)
23
24 ScrollBar.vertical: ScrollBar {}
25
26 ColumnLayout {
27 id: layout
28 anchors.fill: parent
29
30 Repeater {
31 model: 2
32
33 StyledRectangle {
34 Layout.fillWidth: true
35 Layout.fillHeight: true
36
37 BusyIndicator {
38 anchors.centerIn: parent
39 running: true
40 }
41 }
42 }
43 }
44}
diff --git a/prototype_2016/resources/qml/Pages/Basic/ButtonPage.qml b/prototype_2016/resources/qml/Pages/Basic/ButtonPage.qml
new file mode 100644
index 0000000..6cf94fe
--- /dev/null
+++ b/prototype_2016/resources/qml/Pages/Basic/ButtonPage.qml
@@ -0,0 +1,115 @@
1/*
2 * This file is part of Fluid.
3 *
4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 *
6 * $BEGIN_LICENSE:MPL2$
7 *
8 * This Source Code Form is subject to the terms of the Mozilla Public
9 * License, v. 2.0. If a copy of the MPL was not distributed with this
10 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 *
12 * $END_LICENSE$
13 */
14
15import QtQuick 2.0
16import QtQuick.Controls 2.0
17import QtQuick.Layouts 1.0
18import Fluid.Controls 1.0
19import "../.."
20
21Flickable {
22 clip: true
23 contentHeight: Math.max(layout.implicitHeight, height)
24
25 ScrollBar.vertical: ScrollBar {}
26
27 ColumnLayout {
28 id: layout
29 anchors.fill: parent
30
31 Repeater {
32 model: 2
33
34 StyledRectangle {
35 Layout.fillWidth: true
36 Layout.fillHeight: true
37 Layout.minimumWidth: grid.width + 80
38 Layout.minimumHeight: grid.height + 80
39
40 GridLayout {
41 id: grid
42 anchors.centerIn: parent
43 columns: 2
44 rows: 4
45
46 // Row 1
47
48 TitleLabel {
49 text: qsTr("Enabled")
50
51 Layout.alignment: Qt.AlignHCenter
52 }
53
54 TitleLabel {
55 text: qsTr("Disabled")
56
57 Layout.alignment: Qt.AlignHCenter
58 }
59
60 // Row 2
61
62 Button {
63 text: qsTr("Button")
64 }
65
66 Button {
67 text: qsTr("Button")
68 enabled: false
69 }
70
71 // Row 3
72
73 Button {
74 text: qsTr("Checked")
75 checkable: false
76 checked: true
77 }
78
79 Button {
80 text: qsTr("Checked")
81 checkable: false
82 checked: true
83 enabled: false
84 }
85
86 // Row 4
87
88 Button {
89 text: qsTr("Flat")
90 flat: true
91 }
92
93 Button {
94 text: qsTr("Flat")
95 flat: true
96 enabled: false
97 }
98
99 // Row 5
100
101 Button {
102 text: qsTr("Highlighted")
103 highlighted: true
104 }
105
106 Button {
107 text: qsTr("Highlighted")
108 highlighted: true
109 enabled: false
110 }
111 }
112 }
113 }
114 }
115}
diff --git a/prototype_2016/resources/qml/Pages/Basic/CheckBoxPage.qml b/prototype_2016/resources/qml/Pages/Basic/CheckBoxPage.qml
new file mode 100644
index 0000000..6e53e73
--- /dev/null
+++ b/prototype_2016/resources/qml/Pages/Basic/CheckBoxPage.qml
@@ -0,0 +1,101 @@
1/*
2 * This file is part of Fluid.
3 *
4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 * Copyright (C) 2017 Michael Spencer <sonrisesoftware@gmail.com>
6 *
7 * $BEGIN_LICENSE:MPL2$
8 *
9 * This Source Code Form is subject to the terms of the Mozilla Public
10 * License, v. 2.0. If a copy of the MPL was not distributed with this
11 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 *
13 * $END_LICENSE$
14 */
15
16import QtQuick 2.0
17import QtQuick.Controls 2.0
18import QtQuick.Layouts 1.0
19import Fluid.Controls 1.0
20import "../.."
21
22Flickable {
23 clip: true
24 contentHeight: Math.max(layout.implicitHeight, height)
25
26 ScrollBar.vertical: ScrollBar {}
27
28 ColumnLayout {
29 id: layout
30 anchors.fill: parent
31
32 Repeater {
33 model: 2
34
35 StyledRectangle {
36 Layout.fillWidth: true
37 Layout.fillHeight: true
38 Layout.minimumWidth: grid.width + 80
39 Layout.minimumHeight: grid.height + 80
40
41 GridLayout {
42 id: grid
43 anchors.centerIn: parent
44 columns: 3
45 rows: 3
46
47 // Row 1
48
49 Item {
50 width: 1
51 height: 1
52 }
53
54 TitleLabel {
55 text: qsTr("Enabled")
56
57 Layout.alignment: Qt.AlignHCenter
58 }
59
60 TitleLabel {
61 text: qsTr("Disabled")
62
63 Layout.alignment: Qt.AlignHCenter
64 }
65
66 // Row 2
67
68 Label {
69 text: qsTr("On")
70 }
71
72 CheckBox {
73 checked: true
74 text: qsTr("CheckBox")
75 }
76
77 CheckBox {
78 checked: true
79 enabled: false
80 text: qsTr("CheckBox")
81 }
82
83 // Row 3
84
85 Label {
86 text: qsTr("Off")
87 }
88
89 CheckBox {
90 text: qsTr("CheckBox")
91 }
92
93 CheckBox {
94 text: qsTr("CheckBox")
95 enabled: false
96 }
97 }
98 }
99 }
100 }
101}
diff --git a/prototype_2016/resources/qml/Pages/Basic/ProgressBarPage.qml b/prototype_2016/resources/qml/Pages/Basic/ProgressBarPage.qml
new file mode 100644
index 0000000..440db51
--- /dev/null
+++ b/prototype_2016/resources/qml/Pages/Basic/ProgressBarPage.qml
@@ -0,0 +1,127 @@
1/*
2 * This file is part of Fluid.
3 *
4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 *
6 * $BEGIN_LICENSE:MPL2$
7 *
8 * This Source Code Form is subject to the terms of the Mozilla Public
9 * License, v. 2.0. If a copy of the MPL was not distributed with this
10 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 *
12 * $END_LICENSE$
13 */
14
15import QtQuick 2.0
16import QtQuick.Controls 2.0
17import QtQuick.Layouts 1.0
18import Fluid.Controls 1.0
19import "../.."
20
21Flickable {
22 clip: true
23 contentHeight: Math.max(layout.implicitHeight, height)
24
25 ScrollBar.vertical: ScrollBar {}
26
27 ColumnLayout {
28 id: layout
29 anchors.fill: parent
30
31 Repeater {
32 model: 2
33
34 StyledRectangle {
35 Layout.fillWidth: true
36 Layout.fillHeight: true
37 Layout.minimumWidth: grid.width + 80
38 Layout.minimumHeight: grid.height + 80
39
40 GridLayout {
41 id: grid
42 anchors.centerIn: parent
43 columns: 3
44
45 // Row 1
46
47 Item {
48 width: 1
49 height: 1
50 }
51
52 TitleLabel {
53 text: qsTr("Determinate")
54
55 Layout.alignment: Qt.AlignHCenter
56 }
57
58 TitleLabel {
59 text: qsTr("Indeterminate")
60
61 Layout.alignment: Qt.AlignHCenter
62 }
63
64 // Row 2
65
66 Label {
67 text: qsTr("Static")
68 }
69
70 ProgressBar {
71 from: 0.0
72 to: 1.0
73 value: 0.5
74 indeterminate: false
75 }
76
77 ProgressBar {
78 from: 0.0
79 to: 1.0
80 value: 0.5
81 indeterminate: true
82 }
83
84 // Row 3
85
86 Label {
87 text: qsTr("Animated")
88 }
89
90 ProgressBar {
91 from: 0.0
92 to: 1.0
93 indeterminate: false
94
95 SequentialAnimation on value {
96 running: true
97 loops: NumberAnimation.Infinite
98
99 NumberAnimation {
100 from: 0.0
101 to: 1.0
102 duration: 3000
103 }
104 }
105 }
106
107 ProgressBar {
108 from: 0.0
109 to: 1.0
110 indeterminate: true
111
112 SequentialAnimation on value {
113 running: true
114 loops: NumberAnimation.Infinite
115
116 NumberAnimation {
117 from: 0.0
118 to: 1.0
119 duration: 3000
120 }
121 }
122 }
123 }
124 }
125 }
126 }
127}
diff --git a/prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml b/prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml
new file mode 100644
index 0000000..80c98d5
--- /dev/null
+++ b/prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml
@@ -0,0 +1,100 @@
1/*
2 * This file is part of Fluid.
3 *
4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 *
6 * $BEGIN_LICENSE:MPL2$
7 *
8 * This Source Code Form is subject to the terms of the Mozilla Public
9 * License, v. 2.0. If a copy of the MPL was not distributed with this
10 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 *
12 * $END_LICENSE$
13 */
14
15import QtQuick 2.0
16import QtQuick.Controls 2.0
17import QtQuick.Layouts 1.0
18import Fluid.Controls 1.0
19import "../.."
20
21Flickable {
22 clip: true
23 contentHeight: Math.max(layout.implicitHeight, height)
24
25 ScrollBar.vertical: ScrollBar {}
26
27 ColumnLayout {
28 id: layout
29 anchors.fill: parent
30
31 Repeater {
32 model: 2
33
34 StyledRectangle {
35 Layout.fillWidth: true
36 Layout.fillHeight: true
37 Layout.minimumWidth: grid.width + 80
38 Layout.minimumHeight: grid.height + 80
39
40 GridLayout {
41 id: grid
42 anchors.centerIn: parent
43 columns: 3
44 rows: 3
45
46 // Row 1
47
48 Item {
49 width: 1
50 height: 1
51 }
52
53 TitleLabel {
54 text: qsTr("Enabled")
55
56 Layout.alignment: Qt.AlignHCenter
57 }
58
59 TitleLabel {
60 text: qsTr("Disabled")
61
62 Layout.alignment: Qt.AlignHCenter
63 }
64
65 // Row 2
66
67 Label {
68 text: qsTr("On")
69 }
70
71 RadioButton {
72 checked: true
73 text: qsTr("RadioButton")
74 }
75
76 RadioButton {
77 checked: true
78 enabled: false
79 text: qsTr("RadioButton")
80 }
81
82 // Row 3
83
84 Label {
85 text: qsTr("Off")
86 }
87
88 RadioButton {
89 text: qsTr("RadioButton")
90 }
91
92 RadioButton {
93 text: qsTr("RadioButton")
94 enabled: false
95 }
96 }
97 }
98 }
99 }
100}
diff --git a/prototype_2016/resources/qml/Pages/Basic/SliderPage.qml b/prototype_2016/resources/qml/Pages/Basic/SliderPage.qml
new file mode 100644
index 0000000..72d9c11
--- /dev/null
+++ b/prototype_2016/resources/qml/Pages/Basic/SliderPage.qml
@@ -0,0 +1,152 @@
1/*
2 * This file is part of Fluid.
3 *
4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 *
6 * $BEGIN_LICENSE:MPL2$
7 *
8 * This Source Code Form is subject to the terms of the Mozilla Public
9 * License, v. 2.0. If a copy of the MPL was not distributed with this
10 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 *
12 * $END_LICENSE$
13 */
14
15import QtQuick 2.0
16import QtQuick.Controls 2.0
17import QtQuick.Layouts 1.0
18import Fluid.Controls 1.0
19import "../.."
20
21Flickable {
22 clip: true
23 contentHeight: Math.max(layout.implicitHeight, height)
24
25 ScrollBar.vertical: ScrollBar {}
26
27 ColumnLayout {
28 id: layout
29 anchors.fill: parent
30
31 Repeater {
32 model: 2
33
34 StyledRectangle {
35 Layout.fillWidth: true
36 Layout.fillHeight: true
37 Layout.minimumWidth: grid.width + 80
38 Layout.minimumHeight: grid.height + 80
39
40 GridLayout {
41 id: grid
42 anchors.centerIn: parent
43 columns: 3
44 rows: 3
45
46 // Row 1
47
48 Item {
49 width: 1
50 height: 1
51 }
52
53 TitleLabel {
54 text: qsTr("Enabled")
55
56 Layout.alignment: Qt.AlignHCenter
57 }
58
59 TitleLabel {
60 text: qsTr("Disabled")
61
62 Layout.alignment: Qt.AlignHCenter
63 }
64
65 // Row 2
66
67 Label {
68 text: qsTr("Horizontal / Single")
69 }
70
71 Slider {
72 from: 0.0
73 to: 1.0
74 value: 0.5
75 }
76
77 Slider {
78 from: 0.0
79 to: 1.0
80 value: 0.5
81 enabled: false
82 }
83
84 // Row 3
85
86 Label {
87 text: qsTr("Horizontal / Range")
88 }
89
90 RangeSlider {
91 from: 0.0
92 to: 1.0
93 first.value: 0.4
94 second.value: 0.6
95 }
96
97 RangeSlider {
98 from: 0.0
99 to: 1.0
100 first.value: 0.4
101 second.value: 0.6
102 enabled: false
103 }
104
105 // Row 4
106
107 Label {
108 text: qsTr("Vertical / Single")
109 }
110
111 Slider {
112 from: 0.0
113 to: 1.0
114 value: 0.5
115 orientation: Qt.Vertical
116 }
117
118 Slider {
119 from: 0.0
120 to: 1.0
121 value: 0.5
122 enabled: false
123 orientation: Qt.Vertical
124 }
125
126 // Row 5
127
128 Label {
129 text: qsTr("Vertical / Range")
130 }
131
132 RangeSlider {
133 from: 0.0
134 to: 1.0
135 first.value: 0.4
136 second.value: 0.6
137 orientation: Qt.Vertical
138 }
139
140 RangeSlider {
141 from: 0.0
142 to: 1.0
143 first.value: 0.4
144 second.value: 0.6
145 enabled: false
146 orientation: Qt.Vertical
147 }
148 }
149 }
150 }
151 }
152}
diff --git a/prototype_2016/resources/qml/Pages/Basic/SwitchPage.qml b/prototype_2016/resources/qml/Pages/Basic/SwitchPage.qml
new file mode 100644
index 0000000..15c679b
--- /dev/null
+++ b/prototype_2016/resources/qml/Pages/Basic/SwitchPage.qml
@@ -0,0 +1,100 @@
1/*
2 * This file is part of Fluid.
3 *
4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 *
6 * $BEGIN_LICENSE:MPL2$
7 *
8 * This Source Code Form is subject to the terms of the Mozilla Public
9 * License, v. 2.0. If a copy of the MPL was not distributed with this
10 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 *
12 * $END_LICENSE$
13 */
14
15import QtQuick 2.0
16import QtQuick.Controls 2.0
17import QtQuick.Layouts 1.0
18import Fluid.Controls 1.0
19import "../.."
20
21Flickable {
22 clip: true
23 contentHeight: Math.max(layout.implicitHeight, height)
24
25 ScrollBar.vertical: ScrollBar {}
26
27 ColumnLayout {
28 id: layout
29 anchors.fill: parent
30
31 Repeater {
32 model: 2
33
34 StyledRectangle {
35 Layout.fillWidth: true
36 Layout.fillHeight: true
37 Layout.minimumWidth: grid.width + 80
38 Layout.minimumHeight: grid.height + 80
39
40 GridLayout {
41 id: grid
42 anchors.centerIn: parent
43 columns: 3
44 rows: 3
45
46 // Row 1
47
48 Item {
49 width: 1
50 height: 1
51 }
52
53 TitleLabel {
54 text: qsTr("Enabled")
55
56 Layout.alignment: Qt.AlignHCenter
57 }
58
59 TitleLabel {
60 text: qsTr("Disabled")
61
62 Layout.alignment: Qt.AlignHCenter
63 }
64
65 // Row 2
66
67 Label {
68 text: qsTr("On")
69 }
70
71 Switch {
72 checked: true
73 text: qsTr("Switch")
74 }
75
76 Switch {
77 checked: true
78 enabled: false
79 text: qsTr("Switch")
80 }
81
82 // Row 3
83
84 Label {
85 text: qsTr("Off")
86 }
87
88 Switch {
89 text: qsTr("Switch")
90 }
91
92 Switch {
93 text: qsTr("Switch")
94 enabled: false
95 }
96 }
97 }
98 }
99 }
100}