5import org.mauikit.controls as Maui
13 property alias brightnessButton: _brightnessButton
14 property alias contrastButton : _contrastButton
15 property alias saturationButton : _saturationButton
16 property Operation currentOperation : _brightnessButton
18 component Operation : ToolButton
22 property double stepSize : 10
25 display: ToolButton.TextOnly
26 onValueChanged: slider.value = value
28 property Slider slider: Ruler
30 Layout.fillWidth: true
35 restoreMode: Binding.RestoreBindingOrValue
37 onMoved: _comp.value = value
38 onValueChanged: _comp.value = value
39 stepSize: _comp.stepSize
48 Layout.fillWidth: true
49 middleContent: currentOperation.slider
52 color: Maui.Theme.backgroundColor
58 position: ToolBar.Footer
59 Layout.fillWidth: true
63 color: Maui.Theme.backgroundColor
68 Layout.alignment: Qt.AlignHCenter
69 spacing: Maui.Style.defaultSpacing
75 checked: currentOperation == this
76 icon.name: "transform-rotate"
78 text:
i18nc(
"@action:button Rotate an image",
"Brightness");
82 value: editor.brightness
83 restoreMode: Binding.RestoreBindingOrValue
88 currentOperation =
this
96 console.log(
"Adjust staturation", value)
97 editor.adjustBrightness(value)
103 id: _saturationButton
105 checked: currentOperation ==
this
107 icon.name:
"transform-crop"
108 text:
i18nc(
"@action:button Crop an image",
"Saturation");
111 currentOperation =
this
112 editor.applyChanges()
119 value: editor.saturation
120 restoreMode: Binding.RestoreBindingOrValue
127 console.log(
"Adjust staturation", value)
128 editor.adjustSaturation(value)
136 icon.name:
"transform-rotate"
138 text:
i18nc(
"@action:button Rotate an image",
"Contrast");
141 currentOperation =
this
142 editor.applyChanges()
146 value: editor.contrast
147 restoreMode: Binding.RestoreBindingOrValue
154 console.log(
"Adjust contrast", value)
155 editor.adjustContrast(value)
163 icon.name:
"transform-rotate"
165 text:
i18nc(
"@action:button Rotate an image",
"Hue");
168 currentOperation =
this
169 editor.applyChanges()
174 restoreMode: Binding.RestoreBindingOrValue
181 console.log(
"Adjust hue", value)
182 editor.adjustHue(value)
190 icon.name:
"transform-rotate"
192 text:
i18nc(
"@action:button Rotate an image",
"Exposure");
195 currentOperation =
this
196 editor.applyChanges()
202 id: _highlightsButton
204 icon.name:
"transform-rotate"
206 text:
i18nc(
"@action:button Rotate an image",
"Highlights");
209 currentOperation =
this
210 editor.applyChanges()
218 icon.name:
"transform-rotate"
220 text:
i18nc(
"@action:button Rotate an image",
"Shadows");
223 currentOperation =
this
224 editor.applyChanges()
231 rightContent: ToolButton
234 icon.name:
"dialog-cancel"
235 onClicked: imageDoc.cancel()
QString i18nc(const char *context, const char *text, const TYPE &arg...)