Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/tasksmodel.h
Show All 15 Lines | |||||
16 | 16 | | |||
17 | You should have received a copy of the GNU Lesser General Public | 17 | You should have received a copy of the GNU Lesser General Public | ||
18 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | 18 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | 20 | | |||
21 | #ifndef TASKSMODEL_H | 21 | #ifndef TASKSMODEL_H | ||
22 | #define TASKSMODEL_H | 22 | #define TASKSMODEL_H | ||
23 | 23 | | |||
24 | #include <QQmlParserStatus> | ||||
24 | #include <QSortFilterProxyModel> | 25 | #include <QSortFilterProxyModel> | ||
25 | 26 | | |||
26 | #include "abstracttasksmodeliface.h" | 27 | #include "abstracttasksmodeliface.h" | ||
27 | 28 | | |||
28 | #include "taskmanager_export.h" | 29 | #include "taskmanager_export.h" | ||
29 | 30 | | |||
30 | namespace TaskManager | 31 | namespace TaskManager | ||
31 | { | 32 | { | ||
Show All 16 Lines | |||||
48 | * Tasks may be filtered, sorted or grouped by setting properties on the | 49 | * Tasks may be filtered, sorted or grouped by setting properties on the | ||
49 | * model. | 50 | * model. | ||
50 | * | 51 | * | ||
51 | * Tasks may be interacted with by calling methods on the model. | 52 | * Tasks may be interacted with by calling methods on the model. | ||
52 | * | 53 | * | ||
53 | * @author Eike Hein <hein@kde.org> | 54 | * @author Eike Hein <hein@kde.org> | ||
54 | **/ | 55 | **/ | ||
55 | 56 | | |||
56 | class TASKMANAGER_EXPORT TasksModel : public QSortFilterProxyModel, public AbstractTasksModelIface | 57 | class TASKMANAGER_EXPORT TasksModel : public QSortFilterProxyModel, public AbstractTasksModelIface, public QQmlParserStatus | ||
57 | { | 58 | { | ||
58 | Q_OBJECT | 59 | Q_OBJECT | ||
60 | Q_INTERFACES(QQmlParserStatus) | ||||
59 | 61 | | |||
60 | Q_PROPERTY(int count READ rowCount NOTIFY countChanged) | 62 | Q_PROPERTY(int count READ rowCount NOTIFY countChanged) | ||
61 | Q_PROPERTY(int launcherCount READ launcherCount NOTIFY launcherCountChanged) | 63 | Q_PROPERTY(int launcherCount READ launcherCount NOTIFY launcherCountChanged) | ||
62 | 64 | | |||
63 | Q_PROPERTY(QStringList launcherList READ launcherList WRITE setLauncherList NOTIFY launcherListChanged) | 65 | Q_PROPERTY(QStringList launcherList READ launcherList WRITE setLauncherList NOTIFY launcherListChanged) | ||
64 | 66 | | |||
65 | Q_PROPERTY(bool anyTaskDemandsAttention READ anyTaskDemandsAttention NOTIFY anyTaskDemandsAttentionChanged) | 67 | Q_PROPERTY(bool anyTaskDemandsAttention READ anyTaskDemandsAttention NOTIFY anyTaskDemandsAttentionChanged) | ||
66 | 68 | | |||
▲ Show 20 Lines • Show All 737 Lines • ▼ Show 20 Line(s) | 92 | public: | |||
804 | * | 806 | * | ||
805 | * @param row A row index in the model. | 807 | * @param row A row index in the model. | ||
806 | * @param childRow A row index for a child of the task group at the given row. | 808 | * @param childRow A row index for a child of the task group at the given row. | ||
807 | * @returns a model index for the task at the given row, or for one of its | 809 | * @returns a model index for the task at the given row, or for one of its | ||
808 | * child tasks. | 810 | * child tasks. | ||
809 | */ | 811 | */ | ||
810 | Q_INVOKABLE QModelIndex makeModelIndex(int row, int childRow = -1) const; | 812 | Q_INVOKABLE QModelIndex makeModelIndex(int row, int childRow = -1) const; | ||
811 | 813 | | |||
814 | void classBegin() override; | ||||
broulik: `override` | |||||
815 | void componentComplete() override; | ||||
816 | | ||||
812 | Q_SIGNALS: | 817 | Q_SIGNALS: | ||
813 | void countChanged() const; | 818 | void countChanged() const; | ||
814 | void launcherCountChanged() const; | 819 | void launcherCountChanged() const; | ||
815 | void launcherListChanged() const; | 820 | void launcherListChanged() const; | ||
816 | void anyTaskDemandsAttentionChanged() const; | 821 | void anyTaskDemandsAttentionChanged() const; | ||
817 | void virtualDesktopChanged() const; | 822 | void virtualDesktopChanged() const; | ||
818 | void screenGeometryChanged() const; | 823 | void screenGeometryChanged() const; | ||
819 | void activityChanged() const; | 824 | void activityChanged() const; | ||
Show All 30 Lines |
override