kconfig.h Source File (kdecore Library)

| # kdecore Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kconfig.h

    00001 /*
    00002    This file is part of the KDE libraries
    00003    Copyright (c) 1999 Preston Brown <pbrown@kde.org>
    00004    Copyright (C) 1997 Matthias Kalle Dalheimer <kalle@kde.org>
    00005
    00006    This library is free software; you can redistribute it and/or
    00007    modify it under the terms of the GNU Library General Public
    00008    License as published by the Free Software Foundation; either
    00009    version 2 of the License, or (at your option) any later version.
    00010
    00011    This library is distributed in the hope that it will be useful,
    00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00014    Library General Public License for more details.
    00015
    00016    You should have received a copy of the GNU Library General Public License
    00017    along with this library; see the file COPYING.LIB.  If not, write to
    00018    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00019    Boston, MA 02111-1307, USA.
    00020 */
    00021
    00022 // $Id: kconfig.h,v 1.51 2002/09/28 12:28:47 tjansen Exp $
    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; // Current group is immutable.
    00230   bool bFileImmutable  : 1; // Current file is immutable.
    00231   bool bForceGlobal    : 1; // Apply everything to kdeglobals.
    00232 protected:
    00233   virtual void virtual_hook( int id, void* data );
    00234 private:
    00235   KConfigPrivate *d;
    00236 };
    00237
    00238
    00239 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:46:22 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001