Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoClipMask.h
- This file was copied from libs/ui/kis_aspect_ratio_locker.h.
Show All 10 Lines | |||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. | ||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | #ifndef __KIS_ASPECT_RATIO_LOCKER_H | 19 | #ifndef KOCLIPMASK_H | ||
20 | #define __KIS_ASPECT_RATIO_LOCKER_H | 20 | #define KOCLIPMASK_H | ||
21 | 21 | | |||
22 | #include "kritaflake_export.h" | ||||
23 | | ||||
24 | #include <KoFlakeCoordinateSystem.h> | ||||
22 | #include <QScopedPointer> | 25 | #include <QScopedPointer> | ||
23 | #include <QObject> | 26 | #include <QList> | ||
24 | #include "kritaui_export.h" | 27 | | ||
28 | class KoShape; | ||||
29 | class QRectF; | ||||
30 | class QTransform; | ||||
31 | class QPointF; | ||||
32 | class QPainter; | ||||
25 | 33 | | |||
26 | class QSpinBox; | | |||
27 | class QDoubleSpinBox; | | |||
28 | class KisSliderSpinBox; | | |||
29 | class KisDoubleSliderSpinBox; | | |||
30 | class KoAspectButton; | | |||
31 | 34 | | |||
32 | class KRITAUI_EXPORT KisAspectRatioLocker : public QObject | 35 | class KRITAFLAKE_EXPORT KoClipMask | ||
33 | { | 36 | { | ||
34 | Q_OBJECT | | |||
35 | public: | 37 | public: | ||
36 | KisAspectRatioLocker(QObject *parent = 0); | 38 | KoClipMask(); | ||
37 | ~KisAspectRatioLocker(); | 39 | ~KoClipMask(); | ||
40 | | ||||
41 | KoClipMask *clone() const; | ||||
42 | | ||||
43 | KoFlake::CoordinateSystem coordinates() const; | ||||
44 | void setCoordinates(KoFlake::CoordinateSystem value); | ||||
38 | 45 | | |||
39 | template <class SpinBoxType> | 46 | KoFlake::CoordinateSystem contentCoordinates() const; | ||
40 | void connectSpinBoxes(SpinBoxType *spinOne, SpinBoxType *spinTwo, KoAspectButton *aspectButton); | 47 | void setContentCoordinates(KoFlake::CoordinateSystem value); | ||
41 | 48 | | |||
42 | void setBlockUpdateSignalOnDrag(bool block); | 49 | QRectF maskRect() const; | ||
50 | void setMaskRect(const QRectF &value); | ||||
43 | 51 | | |||
44 | private Q_SLOTS: | 52 | QList<KoShape *> shapes() const; | ||
45 | void slotSpinOneChanged(); | 53 | void setShapes(const QList<KoShape *> &value); | ||
46 | void slotSpinTwoChanged(); | 54 | | ||
47 | void slotAspectButtonChanged(); | 55 | bool isEmpty() const; | ||
48 | 56 | | |||
49 | Q_SIGNALS: | 57 | void setExtraShapeOffset(const QPointF &value); | ||
50 | void sliderValueChanged(); | 58 | | ||
51 | void aspectButtonChanged(); | 59 | void drawMask(QPainter *painter, KoShape *shape); | ||
52 | 60 | | |||
53 | private: | 61 | private: | ||
62 | KoClipMask(const KoClipMask &rhs); | ||||
63 | | ||||
54 | struct Private; | 64 | struct Private; | ||
55 | const QScopedPointer<Private> m_d; | 65 | const QScopedPointer<Private> m_d; | ||
56 | }; | 66 | }; | ||
57 | 67 | | |||
58 | #endif /* __KIS_ASPECT_RATIO_LOCKER_H */ | 68 | #endif // KOCLIPMASK_H |