org.kde.koala
public class KConfig extends KConfigBase
See Also: KGlobal KConfigBase KSimpleConfig
UNKNOWN: KDE Configuration Management class.
Constructor Summary | |
---|---|
protected | KConfig(Class dummy) |
KConfig(String fileName, boolean bReadOnly, boolean bUseKDEGlobals, String resType)
Constructs a KConfig object. | |
KConfig(String fileName, boolean bReadOnly, boolean bUseKDEGlobals) | |
KConfig(String fileName, boolean bReadOnly) | |
KConfig(String fileName) | |
KConfig() | |
KConfig(KConfigBackEnd backEnd, boolean bReadOnly) | |
KConfig(KConfigBackEnd backEnd) |
Method Summary | |
---|---|
void | checkUpdate(String id, String updateFile)
Checks whether the config file contains the update id
as contained in updateFile. If not, it runs kconf_update
to update the config file.
|
String | className() |
KConfig | copyTo(String file, KConfig config)
Copies all entries from this config object to a new config
object that will save itself to file.
Actual saving to file happens when the returned object is
destructed or when sync() is called upon it. |
KConfig | copyTo(String file) |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
protected void | finalize() Deletes the wrapped C++ instance |
boolean | forceGlobal()
Returns true if all entries are being written into kdeglobals. |
ArrayList | groupList()
Returns a list of groups that are known. |
protected boolean | internalHasGroup(String group)
Returns true if the specified group is known. |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
protected KEntry | lookupData(KEntryKey _key)
Looks up an entry in the config object's internal structure. |
QMetaObject | metaObject() |
protected void | putData(KEntryKey _key, KEntry _data, boolean _checkGroup)
Inserts a (key, value) pair into the internal storage mechanism of
the configuration object. |
protected void | putData(KEntryKey _key, KEntry _data) |
void | reparseConfiguration()
Clears all internal data structures and then reread
configuration information from disk. |
void | rollback(boolean bDeep)
Clears all entries out of the dirtyEntryMap , so the
values will not be written to disk on a later call to
sync(). |
void | rollback() |
void | setFileWriteMode(int mode)
Set the file mode for newly created files. |
void | setForceGlobal(boolean force)
Forces all following write-operations being performed on kdeglobals,
independent of the bGlobal flag in writeEntry(). |
Parameters: fileName A file to parse in addition to the
system-wide file(s). If it is not provided, only global
KDE configuration data will be read (depending on the value of
bUseKDEGlobals
). bReadOnly Set the config object's read-only status. Note that the
object will automatically become read-only if either the user does not have
write permission to fileName
or if no file was specified. bUseKDEGlobals Toggle reading the global KDE configuration file. resType the place to look in (config, data, etc) See KStandardDirs.
UNKNOWN: Constructs a KConfig object.
id
as contained in updateFile.
If not, it runs kconf_update
to update the config file.
If you install config update files with critical fixes
you may wish to use this method to verify that a critical
update has indeed been performed to catch the case where
a user restores an old config file from backup that has
not been updated yet.Parameters: id the update to check updateFile the file containing the update
UNKNOWN: Checks whether the config file contains the update id
as contained in updateFile.
file.
Actual saving to file
happens when the returned object is
destructed or when sync() is called upon it.Parameters: file the new config object will save itself to. config optional config object to reuse
UNKNOWN: Copies all entries from this config object to a new config object that will save itself to file.
Returns: true if all entries are being written into kdeglobals
See Also: KConfig
UNKNOWN: Returns true if all entries are being written into kdeglobals.
Returns: a list of of groups
UNKNOWN: Returns a list of groups that are known.
Parameters: group The group to search for.
Returns: true if the group exists.
UNKNOWN: Returns true if the specified group is known.
Parameters: _key The key to look up It contains information both on the group of the key and the entry's key itself.
Returns: the KEntry value (data) found for the key. KEntry.aValue will be the null string if nothing was located.
UNKNOWN: Looks up an entry in the config object's internal structure.
Parameters: _key The key to insert. It contains information both on the group of the key and the key itself. If the key already exists, the old value will be replaced. _data the KEntry that is to be stored. _checkGroup When false, assume that the group already exists.
UNKNOWN: Inserts a (key, value) pair into the internal storage mechanism of the configuration object.
UNKNOWN: Clears all internal data structures and then reread configuration information from disk.
dirtyEntryMap
, so the
values will not be written to disk on a later call to
sync().Parameters: bDeep If true, the dirty map is actually emptied. otherwise, the config object's global dirty flag is set to false, but the dirty entries remain in the dirty entry map.
See Also: KConfigBase
UNKNOWN: Clears all entries out of the dirtyEntryMap
, so the values will not be written to disk on a later call to sync().
Parameters: mode the mode for new files as described in chmod(2)
See Also: :chmod(2)
KConfig KConfig KConfig KConfig KConfig
UNKNOWN: Set the file mode for newly created files.
Parameters: force true to force writing in kdeglobals
See Also: KConfig
UNKNOWN: Forces all following write-operations being performed on kdeglobals, independent of the bGlobal flag in writeEntry().