Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/abstracttasksmodel.h
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
47 | 47 | | |||
48 | public: | 48 | public: | ||
49 | enum AdditionalRoles { | 49 | enum AdditionalRoles { | ||
50 | AppId = Qt::UserRole + 1, /**< KService storage id (.desktop name sans extension). */ | 50 | AppId = Qt::UserRole + 1, /**< KService storage id (.desktop name sans extension). */ | ||
51 | AppName, /**< Application name. */ | 51 | AppName, /**< Application name. */ | ||
52 | GenericName, /**< Generic application name. */ | 52 | GenericName, /**< Generic application name. */ | ||
53 | LauncherUrl, /**< URL that can be used to launch this application (.desktop or executable). */ | 53 | LauncherUrl, /**< URL that can be used to launch this application (.desktop or executable). */ | ||
54 | LauncherUrlWithoutIcon, /**< Special path to get a launcher URL while skipping fallback icon encoding. Used as speed optimization. */ | 54 | LauncherUrlWithoutIcon, /**< Special path to get a launcher URL while skipping fallback icon encoding. Used as speed optimization. */ | ||
55 | LegacyWinIdList, /**< X11 window ids. Stopgap until we have something better. */ | 55 | WinIdList, /**< NOTE: On Wayland, these ids are only useful within the same process. On X11, they are global window ids. */ | ||
56 | MimeType, /**< MIME type for this task (window, window group), needed for DND. */ | 56 | MimeType, /**< MIME type for this task (window, window group), needed for DND. */ | ||
57 | MimeData, /**< Data for MimeType. */ | 57 | MimeData, /**< Data for MimeType. */ | ||
58 | IsWindow, /**< This is a window task. */ | 58 | IsWindow, /**< This is a window task. */ | ||
59 | IsStartup, /**< This is a startup task. */ | 59 | IsStartup, /**< This is a startup task. */ | ||
60 | IsLauncher, /**< This is a launcher task. */ | 60 | IsLauncher, /**< This is a launcher task. */ | ||
61 | HasLauncher, /**< A launcher exists for this task. Only implemented by TasksModel, not by either the single-type or munging tasks models. */ | 61 | HasLauncher, /**< A launcher exists for this task. Only implemented by TasksModel, not by either the single-type or munging tasks models. */ | ||
62 | IsGroupParent, /**< This is a parent item for a group of child tasks. */ | 62 | IsGroupParent, /**< This is a parent item for a group of child tasks. */ | ||
63 | ChildCount, /**< The number of tasks in this group. */ | 63 | ChildCount, /**< The number of tasks in this group. */ | ||
64 | IsGroupable, /**< Whether this task is being ignored by grouping or not. */ | 64 | IsGroupable, /**< Whether this task is being ignored by grouping or not. */ | ||
65 | IsActive, /**< This is the currently active task. */ | 65 | IsActive, /**< This is the currently active task. */ | ||
66 | IsClosable, /**< requestClose (see below) available. */ | 66 | IsClosable, /**< requestClose (see below) available. */ | ||
67 | IsMovable, /**< requestMove (see below) available. */ | 67 | IsMovable, /**< requestMove (see below) available. */ | ||
68 | IsResizable, /**< requestResize (see below) available. */ | 68 | IsResizable, /**< requestResize (see below) available. */ | ||
69 | IsMaximizable, /**< requestToggleMaximize (see below) available. */ | 69 | IsMaximizable, /**< requestToggleMaximize (see below) available. */ | ||
70 | IsMaximized, /**< Task (i.e. window) is maximized. */ | 70 | IsMaximized, /**< Task (i.e. window) is maximized. */ | ||
71 | IsMinimizable, /**< requestToggleMinimize (see below) available. */ | 71 | IsMinimizable, /**< requestToggleMinimize (see below) available. */ | ||
72 | IsMinimized, /**< Task (i.e. window) is minimized. */ | 72 | IsMinimized, /**< Task (i.e. window) is minimized. */ | ||
73 | IsKeepAbove, /**< Task (i.e. window) is keep-above. */ | 73 | IsKeepAbove, /**< Task (i.e. window) is keep-above. */ | ||
74 | IsKeepBelow, /**< Task (i.e. window) is keep-below. */ | 74 | IsKeepBelow, /**< Task (i.e. window) is keep-below. */ | ||
75 | IsFullScreenable, /**< requestToggleFullScreen (see below) available. */ | 75 | IsFullScreenable, /**< requestToggleFullScreen (see below) available. */ | ||
76 | IsFullScreen, /**< Task (i.e. window) is fullscreen. */ | 76 | IsFullScreen, /**< Task (i.e. window) is fullscreen. */ | ||
77 | IsShadeable, /**< requestToggleShade (see below) available. */ | 77 | IsShadeable, /**< requestToggleShade (see below) available. */ | ||
78 | IsShaded, /**< Task (i.e. window) is shaded. */ | 78 | IsShaded, /**< Task (i.e. window) is shaded. */ | ||
79 | IsVirtualDesktopChangeable, /**< requestVirtualDesktop (see below) available. */ | 79 | IsVirtualDesktopsChangeable, /**< requestVirtualDesktop (see below) available. */ | ||
80 | VirtualDesktop, /**< Virtual desktop for the task (i.e. window). */ | 80 | VirtualDesktops, /**< Virtual desktops for the task (i.e. window). */ | ||
81 | IsOnAllVirtualDesktops, /**< Task is on all virtual desktops. */ | 81 | IsOnAllVirtualDesktops, /**< Task is on all virtual desktops. */ | ||
82 | Geometry, /**< The task's geometry (i.e. the window's). */ | 82 | Geometry, /**< The task's geometry (i.e. the window's). */ | ||
83 | ScreenGeometry, /**< Screen geometry for the task (i.e. the window's screen). */ | 83 | ScreenGeometry, /**< Screen geometry for the task (i.e. the window's screen). */ | ||
84 | Activities, /**< Activities for the task (i.e. window). */ | 84 | Activities, /**< Activities for the task (i.e. window). */ | ||
85 | IsDemandingAttention, /**< Task is demanding attention. */ | 85 | IsDemandingAttention, /**< Task is demanding attention. */ | ||
86 | SkipTaskbar, /**< Task should not be shown in a 'task bar' user interface. */ | 86 | SkipTaskbar, /**< Task should not be shown in a 'task bar' user interface. */ | ||
87 | SkipPager, /**< Task should not to be shown in a 'pager' user interface. */ | 87 | SkipPager, /**< Task should not to be shown in a 'pager' user interface. */ | ||
88 | AppPid, /**< Application Process ID. This is provided best-effort, and may not | 88 | AppPid, /**< Application Process ID. This is provided best-effort, and may not | ||
▲ Show 20 Lines • Show All 145 Lines • ▼ Show 20 Line(s) | |||||
234 | * | 234 | * | ||
235 | * This base implementation does nothing. | 235 | * This base implementation does nothing. | ||
236 | * | 236 | * | ||
237 | * @param index An index in this tasks model. | 237 | * @param index An index in this tasks model. | ||
238 | **/ | 238 | **/ | ||
239 | void requestToggleShaded(const QModelIndex &index) override; | 239 | void requestToggleShaded(const QModelIndex &index) override; | ||
240 | 240 | | |||
241 | /** | 241 | /** | ||
242 | * Request moving the task at the given index to the specified virtual | 242 | * Request entering the window at the given index on the specified virtual desktops, | ||
243 | * desktop. | 243 | * leaving any other desktops. | ||
244 | * | 244 | * | ||
245 | * This is meant for tasks that have an associated window, and may be | 245 | * On Wayland, virtual desktop ids are QStrings. On X11, they are uint >0. | ||
246 | * a no-op when there is no window. | | |||
247 | * | 246 | * | ||
248 | * This base implementation does nothing. | 247 | * An empty list has a special meaning: The window is entered on all virtual desktops | ||
248 | * in the session. | ||||
249 | * | 249 | * | ||
250 | * @param index An index in this tasks model. | 250 | * On X11, a window can only be on one or all virtual desktops. Therefore, only the | ||
251 | * @param desktop A virtual desktop number. | 251 | * first list entry is actually used. | ||
252 | * | ||||
253 | * On X11, the id 0 has a special meaning: The window is entered on all virtual | ||||
254 | * desktops in the session. | ||||
255 | * | ||||
256 | * @param index An index in this window tasks model. | ||||
257 | * @param desktops A list of virtual desktop ids. | ||||
258 | **/ | ||||
259 | void requestVirtualDesktops(const QModelIndex &index, const QVariantList &desktops) override; | ||||
260 | | ||||
261 | /** | ||||
262 | * Request entering the window at the given index on a new virtual desktop, | ||||
263 | * which is created in response to this request. | ||||
264 | * | ||||
265 | * @param index An index in this window tasks model. | ||||
252 | **/ | 266 | **/ | ||
253 | void requestVirtualDesktop(const QModelIndex &index, qint32 desktop) override; | 267 | void requestNewVirtualDesktop(const QModelIndex &index) override; | ||
254 | 268 | | |||
255 | /** | 269 | /** | ||
256 | * Request moving the task at the given index to the specified activities. | 270 | * Request moving the task at the given index to the specified activities. | ||
257 | * | 271 | * | ||
258 | * This is meant for tasks that have an associated window, and may be | 272 | * This is meant for tasks that have an associated window, and may be | ||
259 | * a no-op when there is no window. | 273 | * a no-op when there is no window. | ||
260 | * | 274 | * | ||
261 | * This base implementation does nothing. | 275 | * This base implementation does nothing. | ||
Show All 26 Lines |