Changeset View
Changeset View
Standalone View
Standalone View
src/SessionManager.h
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 44 | public: | |||
---|---|---|---|---|---|
86 | */ | 86 | */ | ||
87 | const QList<Session *> sessions() const; | 87 | const QList<Session *> sessions() const; | ||
88 | 88 | | |||
89 | // System session management | 89 | // System session management | ||
90 | void saveSessions(KConfig *config); | 90 | void saveSessions(KConfig *config); | ||
91 | void restoreSessions(KConfig *config); | 91 | void restoreSessions(KConfig *config); | ||
92 | int getRestoreId(Session *session); | 92 | int getRestoreId(Session *session); | ||
93 | Session *idToSession(int id); | 93 | Session *idToSession(int id); | ||
94 | bool isClosingAllSessions() const; | ||||
94 | 95 | | |||
95 | Q_SIGNALS: | 96 | Q_SIGNALS: | ||
96 | /** | 97 | /** | ||
97 | * Emitted when a session's settings are updated to match | 98 | * Emitted when a session's settings are updated to match | ||
98 | * its current profile. | 99 | * its current profile. | ||
99 | */ | 100 | */ | ||
100 | void sessionUpdated(Session *session); | 101 | void sessionUpdated(Session *session); | ||
101 | 102 | | |||
Show All 25 Lines | 116 | private: | |||
127 | // returns true ) | 128 | // returns true ) | ||
128 | void applyProfile(Session *session, const Profile::Ptr &profile, bool modifiedPropertiesOnly); | 129 | void applyProfile(Session *session, const Profile::Ptr &profile, bool modifiedPropertiesOnly); | ||
129 | 130 | | |||
130 | QList<Session *> _sessions; // list of running sessions | 131 | QList<Session *> _sessions; // list of running sessions | ||
131 | 132 | | |||
132 | QHash<Session *, Profile::Ptr> _sessionProfiles; | 133 | QHash<Session *, Profile::Ptr> _sessionProfiles; | ||
133 | QHash<Session *, Profile::Ptr> _sessionRuntimeProfiles; | 134 | QHash<Session *, Profile::Ptr> _sessionRuntimeProfiles; | ||
134 | QHash<Session *, int> _restoreMapping; | 135 | QHash<Session *, int> _restoreMapping; | ||
136 | bool _isClosingAllSessions; | ||||
135 | }; | 137 | }; | ||
136 | 138 | | |||
137 | /** Utility class to simplify code in SessionManager::applyProfile(). */ | 139 | /** Utility class to simplify code in SessionManager::applyProfile(). */ | ||
138 | class ShouldApplyProperty | 140 | class ShouldApplyProperty | ||
139 | { | 141 | { | ||
140 | public: | 142 | public: | ||
141 | ShouldApplyProperty(const Profile::Ptr &profile, bool modifiedOnly) : | 143 | ShouldApplyProperty(const Profile::Ptr &profile, bool modifiedOnly) : | ||
142 | _profile(profile), | 144 | _profile(profile), | ||
Show All 15 Lines |