00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _KCONFIG_H
00025 #define _KCONFIG_H
00026
00027 class QTimer;
00028
00029 #include "kconfigbase.h"
00030
00031 class KConfigPrivate;
00032
00043 class KConfig : public KConfigBase
00044 {
00045 Q_OBJECT
00046
00047 public:
00061 KConfig( const QString& fileName = QString::null,
00062 bool bReadOnly = false, bool bUseKDEGlobals = true, const char *resType="config");
00063
00070 virtual ~KConfig();
00071
00084 virtual void rollback(bool bDeep = true);
00085
00086
00091 virtual QStringList groupList() const;
00092
00104 virtual QMap<QString, QString> entryMap(const QString &pGroup) const;
00105
00110 virtual void reparseConfiguration();
00111
00118 void setFileWriteMode(int mode);
00119
00126 void setForceGlobal( bool force ) { bForceGlobal = force; }
00127
00133 bool forceGlobal() const { return bForceGlobal; }
00134
00149 void checkUpdate(const QString &id, const QString &updateFile);
00150
00151 protected:
00152
00159 virtual bool internalHasGroup(const QCString &group) const;
00160
00171 virtual KEntryMap internalEntryMap(const QString &pGroup) const;
00172
00183 virtual KEntryMap internalEntryMap() const { return aEntryMap; }
00184
00195 virtual void putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup=true);
00196
00205 virtual KEntry lookupData(const KEntryKey &_key) const;
00206
00214 KEntryMap aEntryMap;
00215
00216 private:
00221 KConfig( const KConfig& );
00226 KConfig& operator= ( const KConfig& rConfig );
00227
00228 private:
00229 bool bGroupImmutable : 1;
00230 bool bFileImmutable : 1;
00231 bool bForceGlobal : 1;
00232 protected:
00233 virtual void virtual_hook( int id, void* data );
00234 private:
00235 KConfigPrivate *d;
00236 };
00237
00238
00239 #endif