-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHSVSlider.qml
More file actions
53 lines (39 loc) · 1.27 KB
/
HSVSlider.qml
File metadata and controls
53 lines (39 loc) · 1.27 KB
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
import QtQuick 2.5
import Elice.CameraColorSelector 1.0
Item {
id: slider
width: 150
height: 50
property alias lowerValue: range.lowerValue
property alias upperValue: range.upperValue
property alias rangeType: selectedGradientRegion.rangeType
property alias gredientBorderColor: selectedGradientRegion.borderColor
HSVGradient {
id: gradient
y: 0
anchors.horizontalCenter: parent.horizontalCenter
height: parent.height / 3 * 2
width: range.width - range.thumbWidth
HSVSelectedRegion {
id: selectedGradientRegion
anchors.fill: parent
lowerThumbX: range.lowerThumbX
upperThumbX: range.upperThumbX
}
MouseArea {
anchors.fill: parent
onClicked: {
selectedGradientRegion.isInternal = !selectedGradientRegion.isInternal;
selectedGradientRegion.rangeType =
selectedGradientRegion.isInternal ? ColorSelectorFilter.Internal : ColorSelectorFilter.External;
}
}
}
HSVRangeSlider {
id: range
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: parent.height / 2
}
}