MauiKit Image Tools

Ruler.qml
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Layouts
4
5// import QtQuick.Extras
6// import QtQuick.Controls.Styles
7
8import org.mauikit.controls as Maui
9
10Slider
11{
12 id: control
13
14 live: true
15
16 leftPadding: 0
17 rightPadding: 0
18
19 implicitHeight: Maui.Style.toolBarHeight
20 implicitWidth: width
21
22 // background: Gauge
23 // {
24 // x: control.leftPadding
25 // y: control.topPadding
26 // implicitWidth: control.horizontal ? 500 : control.width
27 // implicitHeight: control.horizontal ? control.height : 500
28 // width: control.horizontal ? control.availableWidth : implicitWidth
29 // height: control.horizontal ? implicitHeight : control.availableHeight
30 //
31 // minimumValue: control.from
32 // value: control.value
33 // maximumValue: control.to
34 // orientation: control.orientation
35 // tickmarkAlignment: Qt.AlignTop
36 // tickmarkStepSize: isWide ? 45 : 90
37 // minorTickmarkCount: isWide ? 6 : 4
38 //
39 // Behavior on value {
40 // NumberAnimation {
41 // duration: 1000
42 // }
43 // }
44 //
45 // style: GaugeStyle {
46 // valueBar: Item{}
47 //
48 // minorTickmark: Item {
49 // implicitWidth: 5
50 // implicitHeight: 2
51 //
52 // Rectangle {
53 // color: Maui.Theme.textColor
54 // anchors.fill: parent
55 // }
56 // }
57 //
58 // tickmark: Item {
59 // implicitWidth: 10
60 // implicitHeight: 2
61 //
62 // Rectangle {
63 // color: Maui.Theme.textColor
64 // anchors.fill: parent
65 // }
66 // }
67 //
68 // tickmarkLabel: Item {
69 // implicitWidth: 16
70 // implicitHeight: 16
71 //
72 // Label {
73 // visible: control.value !== styleData.value
74 // color: Maui.Theme.textColor
75 // text: styleData.value + "°"
76 // horizontalAlignment: Text.AlignHCenter
77 // verticalAlignment: Text.AlignVCenter
78 // anchors.fill: parent
79 // font.pointSize: Maui.Style.fontSizes.tiny
80 // }
81 // }
82 // }
83 // }
84
85 handle: Column
86 {
87 id: handle
88 x: (control.horizontal ? control.visualPosition * (control.availableWidth - width) : 0)
89 y: 0
90 spacing: 0
91 width: 32
92 // implicitHeight: Maui.Style.iconSizes.medium
93
94 Rectangle
95 {
96 width: parent.width
97 height: 16
98 color: Maui.Theme.backgroundColor
99 radius: Maui.Style.radiusV
100 Label
101 {
102 anchors.fill: parent
103 font.bold: true
104 font.weight: Font.Bold
105 font.pointSize: Maui.Style.fontSizes.small
106text: control.value + "°"
107 horizontalAlignment: Text.AlignHCenter
108 verticalAlignment: Text.AlignVCenter
109 }
110 }
111
112 Maui.Icon
113 {
114 anchors.horizontalCenter: parent.horizontalCenter
115 height: 32
116 width: height
117 color: Maui.Theme.textColor
118 isMask: true
119 source: "qrc:/assets/arrow-up.svg"
120 }
121
122 }
123}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.