Changeset View
Changeset View
Standalone View
Standalone View
kcms/input/kcm/libinput/components/ExclGroupBox.qml
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2017 Roman Gilg <subdiff@gmail.com> | ||||
3 | * | ||||
4 | * This program is free software; you can redistribute it and/or modify | ||||
5 | * it under the terms of the GNU General Public License as published by | ||||
6 | * the Free Software Foundation; either version 2 of the License, or | ||||
7 | * (at your option) any later version. | ||||
8 | * | ||||
9 | * This program is distributed in the hope that it will be useful, | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
12 | * GNU General Public License for more details. | ||||
13 | * | ||||
14 | * You should have received a copy of the GNU General Public License | ||||
15 | * along with this program; if not, write to the Free Software | ||||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
17 | */ | ||||
18 | | ||||
19 | import QtQuick 2.7 | ||||
20 | import QtQuick.Controls 1.4 as Controls | ||||
21 | | ||||
22 | import org.kde.plasma.core 2.0 as PlasmaCore | ||||
23 | | ||||
24 | Column { | ||||
25 | spacing: units.smallSpacing / 2 | ||||
26 | property alias label: textlabel.text | ||||
27 | property alias model: repeater.model | ||||
28 | property alias current: exlGroupbox.current | ||||
29 | | ||||
30 | function itemAt(index) { | ||||
31 | return repeater.itemAt(index) | ||||
32 | } | ||||
33 | | ||||
34 | Controls.Label { | ||||
35 | id: textlabel | ||||
36 | } | ||||
37 | | ||||
38 | Controls.ExclusiveGroup { id: exlGroupbox } | ||||
39 | Column { | ||||
40 | leftPadding: units.smallSpacing | ||||
41 | spacing: units.smallSpacing / 2 | ||||
42 | | ||||
43 | Repeater { | ||||
44 | id: repeater | ||||
45 | Controls.RadioButton { | ||||
46 | text: modelData | ||||
47 | exclusiveGroup: exlGroupbox | ||||
48 | | ||||
49 | property alias tooltiptext: tooltip.text | ||||
50 | | ||||
51 | ToolTip { | ||||
52 | id: tooltip | ||||
53 | } | ||||
54 | } | ||||
55 | } | ||||
56 | } | ||||
57 | } |