diff options
Diffstat (limited to 'prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml')
-rw-r--r-- | prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml | 100 |
1 files changed, 100 insertions, 0 deletions
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 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import QtQuick.Layouts 1.0 | ||
18 | import Fluid.Controls 1.0 | ||
19 | import "../.." | ||
20 | |||
21 | Flickable { | ||
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 | } | ||