Changeset View
Changeset View
Standalone View
Standalone View
applets/taskmanager/plugin/backend.h
Show All 35 Lines | |||||
36 | } | 36 | } | ||
37 | 37 | | |||
38 | class Backend : public QObject | 38 | class Backend : public QObject | ||
39 | { | 39 | { | ||
40 | Q_OBJECT | 40 | Q_OBJECT | ||
41 | 41 | | |||
42 | Q_PROPERTY(QQuickItem* taskManagerItem READ taskManagerItem WRITE setTaskManagerItem NOTIFY taskManagerItemChanged) | 42 | Q_PROPERTY(QQuickItem* taskManagerItem READ taskManagerItem WRITE setTaskManagerItem NOTIFY taskManagerItemChanged) | ||
43 | Q_PROPERTY(QQuickItem* toolTipItem READ toolTipItem WRITE setToolTipItem NOTIFY toolTipItemChanged) | 43 | Q_PROPERTY(QQuickItem* toolTipItem READ toolTipItem WRITE setToolTipItem NOTIFY toolTipItemChanged) | ||
44 | Q_PROPERTY(QQuickWindow* groupDialog READ groupDialog WRITE setGroupDialog NOTIFY groupDialogChanged) | ||||
44 | Q_PROPERTY(bool highlightWindows READ highlightWindows WRITE setHighlightWindows NOTIFY highlightWindowsChanged) | 45 | Q_PROPERTY(bool highlightWindows READ highlightWindows WRITE setHighlightWindows NOTIFY highlightWindowsChanged) | ||
45 | 46 | | |||
46 | public: | 47 | public: | ||
47 | enum MiddleClickAction { | 48 | enum MiddleClickAction { | ||
48 | None = 0, | 49 | None = 0, | ||
49 | Close, | 50 | Close, | ||
50 | NewInstance, | 51 | NewInstance, | ||
51 | ToggleMinimized | 52 | ToggleMinimized | ||
52 | }; | 53 | }; | ||
53 | 54 | | |||
54 | Q_ENUM(MiddleClickAction); | 55 | Q_ENUM(MiddleClickAction); | ||
55 | 56 | | |||
56 | Backend(QObject *parent = 0); | 57 | Backend(QObject *parent = 0); | ||
57 | ~Backend(); | 58 | ~Backend(); | ||
58 | 59 | | |||
59 | QQuickItem *taskManagerItem() const; | 60 | QQuickItem *taskManagerItem() const; | ||
60 | void setTaskManagerItem(QQuickItem *item); | 61 | void setTaskManagerItem(QQuickItem *item); | ||
61 | 62 | | |||
62 | QQuickItem *toolTipItem() const; | 63 | QQuickItem *toolTipItem() const; | ||
63 | void setToolTipItem(QQuickItem *item); | 64 | void setToolTipItem(QQuickItem *item); | ||
64 | 65 | | |||
66 | QQuickWindow *groupDialog() const; | ||||
67 | void setGroupDialog(QQuickWindow *dialog); | ||||
68 | | ||||
65 | bool highlightWindows() const; | 69 | bool highlightWindows() const; | ||
66 | void setHighlightWindows(bool highlight); | 70 | void setHighlightWindows(bool highlight); | ||
67 | 71 | | |||
68 | Q_INVOKABLE QVariantList jumpListActions(const QUrl &launcherUrl, QObject *parent); | 72 | Q_INVOKABLE QVariantList jumpListActions(const QUrl &launcherUrl, QObject *parent); | ||
69 | Q_INVOKABLE QVariantList recentDocumentActions(const QUrl &launcherUrl, QObject *parent); | 73 | Q_INVOKABLE QVariantList recentDocumentActions(const QUrl &launcherUrl, QObject *parent); | ||
70 | Q_INVOKABLE void setActionGroup(QAction *action) const; | 74 | Q_INVOKABLE void setActionGroup(QAction *action) const; | ||
71 | 75 | | |||
72 | Q_INVOKABLE QRect globalRect(QQuickItem *item) const; | 76 | Q_INVOKABLE QRect globalRect(QQuickItem *item) const; | ||
Show All 10 Lines | |||||
83 | 87 | | |||
84 | public Q_SLOTS: | 88 | public Q_SLOTS: | ||
85 | void presentWindows(const QVariant &winIds); | 89 | void presentWindows(const QVariant &winIds); | ||
86 | void windowsHovered(const QVariant &winIds, bool hovered); | 90 | void windowsHovered(const QVariant &winIds, bool hovered); | ||
87 | 91 | | |||
88 | Q_SIGNALS: | 92 | Q_SIGNALS: | ||
89 | void taskManagerItemChanged() const; | 93 | void taskManagerItemChanged() const; | ||
90 | void toolTipItemChanged() const; | 94 | void toolTipItemChanged() const; | ||
95 | void groupDialogChanged() const; | ||||
91 | void highlightWindowsChanged() const; | 96 | void highlightWindowsChanged() const; | ||
92 | void addLauncher(const QUrl &url) const; | 97 | void addLauncher(const QUrl &url) const; | ||
93 | 98 | | |||
94 | private Q_SLOTS: | 99 | private Q_SLOTS: | ||
95 | void toolTipWindowChanged(QQuickWindow *window); | 100 | void toolTipWindowChanged(QQuickWindow *window); | ||
96 | void handleJumpListAction() const; | 101 | void handleJumpListAction() const; | ||
97 | void handleRecentDocumentAction() const; | 102 | void handleRecentDocumentAction() const; | ||
98 | 103 | | |||
99 | private: | 104 | private: | ||
100 | void updateWindowHighlight(); | 105 | void updateWindowHighlight(); | ||
101 | 106 | | |||
102 | QQuickItem *m_taskManagerItem; | 107 | QQuickItem *m_taskManagerItem; | ||
103 | QQuickItem *m_toolTipItem; | 108 | QQuickItem *m_toolTipItem; | ||
109 | QQuickWindow *m_groupDialog; | ||||
104 | WId m_panelWinId; | 110 | WId m_panelWinId; | ||
105 | bool m_highlightWindows; | 111 | bool m_highlightWindows; | ||
106 | QList<WId> m_windowsToHighlight; | 112 | QList<WId> m_windowsToHighlight; | ||
107 | QActionGroup *m_actionGroup; | 113 | QActionGroup *m_actionGroup; | ||
108 | KActivities::Consumer *m_activitiesConsumer; | 114 | KActivities::Consumer *m_activitiesConsumer; | ||
109 | }; | 115 | }; | ||
110 | 116 | | |||
111 | #endif | 117 | #endif |