Konsole
#include <ColorSchemeManager.h>
Public Member Functions | |
ColorSchemeManager () | |
~ColorSchemeManager () | |
void | addColorScheme (ColorScheme *scheme) |
QList< const ColorScheme * > | allColorSchemes () |
const ColorScheme * | defaultColorScheme () const |
bool | deleteColorScheme (const QString &name) |
const ColorScheme * | findColorScheme (const QString &name) |
Static Public Member Functions | |
static ColorSchemeManager * | instance () |
Detailed Description
Manages the color schemes available for use by terminal displays.
See ColorScheme
Definition at line 38 of file ColorSchemeManager.h.
Constructor & Destructor Documentation
ColorSchemeManager::ColorSchemeManager | ( | ) |
Constructs a new ColorSchemeManager and loads the list of available color schemes.
The color schemes themselves are not loaded until they are first requested via a call to findColorScheme()
Definition at line 156 of file ColorSchemeManager.cpp.
ColorSchemeManager::~ColorSchemeManager | ( | ) |
Destroys the ColorSchemeManager and saves any modified color schemes to disk.
Definition at line 165 of file ColorSchemeManager.cpp.
Member Function Documentation
void ColorSchemeManager::addColorScheme | ( | ColorScheme * | scheme | ) |
Adds a new color scheme to the manager.
If scheme
has the same name as an existing color scheme, it replaces the existing scheme.
Definition at line 293 of file ColorSchemeManager.cpp.
QList< const ColorScheme * > ColorSchemeManager::allColorSchemes | ( | ) |
Returns a list of the all the available color schemes.
This may be slow when first called because all of the color scheme resources on disk must be located, read and parsed.
Subsequent calls will be inexpensive.
Definition at line 204 of file ColorSchemeManager.cpp.
const ColorScheme * ColorSchemeManager::defaultColorScheme | ( | ) | const |
Returns the default color scheme for Konsole.
Definition at line 288 of file ColorSchemeManager.cpp.
bool ColorSchemeManager::deleteColorScheme | ( | const QString & | name | ) |
Deletes a color scheme.
Returns true on successful deletion or false otherwise.
Definition at line 310 of file ColorSchemeManager.cpp.
const ColorScheme * ColorSchemeManager::findColorScheme | ( | const QString & | name | ) |
Returns the color scheme with the given name or 0 if no scheme with that name exists.
If name
is empty, the default color scheme is returned.
The first time that a color scheme with a particular name is requested, the configuration information is loaded from disk.
Definition at line 326 of file ColorSchemeManager.cpp.
|
static |
Returns the global color scheme manager instance.
Definition at line 172 of file ColorSchemeManager.cpp.
The documentation for this class was generated from the following files:
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.