Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_tool_transform_config_widget.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2013 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __KIS_TOOL_TRANSFORM_CONFIG_WIDGET_H
8#define __KIS_TOOL_TRANSFORM_CONFIG_WIDGET_H
9
11#include "tool_transform_args.h"
12#include "ui_wdg_tool_transform.h"
13
14class KisCanvas2;
15
16
17class KisToolTransformConfigWidget : public QWidget, private Ui::WdgToolTransform
18{
19 Q_OBJECT
20
21public:
22 KisToolTransformConfigWidget(TransformTransactionProperties *transaction, KisCanvas2 *canvas, QWidget *parent);
23
24 void setApplyResetDisabled(bool disabled);
26 void setDefaultWarpPoints(int pointsPerLine = -1);
28
29public Q_SLOTS:
30 void updateConfig(const ToolTransformArgs &config);
31 void slotUpdateIcons();
32
33Q_SIGNALS:
34 void sigConfigChanged(bool needsPreviewRecalculation);
42
43public Q_SLOTS:
44
45 void slotFilterChanged(const KoID &filter);
46 void slotWarpTypeChanged(int index);
47 void slotRotationCenterChanged(int index);
49
50 void slotSetScaleX(int value);
51 void slotSetScaleY(int value);
52
53 void slotSetShearX(qreal value);
54 void slotSetShearY(qreal value);
55
56 void slotSetTranslateX(int value);
57 void slotSetTranslateY(int value);
58
59 void slotSetAX(qreal value);
60 void slotSetAY(qreal value);
61 void slotSetAZ(qreal value);
62 void slotSetCameraHeight(qreal value);
63
64 void slotFlipX();
65 void slotFlipY();
66 void slotRotateCW();
67 void slotRotateCCW();
68
69 void slotSetWarpAlpha(qreal value);
70 void slotSetWarpDensity(int value);
71
73
75
80
84 void slotCageOptionsChanged(int);
85
88 void slotButtonBoxClicked(QAbstractButton *button);
89
91
92
93 void slotEditCagePoints(bool value);
94
95 void liquifySizeChanged(qreal value);
96 void liquifyAmountChanged(qreal value);
97 void liquifyFlowChanged(qreal value);
99 void liquifySpacingChanged(qreal value);
103
105
107
108 void slotGranularityChanged(QString value);
110
111 void slotMeshSizeChanged();
115
116 void slotPreviewChanged(int index);
117
118private:
119
120 void blockNotifications();
122 void notifyConfigChanged(bool needsPreviewRecalculation = true);
123
124 void blockUiSlots();
125 void unblockUiSlots();
126
127 void activateCustomWarpPoints(bool enabled);
128
130
132
133 void resetUIOptions();
134
135private:
136 static const int DEFAULT_POINTS_PER_LINE;
137
138private:
140 QPointF m_handleDir[9];
146};
147
148#endif /* __KIS_TOOL_TRANSFORM_CONFIG_WIDGET_H */
float value(const T *src, size_t ch)
void sigResetTransform(ToolTransformArgs::TransformMode mode)
void slotButtonBoxClicked(QAbstractButton *button)
TransformTransactionProperties * m_transaction
void sigConfigChanged(bool needsPreviewRecalculation)
void notifyConfigChanged(bool needsPreviewRecalculation=true)
void updateConfig(const ToolTransformArgs &config)
KisToolTransformConfigWidget(TransformTransactionProperties *transaction, KisCanvas2 *canvas, QWidget *parent)
Definition KoID.h:30
QString button(const QWheelEvent &ev)