5import org.mauikit.controls as Maui
13 property Operation currentOperation : _brightnessButton
15 component Operation : ToolButton
19 property double stepSize : 10
22 display: ToolButton.TextOnly
23 onValueChanged: slider.value = value
25 property Slider slider: Ruler
27 Layout.fillWidth: true
32 restoreMode: Binding.RestoreBindingOrValue
34 onMoved: _comp.value = value
35 onValueChanged: _comp.value = value
36 stepSize: _comp.stepSize
45 Layout.fillWidth: true
46 middleContent: currentOperation.slider
49 color: Maui.Theme.backgroundColor
55 position: ToolBar.Footer
56 Layout.fillWidth: true
60 color: Maui.Theme.backgroundColor
65 Layout.alignment: Qt.AlignHCenter
66 spacing: Maui.Style.defaultSpacing
74 checked: currentOperation == this
75 icon.name: "transform-rotate"
77 text:
i18nc(
"@action:button Change image brightness",
"Brightness");
81 value: editor.brightness
82 restoreMode: Binding.RestoreBindingOrValue
87 currentOperation =
this
95 console.log(
"Adjust staturation", value)
96 editor.adjustBrightness(value)
103 checked: currentOperation ==
this
105 icon.name:
"transform-crop"
106 text:
i18nc(
"@action:button Change image saturation",
"Saturation");
109 currentOperation =
this
110 editor.applyChanges()
117 value: editor.saturation
118 restoreMode: Binding.RestoreBindingOrValue
125 console.log(
"Adjust staturation", value)
126 editor.adjustSaturation(value)
133 icon.name:
"transform-rotate"
135 text:
i18nc(
"@action:button Change image contrast",
"Contrast");
138 currentOperation =
this
139 editor.applyChanges()
143 value: editor.contrast
144 restoreMode: Binding.RestoreBindingOrValue
152 console.log(
"Adjust contrast", value)
153 editor.adjustContrast(value)
160 icon.name:
"transform-rotate"
162 text:
i18nc(
"@action:button Change image blur",
"Blur");
165 currentOperation =
this
166 editor.applyChanges()
170 value: editor.gaussianBlur
171 restoreMode: Binding.RestoreBindingOrValue
179 console.log(
"Adjust blur", value)
180 editor.adjustGaussianBlur(value)
187 icon.name:
"transform-rotate"
189 text:
i18nc(
"@action:button Change image hue",
"Hue");
192 currentOperation =
this
193 editor.applyChanges()
198 restoreMode: Binding.RestoreBindingOrValue
205 console.log(
"Adjust hue", value)
206 editor.adjustHue(value)
213 icon.name:
"transform-rotate"
215 text:
i18nc(
"@action:button Change image sharpness",
"Sharpness");
218 currentOperation =
this
219 editor.applyChanges()
224 value: editor.sharpness
225 restoreMode: Binding.RestoreBindingOrValue
232 editor.adjustSharpness(value)
239 icon.name:
"transform-rotate"
241 text:
i18nc(
"@action:button Change image gamma",
"Gamma");
244 currentOperation =
this
245 editor.applyChanges()
251 restoreMode: Binding.RestoreBindingOrValue
258 editor.adjustGamma(value)
265 icon.name:
"transform-rotate"
267 text:
i18nc(
"@action:button Change image threshold",
"Threshold");
270 currentOperation =
this
271 editor.applyChanges()
276 value: editor.threshold
277 restoreMode: Binding.RestoreBindingOrValue
284 editor.adjustThreshold(value)
QString i18nc(const char *context, const char *text, const TYPE &arg...)