Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/waylandtasksmodel.h
Show All 38 Lines | |||||
39 | 39 | | |||
40 | /** | 40 | /** | ||
41 | * @short A tasks model for Wayland windows. | 41 | * @short A tasks model for Wayland windows. | ||
42 | * | 42 | * | ||
43 | * This model presents tasks sourced from window data on the Wayland | 43 | * This model presents tasks sourced from window data on the Wayland | ||
44 | * server the host process is connected to. | 44 | * server the host process is connected to. | ||
45 | * | 45 | * | ||
46 | * FIXME: Filtering by window type still needed. | 46 | * FIXME: Filtering by window type still needed. | ||
47 | * FIXME: Support for taskmanagerrulesrc (maybe) still needed. | 47 | * | ||
48 | * @see WindowTasksModel | ||||
48 | * | 49 | * | ||
49 | * @author Eike Hein <hein@kde.org> | 50 | * @author Eike Hein <hein@kde.org> | ||
50 | */ | 51 | */ | ||
51 | 52 | | |||
52 | class TASKMANAGER_EXPORT WaylandTasksModel : public AbstractWindowTasksModel | 53 | class TASKMANAGER_EXPORT WaylandTasksModel : public AbstractWindowTasksModel | ||
53 | { | 54 | { | ||
54 | Q_OBJECT | 55 | Q_OBJECT | ||
55 | 56 | | |||
▲ Show 20 Lines • Show All 101 Lines • ▼ Show 20 Line(s) | 57 | public: | |||
157 | /** | 158 | /** | ||
158 | * Request toggling the shaded state of the task at the given index. | 159 | * Request toggling the shaded state of the task at the given index. | ||
159 | * | 160 | * | ||
160 | * @param index An index in this window tasks model. | 161 | * @param index An index in this window tasks model. | ||
161 | **/ | 162 | **/ | ||
162 | void requestToggleShaded(const QModelIndex &index) override; | 163 | void requestToggleShaded(const QModelIndex &index) override; | ||
163 | 164 | | |||
164 | /** | 165 | /** | ||
165 | * Request moving the window at the given index to the specified virtual | 166 | * Request entering the window at the given index on the specified virtual desktops, | ||
166 | * desktop. | 167 | * leaving any other desktops. | ||
167 | * | 168 | * | ||
168 | * FIXME: X Windows version has extra virtual desktop logic. | 169 | * Virtual desktop ids are QStrings. | ||
170 | * | ||||
171 | * An empty list has a special meaning: The window is entered on all virtual desktops | ||||
172 | * in the session. | ||||
169 | * | 173 | * | ||
170 | * @param index An index in this window tasks model. | 174 | * @param index An index in this window tasks model. | ||
171 | * @param desktop A virtual desktop number. | 175 | * @param desktops A list of virtual desktop ids. | ||
172 | **/ | 176 | **/ | ||
173 | void requestVirtualDesktop(const QModelIndex &index, qint32 desktop) override; | 177 | void requestVirtualDesktops(const QModelIndex &index, const QVariantList &desktops) override; | ||
174 | 178 | | |||
175 | /** | 179 | /** | ||
176 | * Request moving the window at the given index to the specified activities | 180 | * Request moving the window at the given index to the specified activities | ||
177 | * | 181 | * | ||
178 | * FIXME: This currently does nothing as activities is not implementated in kwin/kwayland | 182 | * FIXME: This currently does nothing as activities is not implementated in kwin/kwayland | ||
179 | * | 183 | * | ||
180 | * @param index An index in this window tasks model. | 184 | * @param index An index in this window tasks model. | ||
181 | * @param desktop A virtual desktop number. | 185 | * @param desktop A virtual desktop number. | ||
Show All 17 Lines | |||||
199 | * in this implementation. | 203 | * in this implementation. | ||
200 | * @param delegate The delegate. This implementation will attempt to cast | 204 | * @param delegate The delegate. This implementation will attempt to cast | ||
201 | * it to QQuickItem, map its coordinates to its window and find the Wayland | 205 | * it to QQuickItem, map its coordinates to its window and find the Wayland | ||
202 | * Surface for the window. | 206 | * Surface for the window. | ||
203 | **/ | 207 | **/ | ||
204 | void requestPublishDelegateGeometry(const QModelIndex &index, const QRect &geometry, | 208 | void requestPublishDelegateGeometry(const QModelIndex &index, const QRect &geometry, | ||
205 | QObject *delegate = nullptr) override; | 209 | QObject *delegate = nullptr) override; | ||
206 | 210 | | |||
211 | /** | ||||
212 | * Tries to extract a process-internal Wayland window id from supplied mime data. | ||||
213 | * | ||||
214 | * @param mimeData Some mime data. | ||||
215 | * @param @ok Set to true or false on success or failure. | ||||
216 | */ | ||||
217 | static quint32 winIdFromMimeData(const QMimeData *mimeData, bool *ok = nullptr); | ||||
218 | | ||||
219 | /** | ||||
220 | * Tries to extract process-internal Wayland window ids from supplied mime data. | ||||
221 | * | ||||
222 | * @param mimeData Some mime data. | ||||
223 | * @param @ok Set to true or false on success or failure. | ||||
224 | */ | ||||
225 | static QList<quint32> winIdsFromMimeData(const QMimeData *mimeData, bool *ok = nullptr); | ||||
226 | | ||||
207 | private: | 227 | private: | ||
208 | class Private; | 228 | class Private; | ||
209 | QScopedPointer<Private> d; | 229 | QScopedPointer<Private> d; | ||
210 | }; | 230 | }; | ||
211 | 231 | | |||
212 | } | 232 | } | ||
213 | 233 | | |||
214 | #endif | 234 | #endif |