MauiKit Image Tools
5import org.mauikit.controls as Maui
13 property alias rotationSlider: _freeRotationSlider
14 property alias rotationButton : _freeRotationButton
15 property alias cropButton : _cropButton
19 position: ToolBar.Footer
20 Layout.fillWidth: true
21 visible: _freeRotationButton.checked
24 color: Maui.Theme.backgroundColor
29 icon.name: "object-flip-vertical"
30 text:
i18nc(
"@action:button Mirror an image vertically",
"Flip");
32 onClicked: imageDoc.mirror(
false,
true);
37 icon.name:
"object-flip-horizontal"
38 text:
i18nc(
"@action:button Mirror an image horizontally",
"Mirror");
41 onClicked: imageDoc.mirror(
true,
false);
46 rightContent: ToolButton
48 icon.name:
"object-rotate-left"
50 text:
i18nc(
"@action:button Rotate an image 90°",
"Rotate 90°");
53 let value = _freeRotationSlider.value-90
54 _freeRotationSlider.value = value < -180 ? 90 : value
68 visible: _freeRotationButton.checked
72 color:
Maui.Theme.backgroundColor
75 Layout.fillWidth:
true
80 id: _freeRotationSlider
81 Layout.fillWidth:
true
85 snapMode: Slider.SnapAlways
93 Layout.fillWidth:
true
96 color:
Maui.Theme.backgroundColor
98 middleContent:
Maui.ToolActions
101 Layout.alignment:
Qt.AlignHCenter
106 icon.name:
"transform-crop"
107 text:
i18nc(
"@action:button Crop an image",
"Crop");
112 id: _freeRotationButton
113 icon.name:
"transform-rotate"
115 text:
i18nc(
"@action:button Rotate an image",
"Rotate");
119 leftContent: ToolButton
122 visible: _freeRotationButton.checked || _cropButton.checked
124 icon.name:
"checkmark"
127 if(_freeRotationButton.checked)
129 var value = _freeRotationSlider.value
130 _freeRotationSlider.value = 0
132 console.log(
"Rotate >> " , value)
133 imageDoc.rotate(value);
136 if(_cropButton.checked)
143 rightContent: ToolButton
146 visible: _freeRotationButton.checked || _cropButton.checked
147 icon.name:
"dialog-cancel"
150 if(_freeRotationButton.checked)
152 _freeRotationSlider.value = 0
153 _freeRotationButton.checked =
false
157 if(_cropButton.checked)
159 _cropButton.checked =
false
QString i18nc(const char *context, const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 11 2025 11:57:09 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.