8pragma ComponentBehavior: Bound
11import QtQuick.Templates as T
12import org.kde.ksvg as KSvg
14import org.kde.plasma.core as PlasmaCore
15import org.kde.kirigami as Kirigami
21 required
property T.AbstractButton control
23 property size hintSize: radioButtonSvg.fromCurrentImageSet && radioButtonSvg.hasElement(
"hint-size")
24 ? radioButtonSvg.elementSize(
"hint-size")
27 implicitWidth: hintSize.width
28 implicitHeight: hintSize.height
29 opacity: control.enabled ? 1 : 0.5
30 layer.enabled: opacity < 1
34 imagePath:
"widgets/radiobutton"
39 sourceComponent: radioButtonSvg.fromCurrentImageSet
45 ? radiobuttonComponent : compatibilityComponent
50 id: radiobuttonComponent
54 anchors.centerIn: parent
55 implicitWidth: naturalSize.width
56 implicitHeight: naturalSize.height
61 anchors.centerIn: parent
62 implicitWidth: naturalSize.width
63 implicitHeight: naturalSize.height
65 opacity: enabled && !root.control.down
67 enabled: root.control.down &&
Kirigami.Units.longDuration > 0
69 duration:
Kirigami.Units.longDuration
70 easing.type: Easing.OutCubic
77 anchors.centerIn: parent
78 implicitWidth: naturalSize.width
79 implicitHeight: naturalSize.height
81 opacity: (root.control.checked || root.control.down)
82 && !(root.control instanceof T.ItemDelegate && root.control.highlighted)
84 enabled: (root.control.checked || root.control.down) &&
Kirigami.Units.longDuration > 0
86 duration:
Kirigami.Units.longDuration
87 easing.type: Easing.OutCubic
94 anchors.centerIn: parent
95 implicitWidth: naturalSize.width
96 implicitHeight: naturalSize.height
98 opacity: root.control.visualFocus
100 enabled:
Kirigami.Units.longDuration > 0
102 duration:
Kirigami.Units.longDuration
103 easing.type: Easing.OutCubic
110 anchors.centerIn: parent
111 implicitWidth: naturalSize.width
112 implicitHeight: naturalSize.height
114 opacity: root.control.hovered
115 Behavior on opacity {
116 enabled: root.control.hovered &&
Kirigami.Units.longDuration > 0
118 duration:
Kirigami.Units.longDuration
119 easing.type: Easing.OutCubic
126 anchors.centerIn: parent
127 implicitWidth: naturalSize.width
128 implicitHeight: naturalSize.height
130 scale: root.control.checked
132 enabled:
Kirigami.Units.longDuration > 0
134 duration:
Kirigami.Units.longDuration
135 easing.type: Easing.OutCubic
145 id: compatibilityComponent
149 imagePath:
"widgets/actionbutton"
153 anchors.centerIn: parent
154 implicitWidth: implicitHeight
155 implicitHeight:
Kirigami.Units.iconSizes.small
161 imagePath:
"widgets/checkmarks"
163 elementId:
"radiobutton"
164 opacity: root.control.checked ? 1 : 0
168 Behavior on opacity {
169 enabled:
Kirigami.Units.longDuration > 0
171 duration:
Kirigami.Units.longDuration
172 easing.type: Easing.InOutQuad
179 state: root.control.activeFocus ?
"focus" : (root.control.hovered ?
"hover" :
"shadow")
QString imageSetName() const