Changeset View
Changeset View
Standalone View
Standalone View
src/service/Activities_p.h
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | 43 | public: | |||
---|---|---|---|---|---|
49 | void loadLastActivity(); | 49 | void loadLastActivity(); | ||
50 | 50 | | |||
51 | // If the current activity is not running, | 51 | // If the current activity is not running, | ||
52 | // make some other activity current | 52 | // make some other activity current | ||
53 | void ensureCurrentActivityIsRunning(); | 53 | void ensureCurrentActivityIsRunning(); | ||
54 | 54 | | |||
55 | public Q_SLOTS: | 55 | public Q_SLOTS: | ||
56 | bool setCurrentActivity(const QString &activity); | 56 | bool setCurrentActivity(const QString &activity); | ||
57 | bool previousActivity(); | ||||
58 | bool nextActivity(); | ||||
59 | void updateSortedActivityList(); | ||||
57 | 60 | | |||
58 | public: | 61 | public: | ||
59 | void setActivityState(const QString &activity, Activities::State state); | 62 | void setActivityState(const QString &activity, Activities::State state); | ||
60 | 63 | | |||
61 | // Configuration | 64 | // Configuration | ||
62 | class KDE4ConfigurationTransitionChecker { | 65 | class KDE4ConfigurationTransitionChecker { | ||
63 | public: | 66 | public: | ||
64 | KDE4ConfigurationTransitionChecker(); | 67 | KDE4ConfigurationTransitionChecker(); | ||
65 | } kde4ConfigurationTransitionChecker; | 68 | } kde4ConfigurationTransitionChecker; | ||
66 | QTimer configSyncTimer; | 69 | QTimer configSyncTimer; | ||
67 | KConfig config; | 70 | KConfig config; | ||
68 | 71 | | |||
69 | // Interface to the session management | 72 | // Interface to the session management | ||
70 | KSMServer *ksmserver; | 73 | KSMServer *ksmserver; | ||
71 | 74 | | |||
72 | QHash<QString, Activities::State> activities; | 75 | QHash<QString, Activities::State> activities; | ||
76 | QVector<ActivityInfo> sortedActivities; | ||||
ivan: `QList` -> `QVector`.
`QList` is an evil and slow class :) | |||||
73 | QReadWriteLock activitiesLock; | 77 | QReadWriteLock activitiesLock; | ||
74 | QString currentActivity; | 78 | QString currentActivity; | ||
75 | 79 | | |||
76 | public: | 80 | public: | ||
77 | inline KConfigGroup activityNameConfig() | 81 | inline KConfigGroup activityNameConfig() | ||
78 | { | 82 | { | ||
79 | return KConfigGroup(&config, "activities"); | 83 | return KConfigGroup(&config, "activities"); | ||
80 | } | 84 | } | ||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |
QList -> QVector.
QList is an evil and slow class :)