KateConfig
#include <kateconfig.h>
Classes | |
class | ConfigEntry |
Public Member Functions | |
void | configEnd () |
QStringList | configKeys () const |
void | configStart () |
bool | isGlobal () const |
bool | isSet (const int key) const |
bool | setValue (const int key, const QVariant &value) |
bool | setValue (const QString &key, const QVariant &value) |
QVariant | value (const int key) const |
QVariant | value (const QString &key) const |
Protected Member Functions | |
KateConfig (const KateConfig *parent=nullptr) | |
virtual | ~KateConfig () |
void | addConfigEntry (ConfigEntry &&entry) |
void | finalizeConfigEntries () |
void | readConfigEntries (const KConfigGroup &config) |
virtual void | updateConfig ()=0 |
void | writeConfigEntries (KConfigGroup &config) const |
Protected Attributes | |
int | configSessionNumber = 0 |
Detailed Description
Base Class for the Kate Config Classes Current childs are KateDocumentConfig/KateDocumentConfig/KateDocumentConfig.
Definition at line 46 of file kateconfig.h.
Constructor & Destructor Documentation
◆ KateConfig()
|
protected |
Construct a KateConfig.
- Parameters
-
parent parent config object, if any
Definition at line 30 of file kateconfig.cpp.
◆ ~KateConfig()
|
protectedvirtualdefault |
Virtual Destructor.
Member Function Documentation
◆ addConfigEntry()
|
protected |
Register a new config entry.
Used by the sub classes to register all there known ones.
- Parameters
-
entry new entry to add
Definition at line 39 of file kateconfig.cpp.
◆ configEnd()
void KateConfig::configEnd | ( | ) |
End a config change transaction, update the concerned KateDocumentConfig/KateDocumentConfig/KateDocumentConfig.
Definition at line 103 of file kateconfig.cpp.
◆ configKeys()
|
inline |
All known config keys.
This will use the knowledge about all registered keys of the global object.
- Returns
- all known config keys
Definition at line 76 of file kateconfig.h.
◆ configStart()
void KateConfig::configStart | ( | ) |
Start some config changes.
This method is needed to init some kind of transaction for config changes, update will only be done once, at configEnd() call.
Definition at line 94 of file kateconfig.cpp.
◆ finalizeConfigEntries()
|
protected |
Finalize the config entries.
Called by the sub classes after all entries are registered
Definition at line 55 of file kateconfig.cpp.
◆ isGlobal()
|
inline |
Is this a global config object?
- Returns
- true when this is a global config object
Definition at line 66 of file kateconfig.h.
◆ isSet()
|
inline |
Is given key set in this config object?
- Parameters
-
key config key, aka enum from KateConfig* classes
- Returns
- is the wanted key set?
Definition at line 86 of file kateconfig.h.
◆ readConfigEntries()
|
protected |
Read all config entries from given config group.
- Parameters
-
config config group to read from
Definition at line 74 of file kateconfig.cpp.
◆ setValue() [1/2]
bool KateConfig::setValue | ( | const int | key, |
const QVariant & | value ) |
Set a config value.
Will assert if key is invalid. Might not alter the value if given value fails validation.
- Parameters
-
key config key, aka enum from KateConfig* classes value value to set
- Returns
- true on success
Definition at line 137 of file kateconfig.cpp.
◆ setValue() [2/2]
Set a config value.
Will do nothing if key is not known or the given value fails validation.
- Parameters
-
key config key, aka commandName from KateConfig* classes value value to set
- Returns
- true on success
Definition at line 190 of file kateconfig.cpp.
◆ updateConfig()
|
protectedpure virtual |
do the real update
◆ value() [1/2]
QVariant KateConfig::value | ( | const int | key | ) | const |
Get a config value.
- Parameters
-
key config key, aka enum from KateConfig* classes
- Returns
- value for the wanted key, will assert if key is not valid
Definition at line 118 of file kateconfig.cpp.
◆ value() [2/2]
Get a config value for the string key.
- Parameters
-
key config key, aka commandName from KateConfig* classes
- Returns
- value for the wanted key, will return invalid variant if key is not known
Definition at line 177 of file kateconfig.cpp.
◆ writeConfigEntries()
|
protected |
Write all config entries to given config group.
- Parameters
-
config config group to write to
Definition at line 86 of file kateconfig.cpp.
Member Data Documentation
◆ configSessionNumber
|
protected |
recursion depth
Definition at line 272 of file kateconfig.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:03:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.