Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/kis_mirror_manager.h
Show All 16 Lines | |||||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef KIS_MIRROR_MANAGER_H | 20 | #ifndef KIS_MIRROR_MANAGER_H | ||
21 | #define KIS_MIRROR_MANAGER_H | 21 | #define KIS_MIRROR_MANAGER_H | ||
22 | 22 | | |||
23 | #include <QObject> | 23 | #include <QObject> | ||
24 | #include <QPointer> | 24 | #include <QPointer> | ||
25 | #include <QScopedPointer> | 25 | #include <kis_types.h> | ||
26 | 26 | | |||
27 | #include "KisView.h" | 27 | #include "KisView.h" | ||
28 | 28 | | |||
29 | class KisViewManager; | 29 | class KisViewManager; | ||
30 | class KActionCollection; | 30 | class KActionCollection; | ||
31 | class KisMirrorAxis; | 31 | class KisMirrorAxis; | ||
32 | class KisMirrorAxisConfig; | 32 | class KisMirrorAxisConfig; | ||
33 | 33 | | |||
34 | class KisMirrorManager : public QObject | 34 | class KisMirrorManager : public QObject | ||
35 | { | 35 | { | ||
36 | Q_OBJECT | 36 | Q_OBJECT | ||
37 | 37 | | |||
38 | public: | 38 | public: | ||
39 | KisMirrorManager(KisViewManager* view); | 39 | KisMirrorManager(KisViewManager* view); | ||
40 | ~KisMirrorManager() override; | 40 | ~KisMirrorManager() override; | ||
41 | 41 | | |||
42 | void setup(KActionCollection* collection); | 42 | void setup(KActionCollection* collection); | ||
43 | | ||||
44 | void setView(QPointer<KisView> imageView); | 43 | void setView(QPointer<KisView> imageView); | ||
45 | 44 | | |||
46 | private Q_SLOTS: | 45 | private Q_SLOTS: | ||
47 | void updateAction(); | 46 | void updateAction(); | ||
48 | void slotDocumentConfigChanged(); | 47 | void slotDocumentConfigChanged(); | ||
49 | void slotMirrorAxisConfigChanged(); | 48 | void slotMirrorAxisConfigChanged(); | ||
50 | 49 | | |||
51 | private: | 50 | private: | ||
52 | class Private; | | |||
53 | const QScopedPointer<Private> d; | | |||
54 | | ||||
55 | QPointer<KisView> m_imageView; | 51 | QPointer<KisView> m_imageView; | ||
56 | QAction *m_mirrorCanvas; | 52 | QAction *m_mirrorCanvas; | ||
57 | void setDecorationConfig(); | 53 | void setDecorationConfig(); | ||
54 | KisMirrorAxisSP decoration() const; | ||||
58 | }; | 55 | }; | ||
59 | 56 | | |||
60 | #endif // KIS__MANAGER_H | 57 | #endif // KIS_MIRROR_MANAGER_H |