Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/tasksmodel.h
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 58 | { | |||
---|---|---|---|---|---|
61 | 61 | | |||
62 | Q_PROPERTY(int count READ rowCount NOTIFY countChanged) | 62 | Q_PROPERTY(int count READ rowCount NOTIFY countChanged) | ||
63 | Q_PROPERTY(int launcherCount READ launcherCount NOTIFY launcherCountChanged) | 63 | Q_PROPERTY(int launcherCount READ launcherCount NOTIFY launcherCountChanged) | ||
64 | 64 | | |||
65 | Q_PROPERTY(QStringList launcherList READ launcherList WRITE setLauncherList NOTIFY launcherListChanged) | 65 | Q_PROPERTY(QStringList launcherList READ launcherList WRITE setLauncherList NOTIFY launcherListChanged) | ||
66 | 66 | | |||
67 | Q_PROPERTY(bool anyTaskDemandsAttention READ anyTaskDemandsAttention NOTIFY anyTaskDemandsAttentionChanged) | 67 | Q_PROPERTY(bool anyTaskDemandsAttention READ anyTaskDemandsAttention NOTIFY anyTaskDemandsAttentionChanged) | ||
68 | 68 | | |||
69 | Q_PROPERTY(int virtualDesktop READ virtualDesktop WRITE setVirtualDesktop NOTIFY virtualDesktopChanged) | 69 | Q_PROPERTY(QVariant virtualDesktop READ virtualDesktop WRITE setVirtualDesktop NOTIFY virtualDesktopChanged) | ||
70 | Q_PROPERTY(QRect screenGeometry READ screenGeometry WRITE setScreenGeometry NOTIFY screenGeometryChanged) | 70 | Q_PROPERTY(QRect screenGeometry READ screenGeometry WRITE setScreenGeometry NOTIFY screenGeometryChanged) | ||
71 | Q_PROPERTY(QString activity READ activity WRITE setActivity NOTIFY activityChanged) | 71 | Q_PROPERTY(QString activity READ activity WRITE setActivity NOTIFY activityChanged) | ||
72 | 72 | | |||
73 | Q_PROPERTY(bool filterByVirtualDesktop READ filterByVirtualDesktop WRITE setFilterByVirtualDesktop NOTIFY filterByVirtualDesktopChanged) | 73 | Q_PROPERTY(bool filterByVirtualDesktop READ filterByVirtualDesktop WRITE setFilterByVirtualDesktop NOTIFY filterByVirtualDesktopChanged) | ||
74 | Q_PROPERTY(bool filterByScreen READ filterByScreen WRITE setFilterByScreen NOTIFY filterByScreenChanged) | 74 | Q_PROPERTY(bool filterByScreen READ filterByScreen WRITE setFilterByScreen NOTIFY filterByScreenChanged) | ||
75 | Q_PROPERTY(bool filterByActivity READ filterByActivity WRITE setFilterByActivity NOTIFY filterByActivityChanged) | 75 | Q_PROPERTY(bool filterByActivity READ filterByActivity WRITE setFilterByActivity NOTIFY filterByActivityChanged) | ||
76 | Q_PROPERTY(bool filterNotMinimized READ filterNotMinimized WRITE setFilterNotMinimized NOTIFY filterNotMinimizedChanged) | 76 | Q_PROPERTY(bool filterNotMinimized READ filterNotMinimized WRITE setFilterNotMinimized NOTIFY filterNotMinimizedChanged) | ||
77 | 77 | | |||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 92 | public: | |||
145 | * Returns whether any task in the model currently demands attention | 145 | * Returns whether any task in the model currently demands attention | ||
146 | * (AbstractTasksModel::IsDemandingAttention). | 146 | * (AbstractTasksModel::IsDemandingAttention). | ||
147 | * | 147 | * | ||
148 | * @returns whether any task in the model currently demands attention. | 148 | * @returns whether any task in the model currently demands attention. | ||
149 | **/ | 149 | **/ | ||
150 | bool anyTaskDemandsAttention() const; | 150 | bool anyTaskDemandsAttention() const; | ||
151 | 151 | | |||
152 | /** | 152 | /** | ||
153 | * The number of the virtual desktop used in filtering by virtual | 153 | * The id of the virtual desktop used in filtering by virtual | ||
154 | * desktop. Usually set to the number of the current virtual desktop. | 154 | * desktop. Usually set to the id of the current virtual desktop. | ||
155 | * Defaults to @c -1. | 155 | * Defaults to empty. | ||
156 | * | 156 | * | ||
157 | * @see setVirtualDesktop | 157 | * @see setVirtualDesktop | ||
158 | * @returns the number of the virtual desktop used in filtering. | 158 | * @returns the number of the virtual desktop used in filtering. | ||
159 | **/ | 159 | **/ | ||
160 | int virtualDesktop() const; | 160 | QVariant virtualDesktop() const; | ||
161 | 161 | | |||
162 | /** | 162 | /** | ||
163 | * Set the number of the virtual desktop to use in filtering by virtual | 163 | * Set the id of the virtual desktop to use in filtering by virtual | ||
164 | * desktop. | 164 | * desktop. | ||
165 | * | 165 | * | ||
166 | * If set to @c -1, filtering by virtual desktop is disabled. | 166 | * If set to an empty id, filtering by virtual desktop is disabled. | ||
167 | * | 167 | * | ||
168 | * @see virtualDesktop | 168 | * @see virtualDesktop | ||
169 | * @param virtualDesktop A virtual desktop number. | 169 | * @param desktop A virtual desktop id (QString on Wayland; uint >0 on X11). | ||
170 | **/ | 170 | **/ | ||
171 | void setVirtualDesktop(int virtualDesktop); | 171 | void setVirtualDesktop(const QVariant &desktop = QVariant()); | ||
172 | 172 | | |||
173 | /** | 173 | /** | ||
174 | * The geometry of the screen used in filtering by screen. Defaults | 174 | * The geometry of the screen used in filtering by screen. Defaults | ||
175 | * to a null QRect. | 175 | * to a null QRect. | ||
176 | * | 176 | * | ||
177 | * @see setGeometryScreen | 177 | * @see setGeometryScreen | ||
178 | * @returns the geometry of the screen used in filtering. | 178 | * @returns the geometry of the screen used in filtering. | ||
179 | **/ | 179 | **/ | ||
▲ Show 20 Lines • Show All 527 Lines • ▼ Show 20 Line(s) | |||||
707 | * This is meant for tasks that have an associated window, and may be | 707 | * This is meant for tasks that have an associated window, and may be | ||
708 | * a no-op when there is no window. | 708 | * a no-op when there is no window. | ||
709 | * | 709 | * | ||
710 | * @param index An index in this tasks model. | 710 | * @param index An index in this tasks model. | ||
711 | **/ | 711 | **/ | ||
712 | Q_INVOKABLE void requestToggleShaded(const QModelIndex &index) override; | 712 | Q_INVOKABLE void requestToggleShaded(const QModelIndex &index) override; | ||
713 | 713 | | |||
714 | /** | 714 | /** | ||
715 | * Request moving the task at the given index to the specified virtual | 715 | * Request entering the window at the given index on the specified virtual desktops. | ||
716 | * desktop. | | |||
717 | * | 716 | * | ||
718 | * This is meant for tasks that have an associated window, and may be | 717 | * On Wayland, virtual desktop ids are QStrings. On X11, they are uint >0. | ||
719 | * a no-op when there is no window. | | |||
720 | * | 718 | * | ||
721 | * @param index An index in this tasks model. | 719 | * An empty list has a special meaning: The window is entered on all virtual desktops | ||
722 | * @param desktop A virtual desktop number. | 720 | * in the session. | ||
721 | * | ||||
722 | * On X11, a window can only be on one or all virtual desktops. Therefore, only the | ||||
723 | * first list entry is actually used. | ||||
724 | * | ||||
725 | * On X11, the id 0 has a special meaning: The window is entered on all virtual | ||||
726 | * desktops in the session. | ||||
727 | * | ||||
728 | * @param index An index in this window tasks model. | ||||
729 | * @param desktops A list of virtual desktop ids. | ||||
723 | **/ | 730 | **/ | ||
724 | Q_INVOKABLE void requestVirtualDesktop(const QModelIndex &index, qint32 desktop) override; | 731 | Q_INVOKABLE void requestVirtualDesktops(const QModelIndex &index, const QVariantList &desktops) override; | ||
725 | 732 | | |||
726 | /** | 733 | /** | ||
727 | * Request moving the task at the given index to the specified activities. | 734 | * Request moving the task at the given index to the specified activities. | ||
728 | * | 735 | * | ||
729 | * This is meant for tasks that have an associated window, and may be | 736 | * This is meant for tasks that have an associated window, and may be | ||
730 | * a no-op when there is no window. | 737 | * a no-op when there is no window. | ||
731 | * | 738 | * | ||
732 | * This base implementation does nothing. | 739 | * This base implementation does nothing. | ||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |