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 | 26 | | |||
26 | #include "KisView.h" | 27 | #include "KisView.h" | ||
27 | 28 | | |||
28 | class KisViewManager; | 29 | class KisViewManager; | ||
29 | class KActionCollection; | 30 | class KActionCollection; | ||
30 | class KisMirrorAxis; | 31 | class KisMirrorAxis; | ||
31 | 32 | class KisMirrorAxisConfig; | |||
32 | 33 | | |||
33 | class KisMirrorManager : public QObject | 34 | class KisMirrorManager : public QObject | ||
34 | { | 35 | { | ||
35 | Q_OBJECT | 36 | Q_OBJECT | ||
36 | 37 | | |||
37 | public: | 38 | public: | ||
38 | KisMirrorManager(KisViewManager* view); | 39 | KisMirrorManager(KisViewManager* view); | ||
39 | ~KisMirrorManager() override; | 40 | ~KisMirrorManager() override; | ||
40 | 41 | | |||
41 | void setup(KActionCollection* collection); | 42 | void setup(KActionCollection* collection); | ||
42 | 43 | | |||
43 | void setView(QPointer<KisView> imageView); | 44 | void setView(QPointer<KisView> imageView); | ||
44 | 45 | | |||
45 | private Q_SLOTS: | 46 | private Q_SLOTS: | ||
46 | void updateAction(); | 47 | void updateAction(); | ||
48 | void slotDocumentConfigChanged(); | ||||
49 | void slotMirrorAxisConfigChanged(); | ||||
47 | 50 | | |||
48 | private: | 51 | private: | ||
52 | class Private; | ||||
53 | const QScopedPointer<Private> d; | ||||
49 | 54 | | |||
50 | QPointer<KisView> m_imageView; | 55 | QPointer<KisView> m_imageView; | ||
51 | QAction *m_mirrorCanvas; | 56 | QAction *m_mirrorCanvas; | ||
52 | KisMirrorAxis* hasDecoration(); | 57 | KisMirrorAxis* hasDecoration(); | ||
53 | 58 | const KisMirrorAxisConfig &mirrorAxisConfig() const; | |||
54 | }; | 59 | }; | ||
55 | 60 | | |||
56 | #endif // KIS_PAINTING_ASSISTANTS_MANAGER_H | 61 | #endif // KIS__MANAGER_H |