Konsole
ProfileManager.cpp
Go to the documentation of this file.
void clear()
virtual bool writeProfile(const QString &path, const Profile::Ptr profile)=0
Writes the properties and values from profile to the file specified by path.
QString & append(QChar ch)
QString path() const
QStringList availableProfilePaths() const
Searches for available profiles on-disk and returns a list of paths of profiles which can be loaded...
Definition: ProfileManager.cpp:190
bool contains(const Key &key) const
int localeAwareCompare(const QString &other) const
const T & next()
virtual bool readProfile(const QString &path, Profile::Ptr profile, QString &parentProfile)=0
Attempts to read a profile from path and save the property values described into profile.
Manages profiles which specify various settings for terminal sessions and their displays.
Definition: ProfileManager.h:48
void push_back(const T &value)
bool remove()
void setDefaultProfile(Profile::Ptr profile)
Sets the profile as the default profile for creating new sessions.
Definition: ProfileManager.cpp:415
bool isAbsolute() const
QString & prepend(QChar ch)
void push(const T &t)
virtual QStringList findProfiles()
Returns a list of paths to profiles which this reader can read.
Definition: ProfileReader.cpp:42
A profile which contains a number of default settings for various properties.
Definition: Profile.h:580
const T & at(int i) const
Index of profile in the File Menu WARNING: this is currently an internal field, which is expected to ...
Definition: Profile.h:248
static bool profileNameLessThan(const Profile::Ptr &p1, const Profile::Ptr &p2)
Definition: ProfileManager.cpp:49
Profile::Ptr findByShortcut(const QKeySequence &shortcut)
Finds and loads the profile associated with the specified shortcut key sequence and returns a pointer...
Definition: ProfileManager.cpp:605
QSet< Profile::Ptr > findFavorites()
Returns the set of the user's favorite profiles.
Definition: ProfileManager.cpp:436
bool exists() const
Represents a terminal set-up which can be used to set the initial state of new terminal sessions or a...
Definition: Profile.h:60
virtual QString getPath(const Profile::Ptr profile)=0
Returns a suitable path-name for writing profile to.
QChar separator()
Property
This enum describes the available properties which a Profile may consist of.
Definition: Profile.h:77
static void sortByNameProfileList(QList< Profile::Ptr > &list)
Definition: ProfileManager.cpp:64
int size() const
Profile::Ptr defaultProfile() const
Returns a Profile object describing the default profile.
Definition: ProfileManager.cpp:308
QList< Key > keys() const
void saveSettings()
Saves settings (favorites, shortcuts, default profile etc.) to disk.
Definition: ProfileManager.cpp:272
QList< Profile::Ptr > allProfiles()
Returns a list of all available profiles.
Definition: ProfileManager.cpp:296
QString number(int n, int base)
bool contains(const T &value) const
void append(const T &value)
QList< QKeySequence > shortcuts()
Returns the list of shortcut key sequences which can be used to create new sessions based on existing...
Definition: ProfileManager.cpp:600
static ProfileManager * instance()
Returns the profile manager instance.
Definition: ProfileManager.cpp:114
QKeySequence fromString(const QString &str, SequenceFormat format)
QVariant property(const char *name) const
bool deleteProfile(Profile::Ptr profile)
Deletes the configuration file used to store a profile.
Definition: ProfileManager.cpp:379
bool isDir() const
Item next()
bool isEmpty() const
static bool stringLessThan(const QString &p1, const QString &p2)
Definition: ProfileManager.cpp:54
Interface for all classes which can load profile settings from a file.
Definition: ProfileReader.h:32
void shortcutChanged(Profile::Ptr profile, const QKeySequence &newShortcut)
Emitted when the shortcut for a profile is changed.
const Key & key() const
const T & value() const
QList< Key > keys() const
void sortProfiles(QList< Profile::Ptr > &list)
Definition: ProfileManager.cpp:230
iterator end()
QKeySequence shortcut(Profile::Ptr profile) const
Returns the shortcut associated with a particular profile.
Definition: ProfileManager.cpp:622
bool isEmpty() const
bool contains(const T &value) const
void favoriteStatusChanged(Profile::Ptr profile, bool favorite)
Emitted when the favorite status of a profile changes.
void setShortcut(Profile::Ptr profile, const QKeySequence &shortcut)
Associates a shortcut with a particular profile.
Definition: ProfileManager.cpp:514
ProfileManager()
Constructs a new profile manager and loads information about the available profiles.
Definition: ProfileManager.cpp:69
void changeProfile(Profile::Ptr profile, QHash< Profile::Property, QVariant > propertyMap, bool persistent=true)
Updates a profile with the changes specified in propertyMap.
Definition: ProfileManager.cpp:330
bool remove(const T &value)
QString suffix() const
static void sortByIndexProfileList(QList< Profile::Ptr > &list)
Definition: ProfileManager.cpp:59
void profileRemoved(Profile::Ptr ptr)
Emitted when a profile is removed from the manager.
virtual QString getPath(const Profile::Ptr profile)
Returns a suitable path-name for writing profile to.
Definition: ProfileWriter.cpp:42
QList< Profile::Ptr > sortedFavorites()
Definition: ProfileManager.cpp:288
void profileAdded(Profile::Ptr ptr)
Emitted when a profile is added to the manager.
QSet< T > fromList(const QList< T > &list)
QList< Profile::Ptr > loadedProfiles() const
Returns a list of already loaded profiles.
Definition: ProfileManager.cpp:303
iterator insert(const Key &key, const T &value)
QStringList availableProfileNames() const
Returns a list of names of all available profiles.
Definition: ProfileManager.cpp:202
Profile::Ptr loadProfile(const QString &path)
Loads a profile from the specified path and registers it with the ProfileManager. ...
Definition: ProfileManager.cpp:119
(QString) Path to the profile's configuration file on-disk.
Definition: Profile.h:79
void addProfile(Profile::Ptr type)
Registers a new type of session.
Definition: ProfileManager.cpp:369
void setFavorite(Profile::Ptr profile, bool favorite)
Specifies whether a profile should be included in the user's list of favorite profiles.
Definition: ProfileManager.cpp:442
PopStackOnExit is a utility to remove all values from a QStack which are added during the lifetime of...
Definition: ProfileManager.h:296
Profile::Ptr fallbackProfile() const
Returns a Profile object with hard-coded settings which is always available.
Definition: ProfileManager.cpp:312
iterator begin()
void profileChanged(Profile::Ptr ptr)
Emitted when a profile's properties are modified.
bool hasNext() const
int remove(const Key &key)
void replace(int i, const T &value)
Interface for all classes which can write profile settings to a file.
Definition: ProfileWriter.h:32
static bool profileIndexLessThan(const Profile::Ptr &p1, const Profile::Ptr &p2)
Definition: ProfileManager.cpp:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.