summaryrefslogtreecommitdiff
path: root/prototype_2016/third_party/fluid/demo/Pages/Basic/RadioButtonPage.qml
blob: 90c187fbfbb7cc7be8716b5c7976fc227a399641 (plain) (blame)
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
87
88
89
90
/*
 * This file is part of Fluid.
 *
 * Copyright (C) 2016 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
 *
 * $BEGIN_LICENSE:MPL2$
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * $END_LICENSE$
 */

import QtQuick 2.0
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
import Fluid.Controls 1.0
import "../.."

ColumnLayout {
    Repeater {
        model: 2

        StyledRectangle {
            Layout.fillWidth: true
            Layout.fillHeight: true
            Layout.minimumWidth: grid.width + 80
            Layout.minimumHeight: grid.height + 80

            GridLayout {
                id: grid
                anchors.centerIn: parent
                columns: 3
                rows: 3

                // Row 1

                Item {
                    width: 1
                    height: 1
                }

                TitleLabel {
                    text: qsTr("Enabled")

                    Layout.alignment: Qt.AlignHCenter
                }

                TitleLabel {
                    text: qsTr("Disabled")

                    Layout.alignment: Qt.AlignHCenter
                }

                // Row 2

                Label {
                    text: qsTr("On")
                }

                RadioButton {
                    checked: true
                    text: qsTr("RadioButton")
                }

                RadioButton {
                    checked: true
                    enabled: false
                    text: qsTr("RadioButton")
                }

                // Row 3

                Label {
                    text: qsTr("Off")
                }

                RadioButton {
                    text: qsTr("RadioButton")
                }

                RadioButton {
                    text: qsTr("RadioButton")
                    enabled: false
                }
            }
        }
    }
}