8import QtQuick.Templates as T
9import org.kde.ksvg as KSvg
11import org.kde.plasma.core as PlasmaCore
12import org.kde.kirigami as Kirigami
13import "private" as Private
18 implicitWidth:
Kirigami.Units.gridUnit * 5
19 implicitHeight: implicitWidth
21 onPositionChanged: canvas.requestPaint()
25 width: control.availableWidth
26 height: control.availableHeight
28 var ctx = getContext(
"2d");
31 var centreX = width / 2;
32 var centreY = height / 2;
34 ctx.globalAlpha = 0.3;
36 ctx.strokeStyle = control.Kirigami.Theme.textColor;
38 ctx.arc(centreX, centreY, width/2.4, 0, 2*Math.PI,
false);
43 ctx.strokeStyle = control.Kirigami.Theme.highlightColor;
45 ctx.arc(centreX, centreY, width/2.4, 0.7*Math.PI, 1.6*Math.PI * control.position - 1.25*Math.PI,
false);
52 imagePath:
"widgets/slider"
54 colorSet: control.Kirigami.Theme.colorSet
57 x: (control.width/2) + Math.cos((-(control.angle-90)*Math.PI)/180) * (control.width/2-width/2) - width/2
58 y: (control.height/2) + Math.sin(((control.angle-90)*Math.PI)/180) * (control.height/2-height/2) - height/2
60 implicitHeight: Math.floor(
Kirigami.Units.gridUnit * 1.6)
61 implicitWidth: implicitHeight
67 if (control.pressed) {
69 }
else if (control.enabled && control.hovered) {
71 }
else if (control.activeFocus) {
82 imagePath:
"widgets/actionbutton"
84 elementId: control.pressed ?
"pressed" :
"normal"
85 width: Math.floor(parent.height/2) * 2
87 anchors.centerIn: parent
89 enabled:
Kirigami.Units.longDuration > 0
90 NumberAnimation { duration:
Kirigami.Units.longDuration }