Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/plugin/rootmodel.cpp
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU General Public License * | 14 | * You should have received a copy of the GNU General Public License * | ||
15 | * along with this program; if not, write to the * | 15 | * along with this program; if not, write to the * | ||
16 | * Free Software Foundation, Inc., * | 16 | * Free Software Foundation, Inc., * | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | ||
18 | ***************************************************************************/ | 18 | ***************************************************************************/ | ||
19 | 19 | | |||
20 | #include "rootmodel.h" | 20 | #include "rootmodel.h" | ||
21 | #include "actionlist.h" | 21 | #include "actionlist.h" | ||
22 | #include "favoritesmodel.h" | 22 | #include "kastatsfavoritesmodel.h" | ||
23 | #include "recentcontactsmodel.h" | 23 | #include "recentcontactsmodel.h" | ||
24 | #include "recentusagemodel.h" | 24 | #include "recentusagemodel.h" | ||
25 | #include "systemmodel.h" | 25 | #include "systemmodel.h" | ||
26 | 26 | | |||
27 | #include <KLocalizedString> | 27 | #include <KLocalizedString> | ||
28 | 28 | | |||
29 | #include <QCollator> | 29 | #include <QCollator> | ||
30 | 30 | | |||
Show All 28 Lines | |||||
59 | 59 | | |||
60 | AbstractModel *GroupEntry::childModel() const | 60 | AbstractModel *GroupEntry::childModel() const | ||
61 | { | 61 | { | ||
62 | return m_childModel; | 62 | return m_childModel; | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | RootModel::RootModel(QObject *parent) : AppsModel(QString(), parent) | 65 | RootModel::RootModel(QObject *parent) : AppsModel(QString(), parent) | ||
66 | , m_complete(false) | 66 | , m_complete(false) | ||
67 | , m_favorites(new FavoritesModel(this)) | 67 | , m_favorites(new KAStatsFavoritesModel(this)) | ||
68 | , m_systemModel(nullptr) | 68 | , m_systemModel(nullptr) | ||
69 | , m_autoPopulate(true) | 69 | , m_autoPopulate(true) | ||
70 | , m_showAllApps(false) | 70 | , m_showAllApps(false) | ||
71 | , m_showRecentApps(true) | 71 | , m_showRecentApps(true) | ||
72 | , m_showRecentDocs(true) | 72 | , m_showRecentDocs(true) | ||
73 | , m_showRecentContacts(false) | 73 | , m_showRecentContacts(false) | ||
74 | , m_recentOrdering(RecentUsageModel::Recent) | 74 | , m_recentOrdering(RecentUsageModel::Recent) | ||
75 | , m_showPowerSession(true) | 75 | , m_showPowerSession(true) | ||
▲ Show 20 Lines • Show All 220 Lines • ▼ Show 20 Line(s) | 286 | { | |||
296 | m_recentAppsModel = nullptr; | 296 | m_recentAppsModel = nullptr; | ||
297 | m_recentDocsModel = nullptr; | 297 | m_recentDocsModel = nullptr; | ||
298 | m_recentContactsModel = nullptr; | 298 | m_recentContactsModel = nullptr; | ||
299 | 299 | | |||
300 | if (m_showAllApps) { | 300 | if (m_showAllApps) { | ||
301 | QList<AbstractEntry *> groups; | 301 | QList<AbstractEntry *> groups; | ||
302 | 302 | | |||
303 | if (m_paginate) { | 303 | if (m_paginate) { | ||
304 | m_favorites = new FavoritesModel(this); | 304 | m_favorites = new KAStatsFavoritesModel(this); | ||
305 | emit favoritesModelChanged(); | 305 | emit favoritesModelChanged(); | ||
306 | 306 | | |||
307 | QHash<QString, AppEntry *> appsHash; | 307 | QHash<QString, AppEntry *> appsHash; | ||
308 | QList<AppEntry *> apps; | 308 | QList<AppEntry *> apps; | ||
309 | 309 | | |||
310 | foreach (const AbstractEntry *groupEntry, m_entryList) { | 310 | foreach (const AbstractEntry *groupEntry, m_entryList) { | ||
311 | AbstractModel *model = groupEntry->childModel(); | 311 | AbstractModel *model = groupEntry->childModel(); | ||
312 | 312 | | |||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |