Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/plugin/rootmodel.h
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 53 | { | |||
---|---|---|---|---|---|
56 | 56 | | |||
57 | Q_PROPERTY(bool autoPopulate READ autoPopulate WRITE setAutoPopulate NOTIFY autoPopulateChanged) | 57 | Q_PROPERTY(bool autoPopulate READ autoPopulate WRITE setAutoPopulate NOTIFY autoPopulateChanged) | ||
58 | 58 | | |||
59 | Q_PROPERTY(QObject* systemFavoritesModel READ systemFavoritesModel NOTIFY systemFavoritesModelChanged) | 59 | Q_PROPERTY(QObject* systemFavoritesModel READ systemFavoritesModel NOTIFY systemFavoritesModelChanged) | ||
60 | Q_PROPERTY(bool showAllApps READ showAllApps WRITE setShowAllApps NOTIFY showAllAppsChanged) | 60 | Q_PROPERTY(bool showAllApps READ showAllApps WRITE setShowAllApps NOTIFY showAllAppsChanged) | ||
61 | Q_PROPERTY(bool showRecentApps READ showRecentApps WRITE setShowRecentApps NOTIFY showRecentAppsChanged) | 61 | Q_PROPERTY(bool showRecentApps READ showRecentApps WRITE setShowRecentApps NOTIFY showRecentAppsChanged) | ||
62 | Q_PROPERTY(bool showRecentDocs READ showRecentDocs WRITE setShowRecentDocs NOTIFY showRecentDocsChanged) | 62 | Q_PROPERTY(bool showRecentDocs READ showRecentDocs WRITE setShowRecentDocs NOTIFY showRecentDocsChanged) | ||
63 | Q_PROPERTY(bool showRecentContacts READ showRecentContacts WRITE setShowRecentContacts NOTIFY showRecentContactsChanged) | 63 | Q_PROPERTY(bool showRecentContacts READ showRecentContacts WRITE setShowRecentContacts NOTIFY showRecentContactsChanged) | ||
64 | Q_PROPERTY(int recentOrdering READ recentOrdering WRITE setRecentOrdering NOTIFY recentOrderingChanged) | ||||
64 | Q_PROPERTY(bool showPowerSession READ showPowerSession WRITE setShowPowerSession NOTIFY showPowerSessionChanged) | 65 | Q_PROPERTY(bool showPowerSession READ showPowerSession WRITE setShowPowerSession NOTIFY showPowerSessionChanged) | ||
65 | 66 | | |||
66 | public: | 67 | public: | ||
67 | explicit RootModel(QObject *parent = 0); | 68 | explicit RootModel(QObject *parent = 0); | ||
68 | ~RootModel(); | 69 | ~RootModel(); | ||
69 | 70 | | |||
70 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; | 71 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; | ||
71 | 72 | | |||
Show All 9 Lines | |||||
81 | void setShowRecentApps(bool show); | 82 | void setShowRecentApps(bool show); | ||
82 | 83 | | |||
83 | bool showRecentDocs() const; | 84 | bool showRecentDocs() const; | ||
84 | void setShowRecentDocs(bool show); | 85 | void setShowRecentDocs(bool show); | ||
85 | 86 | | |||
86 | bool showRecentContacts() const; | 87 | bool showRecentContacts() const; | ||
87 | void setShowRecentContacts(bool show); | 88 | void setShowRecentContacts(bool show); | ||
88 | 89 | | |||
90 | int recentOrdering() const; | ||||
91 | void setRecentOrdering(int ordering); | ||||
92 | | ||||
89 | bool showPowerSession() const; | 93 | bool showPowerSession() const; | ||
90 | void setShowPowerSession(bool show); | 94 | void setShowPowerSession(bool show); | ||
91 | 95 | | |||
92 | AbstractModel* favoritesModel(); | 96 | AbstractModel* favoritesModel(); | ||
93 | AbstractModel* systemFavoritesModel(); | 97 | AbstractModel* systemFavoritesModel(); | ||
94 | 98 | | |||
95 | void classBegin() override; | 99 | void classBegin() override; | ||
96 | void componentComplete() override; | 100 | void componentComplete() override; | ||
97 | 101 | | |||
98 | Q_SIGNALS: | 102 | Q_SIGNALS: | ||
99 | void refreshed() const; | 103 | void refreshed() const; | ||
100 | void systemFavoritesModelChanged() const; | 104 | void systemFavoritesModelChanged() const; | ||
101 | void autoPopulateChanged() const; | 105 | void autoPopulateChanged() const; | ||
102 | void showAllAppsChanged() const; | 106 | void showAllAppsChanged() const; | ||
103 | void showRecentAppsChanged() const; | 107 | void showRecentAppsChanged() const; | ||
104 | void showRecentDocsChanged() const; | 108 | void showRecentDocsChanged() const; | ||
105 | void showRecentContactsChanged() const; | 109 | void showRecentContactsChanged() const; | ||
106 | void showPowerSessionChanged() const; | 110 | void showPowerSessionChanged() const; | ||
111 | void recentOrderingChanged() const; | ||||
107 | void recentAppsModelChanged() const; | 112 | void recentAppsModelChanged() const; | ||
108 | 113 | | |||
109 | protected Q_SLOTS: | 114 | protected Q_SLOTS: | ||
110 | void refresh(); | 115 | void refresh(); | ||
111 | 116 | | |||
112 | private: | 117 | private: | ||
113 | bool m_complete; | 118 | bool m_complete; | ||
114 | 119 | | |||
115 | FavoritesModel *m_favorites; | 120 | FavoritesModel *m_favorites; | ||
116 | SystemModel *m_systemModel; | 121 | SystemModel *m_systemModel; | ||
117 | 122 | | |||
118 | bool m_autoPopulate; | 123 | bool m_autoPopulate; | ||
119 | 124 | | |||
120 | bool m_showAllApps; | 125 | bool m_showAllApps; | ||
121 | bool m_showRecentApps; | 126 | bool m_showRecentApps; | ||
122 | bool m_showRecentDocs; | 127 | bool m_showRecentDocs; | ||
123 | bool m_showRecentContacts; | 128 | bool m_showRecentContacts; | ||
129 | int m_recentOrdering; | ||||
124 | bool m_showPowerSession; | 130 | bool m_showPowerSession; | ||
125 | 131 | | |||
126 | RecentUsageModel *m_recentAppsModel; | 132 | RecentUsageModel *m_recentAppsModel; | ||
127 | RecentUsageModel *m_recentDocsModel; | 133 | RecentUsageModel *m_recentDocsModel; | ||
128 | RecentContactsModel *m_recentContactsModel; | 134 | RecentContactsModel *m_recentContactsModel; | ||
129 | }; | 135 | }; | ||
130 | 136 | | |||
131 | #endif | 137 | #endif |