Changeset View
Changeset View
Standalone View
Standalone View
src/ProfileManager.h
Show All 27 Lines | |||||
28 | #include <QList> | 28 | #include <QList> | ||
29 | #include <QSet> | 29 | #include <QSet> | ||
30 | #include <QStringList> | 30 | #include <QStringList> | ||
31 | #include <QVariant> | 31 | #include <QVariant> | ||
32 | #include <QStack> | 32 | #include <QStack> | ||
33 | 33 | | |||
34 | // Konsole | 34 | // Konsole | ||
35 | #include "Profile.h" | 35 | #include "Profile.h" | ||
36 | #include "ProfileList.h" | ||||
36 | 37 | | |||
37 | namespace Konsole { | 38 | namespace Konsole { | ||
38 | /** | 39 | /** | ||
39 | * Manages profiles which specify various settings for terminal sessions | 40 | * Manages profiles which specify various settings for terminal sessions | ||
40 | * and their displays. | 41 | * and their displays. | ||
41 | * | 42 | * | ||
42 | * Profiles in the manager have a concept of favorite status, which can be used | 43 | * Profiles in the manager have a concept of favorite status, which can be used | ||
43 | * by widgets and dialogs in the application decide which profiles to list and | 44 | * by widgets and dialogs in the application decide which profiles to list and | ||
▲ Show 20 Lines • Show All 162 Lines • ▼ Show 20 Line(s) | 52 | public: | |||
206 | QList<QKeySequence> shortcuts(); | 207 | QList<QKeySequence> shortcuts(); | ||
207 | 208 | | |||
208 | /** | 209 | /** | ||
209 | * Finds and loads the profile associated with | 210 | * Finds and loads the profile associated with | ||
210 | * the specified @p shortcut key sequence and returns a pointer to it. | 211 | * the specified @p shortcut key sequence and returns a pointer to it. | ||
211 | */ | 212 | */ | ||
212 | Profile::Ptr findByShortcut(const QKeySequence &shortcut); | 213 | Profile::Ptr findByShortcut(const QKeySequence &shortcut); | ||
213 | 214 | | |||
215 | ProfileList *getProfileList(); | ||||
214 | Q_SIGNALS: | 216 | Q_SIGNALS: | ||
215 | 217 | | |||
216 | /** Emitted when a profile is added to the manager. */ | 218 | /** Emitted when a profile is added to the manager. */ | ||
217 | void profileAdded(Profile::Ptr ptr); | 219 | void profileAdded(Profile::Ptr ptr); | ||
218 | /** Emitted when a profile is removed from the manager. */ | 220 | /** Emitted when a profile is removed from the manager. */ | ||
219 | void profileRemoved(Profile::Ptr ptr); | 221 | void profileRemoved(Profile::Ptr ptr); | ||
220 | /** Emitted when a profile's properties are modified. */ | 222 | /** Emitted when a profile's properties are modified. */ | ||
221 | void profileChanged(Profile::Ptr ptr); | 223 | void profileChanged(Profile::Ptr ptr); | ||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 284 | struct ShortcutData { | |||
283 | Profile::Ptr profileKey; | 285 | Profile::Ptr profileKey; | ||
284 | QString profilePath; | 286 | QString profilePath; | ||
285 | }; | 287 | }; | ||
286 | QMap<QKeySequence, ShortcutData> _shortcuts; // shortcut keys -> profile path | 288 | QMap<QKeySequence, ShortcutData> _shortcuts; // shortcut keys -> profile path | ||
287 | 289 | | |||
288 | // finds out if it's a internal profile or an external one, | 290 | // finds out if it's a internal profile or an external one, | ||
289 | // fixing the path to point to the correct location for the profile. | 291 | // fixing the path to point to the correct location for the profile. | ||
290 | QString normalizePath(const QString& path) const; | 292 | QString normalizePath(const QString& path) const; | ||
293 | | ||||
294 | ProfileList *_profileList; | ||||
291 | }; | 295 | }; | ||
292 | 296 | | |||
293 | /** | 297 | /** | ||
294 | * PopStackOnExit is a utility to remove all values from a QStack which are added during | 298 | * PopStackOnExit is a utility to remove all values from a QStack which are added during | ||
295 | * the lifetime of a PopStackOnExit instance. | 299 | * the lifetime of a PopStackOnExit instance. | ||
296 | * | 300 | * | ||
297 | * When a PopStackOnExit instance is destroyed, elements are removed from the stack | 301 | * When a PopStackOnExit instance is destroyed, elements are removed from the stack | ||
298 | * until the stack count is reduced the value when the PopStackOnExit instance was created. | 302 | * until the stack count is reduced the value when the PopStackOnExit instance was created. | ||
Show All 25 Lines |