KConfigBase Class Reference
from PyKDE4.kdecore import *
Subclasses: KConfig, KConfigGroup
Detailed Description
- Abstract class:
- This class can be used as a base class for new classes, but can not be instantiated directly.
\class KConfigBase kconfigbase.h <KConfigBase>
Enumerations |
AccessMode | { NoAccess, ReadOnly, ReadWrite } |
WriteConfigFlag | { Persistent, Global, Localized, Normal } Typesafe wrapper: WriteConfigFlags |
Methods |
| __init__ (self) |
KConfigBase.AccessMode | accessMode (self) |
| deleteGroup (self, QByteArray group, KConfigBase.WriteConfigFlags flags=KConfigBase.Normal) |
| deleteGroup (self, QString group, KConfigBase.WriteConfigFlags flags=KConfigBase.Normal) |
| deleteGroup (self, QString group, KConfigBase.WriteConfigFlags flags=KConfigBase.Normal) |
| deleteGroupImpl (self, QByteArray group, KConfigBase.WriteConfigFlags flags=KConfigBase.Normal) |
KConfigGroup | group (self, QByteArray group) |
KConfigGroup | group (self, QString group) |
KConfigGroup | group (self, QString group) |
KConfigGroup | group (self, QByteArray group) |
KConfigGroup | group (self, QString group) |
KConfigGroup | group (self, QString group) |
KConfigGroup | groupImpl (self, QByteArray b) |
KConfigGroup | groupImpl (self, QByteArray b) |
QStringList | groupList (self) |
bool | hasGroup (self, QString group) |
bool | hasGroup (self, QString group) |
bool | hasGroup (self, QByteArray group) |
bool | hasGroupImpl (self, QByteArray group) |
bool | isGroupImmutable (self, QByteArray aGroup) |
bool | isGroupImmutable (self, QString aGroup) |
bool | isGroupImmutable (self, QString aGroup) |
bool | isGroupImmutableImpl (self, QByteArray aGroup) |
bool | isImmutable (self) |
| markAsClean (self) |
| sync (self) |
| virtual_hook (self, int id, void data) |
Method Documentation
KConfigBase.AccessMode accessMode |
( |
|
self ) |
|
- Abstract method:
- This method is abstract and can be overridden but not called directly.
Returns the access mode of the app-config object.
Possible return values
are NoAccess (the application-specific config file could not be
opened neither read-write nor read-only), ReadOnly (the
application-specific config file is opened read-only, but not
read-write) and ReadWrite (the application-specific config
file is opened read-write).
- Returns:
- the access mode of the app-config object
deleteGroup |
( |
self, |
|
|
|
QByteArray |
group, |
|
|
KConfigBase.WriteConfigFlags |
flags=KConfigBase.Normal |
|
) |
|
|
|
Delete aGroup. This marks aGroup as deleted in the config object. This effectively
removes any cascaded values from config files earlier in the stack.
deleteGroup |
( |
self, |
|
|
|
QString |
group, |
|
|
KConfigBase.WriteConfigFlags |
flags=KConfigBase.Normal |
|
) |
|
|
|
deleteGroup |
( |
self, |
|
|
|
QString |
group, |
|
|
KConfigBase.WriteConfigFlags |
flags=KConfigBase.Normal |
|
) |
|
|
|
deleteGroupImpl |
( |
self, |
|
|
|
QByteArray |
group, |
|
|
KConfigBase.WriteConfigFlags |
flags=KConfigBase.Normal |
|
) |
|
|
|
- Abstract method:
- This method is abstract and can be overridden but not called directly.
Returns an object for the named subgroup.
- Parameters:
-
| group | the group to open. Pass a null string on to the KConfig
object to obtain a handle on the root group.
|
- Returns:
- The list of groups.
- Abstract method:
- This method is abstract and can be overridden but not called directly.
- Abstract method:
- This method is abstract and can be overridden but not called directly.
- Abstract method:
- This method is abstract and can be overridden but not called directly.
Returns a list of groups that are known about.
- Returns:
- The list of groups.
bool hasGroup |
( |
self, |
|
|
|
QString |
group |
|
) |
|
|
|
Returns true if the specified group is known about.
- Parameters:
-
| group | The group to search for.
|
- Returns:
- true if the group exists.
bool hasGroup |
( |
self, |
|
|
|
QString |
group |
|
) |
|
|
|
- Abstract method:
- This method is abstract and can be overridden but not called directly.
Can changes be made to the entries in aGroup?
- Parameters:
-
| aGroup | The group to check for immutability.
|
- Returns:
- false if the entries in aGroup can be modified.
bool isGroupImmutable |
( |
self, |
|
|
|
QString |
aGroup |
|
) |
|
|
|
bool isGroupImmutable |
( |
self, |
|
|
|
QString |
aGroup |
|
) |
|
|
|
bool isGroupImmutableImpl |
( |
self, |
|
|
|
QByteArray |
aGroup |
|
) |
|
|
|
- Abstract method:
- This method is abstract and can be overridden but not called directly.
bool isImmutable |
( |
|
self ) |
|
- Abstract method:
- This method is abstract and can be overridden but not called directly.
Checks whether this configuration object can be modified.
- Returns:
- whether changes may be made to this configuration object.
- Abstract method:
- This method is abstract and can be overridden but not called directly.
Reset the dirty flags of all entries in the entry map, so the
values will not be written to disk on a later call to sync().
- Abstract method:
- This method is abstract and can be overridden but not called directly.
Syncs the configuration object that this group belongs to.
Unrelated concurrent changes to the same file are merged and thus
not overwritten. Note however, that this object is not automatically
updated with those changes.
virtual_hook |
( |
self, |
|
|
|
int |
id, |
|
|
void |
data |
|
) |
|
|
|
Virtual hook, used to add new "virtual" functions while maintaining
binary compatibility. Unused in this class.
Enumeration Documentation
Possible return values for accessMode().
- Enumerator:
-
NoAccess | |
ReadOnly | |
ReadWrite | |
Flags to control write entry
- Note:
- It is necessary to wrap members of this enumeration in a
WriteConfigFlags
instance when passing them to a method as group of flags. For example: WriteConfigFlags( Persistent | Global)
- Enumerator:
-
Persistent = 0x01 | |
Global = 0x02 | |
Localized = 0x04 | |
Normal = Persistent | |