Changeset View
Changeset View
Standalone View
Standalone View
tabbox/desktopmodel.h
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
47 | { | 47 | { | ||
48 | public: | 48 | public: | ||
49 | enum { | 49 | enum { | ||
50 | DesktopRole = Qt::UserRole, ///< Desktop number | 50 | DesktopRole = Qt::UserRole, ///< Desktop number | ||
51 | DesktopNameRole = Qt::UserRole + 1, ///< Desktop name | 51 | DesktopNameRole = Qt::UserRole + 1, ///< Desktop name | ||
52 | ClientModelRole = Qt::UserRole + 2 ///< Clients on this desktop | 52 | ClientModelRole = Qt::UserRole + 2 ///< Clients on this desktop | ||
53 | }; | 53 | }; | ||
54 | explicit DesktopModel(QObject* parent = nullptr); | 54 | explicit DesktopModel(QObject* parent = nullptr); | ||
55 | ~DesktopModel(); | 55 | ~DesktopModel() override; | ||
56 | 56 | | |||
57 | virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; | 57 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; | ||
58 | virtual int columnCount(const QModelIndex& parent = QModelIndex()) const; | 58 | int columnCount(const QModelIndex& parent = QModelIndex()) const override; | ||
59 | virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; | 59 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; | ||
60 | virtual QModelIndex parent(const QModelIndex& child) const; | 60 | QModelIndex parent(const QModelIndex& child) const override; | ||
61 | virtual QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const; | 61 | QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override; | ||
62 | Q_INVOKABLE QString longestCaption() const; | 62 | Q_INVOKABLE QString longestCaption() const; | ||
63 | 63 | | |||
64 | /** | 64 | /** | ||
65 | * Generates a new list of desktops based on the current config. | 65 | * Generates a new list of desktops based on the current config. | ||
66 | * Calling this method will reset the model. | 66 | * Calling this method will reset the model. | ||
67 | */ | 67 | */ | ||
68 | void createDesktopList(); | 68 | void createDesktopList(); | ||
69 | /** | 69 | /** | ||
Show All 20 Lines |