Changeset View
Changeset View
Standalone View
Standalone View
effects/desktopgrid/desktopgrid.h
Show All 19 Lines | |||||
20 | *********************************************************************/ | 20 | *********************************************************************/ | ||
21 | 21 | | |||
22 | #ifndef KWIN_DESKTOPGRID_H | 22 | #ifndef KWIN_DESKTOPGRID_H | ||
23 | #define KWIN_DESKTOPGRID_H | 23 | #define KWIN_DESKTOPGRID_H | ||
24 | 24 | | |||
25 | #include <kwineffects.h> | 25 | #include <kwineffects.h> | ||
26 | #include <QObject> | 26 | #include <QObject> | ||
27 | #include <QTimeLine> | 27 | #include <QTimeLine> | ||
28 | #include <QQuickView> | 28 | | ||
29 | #include "kwineffectquickview.h" | ||||
29 | 30 | | |||
30 | namespace KWin | 31 | namespace KWin | ||
31 | { | 32 | { | ||
32 | 33 | | |||
33 | class PresentWindowsEffectProxy; | 34 | class PresentWindowsEffectProxy; | ||
34 | 35 | | |||
35 | class DesktopButtonsView : public QQuickView | | |||
36 | { | | |||
37 | Q_OBJECT | | |||
38 | public: | | |||
39 | explicit DesktopButtonsView(QWindow *parent = nullptr); | | |||
40 | void windowInputMouseEvent(QMouseEvent* e); | | |||
41 | void setAddDesktopEnabled(bool enable); | | |||
42 | void setRemoveDesktopEnabled(bool enable); | | |||
43 | bool isVisible() const; | | |||
44 | void show(); | | |||
45 | void hide(); | | |||
46 | public: | | |||
47 | EffectWindow *effectWindow; | | |||
48 | Q_SIGNALS: | | |||
49 | void addDesktop(); | | |||
50 | void removeDesktop(); | | |||
51 | private: | | |||
52 | bool m_visible; | | |||
53 | QPoint m_pos; | | |||
54 | bool m_posIsValid; | | |||
55 | }; | | |||
56 | | ||||
57 | class DesktopGridEffect | 36 | class DesktopGridEffect | ||
58 | : public Effect | 37 | : public Effect | ||
59 | { | 38 | { | ||
60 | Q_OBJECT | 39 | Q_OBJECT | ||
61 | Q_PROPERTY(int zoomDuration READ configuredZoomDuration) | 40 | Q_PROPERTY(int zoomDuration READ configuredZoomDuration) | ||
62 | Q_PROPERTY(int border READ configuredBorder) | 41 | Q_PROPERTY(int border READ configuredBorder) | ||
63 | Q_PROPERTY(Qt::Alignment desktopNameAlignment READ configuredDesktopNameAlignment) | 42 | Q_PROPERTY(Qt::Alignment desktopNameAlignment READ configuredDesktopNameAlignment) | ||
64 | Q_PROPERTY(int layoutMode READ configuredLayoutMode) | 43 | Q_PROPERTY(int layoutMode READ configuredLayoutMode) | ||
▲ Show 20 Lines • Show All 112 Lines • ▼ Show 20 Line(s) | 99 | private: | |||
177 | QList<QKeySequence> shortcut; | 156 | QList<QKeySequence> shortcut; | ||
178 | 157 | | |||
179 | PresentWindowsEffectProxy* m_proxy; | 158 | PresentWindowsEffectProxy* m_proxy; | ||
180 | QList<WindowMotionManager> m_managers; | 159 | QList<WindowMotionManager> m_managers; | ||
181 | bool m_usePresentWindows; | 160 | bool m_usePresentWindows; | ||
182 | QRect m_windowMoveGeometry; | 161 | QRect m_windowMoveGeometry; | ||
183 | QPoint m_windowMoveStartPoint; | 162 | QPoint m_windowMoveStartPoint; | ||
184 | 163 | | |||
185 | QVector<DesktopButtonsView*> m_desktopButtonsViews; | 164 | QVector<EffectQuickScene*> m_desktopButtons; | ||
186 | 165 | | |||
187 | QAction *m_activateAction; | 166 | QAction *m_activateAction; | ||
188 | 167 | | |||
189 | }; | 168 | }; | ||
190 | 169 | | |||
191 | } // namespace | 170 | } // namespace | ||
192 | 171 | | |||
193 | #endif | 172 | #endif |