5import org.mauikit.controls as Maui
7import org.kde.kquickimageeditor as KQuickImageEditor
15 property alias rotationSlider: _freeRotationSlider
16 property alias rotationButton : _freeRotationButton
17 property alias cropButton : _cropButton
21 position: ToolBar.Footer
22 Layout.fillWidth: true
23 visible: _freeRotationButton.checked
26 color: Maui.Theme.backgroundColor
31 icon.name: "object-flip-vertical"
32 text:
i18nc(
"@action:button Mirror an image vertically",
"Flip");
34 onClicked: imageDoc.mirror(
false,
true);
39 icon.name:
"object-flip-horizontal"
40 text:
i18nc(
"@action:button Mirror an image horizontally",
"Mirror");
43 onClicked: imageDoc.mirror(
true,
false);
48 rightContent: ToolButton
50 icon.name:
"object-rotate-left"
52 text:
i18nc(
"@action:button Rotate an image 90°",
"Rotate 90°");
55 let value = _freeRotationSlider.value-90
56 _freeRotationSlider.value = value < -180 ? 90 : value
70 visible: _freeRotationButton.checked
74 color:
Maui.Theme.backgroundColor
77 Layout.fillWidth:
true
82 id: _freeRotationSlider
83 Layout.fillWidth:
true
87 snapMode: Slider.SnapAlways
95 Layout.fillWidth:
true
98 color:
Maui.Theme.backgroundColor
100 middleContent:
Maui.ToolActions
103 Layout.alignment:
Qt.AlignHCenter
108 icon.name:
"transform-crop"
109 text:
i18nc(
"@action:button Crop an image",
"Crop");
114 id: _freeRotationButton
115 icon.name:
"transform-rotate"
117 text:
i18nc(
"@action:button Rotate an image",
"Rotate");
121 leftContent: ToolButton
124 visible: _freeRotationButton.checked || _cropButton.checked
126 icon.name:
"checkmark"
129 if(_freeRotationButton.checked)
131 var value = _freeRotationSlider.value
132 _freeRotationSlider.value = 0
134 console.log(
"Rotate >> " , value)
135 imageDoc.rotate(value);
138 if(_cropButton.checked)
145 rightContent: ToolButton
148 visible: _freeRotationButton.checked || _cropButton.checked
149 icon.name:
"dialog-cancel"
152 if(_freeRotationButton.checked)
154 _freeRotationSlider.value = 0
155 _freeRotationButton.checked =
false
159 if(_cropButton.checked)
161 _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-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.