• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdecore
 

kdecore

  • kdecore
kconfig.h
1 /*
2  This file is part of the KDE libraries
3  Copyright (c) 1999 Preston Brown <pbrown@kde.org>
4  Copyright (C) 1997 Matthias Kalle Dalheimer <kalle@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef _KCONFIG_H
23 #define _KCONFIG_H
24 
25 class TQTimer;
26 
27 #include <tqvaluelist.h>
28 
29 #include "kconfigbase.h"
30 #include "klockfile.h"
31 
32 class KConfigPrivate;
33 
43 class KDECORE_EXPORT KConfig : public KConfigBase
44 {
45  Q_OBJECT
46 
47 public:
48 
62  KConfig( const TQString& fileName = TQString::null,
63  bool bReadOnly = false, bool bUseKDEGlobals = true, const char *resType="config");
64 
65  KConfig(KConfigBackEnd *backEnd, bool bReadOnly = false);
66 
73  virtual ~KConfig();
74 
87  virtual void rollback(bool bDeep = true);
88 
89 
94  virtual TQStringList groupList() const;
95 
107  virtual TQMap<TQString, TQString> entryMap(const TQString &pGroup) const;
108 
113  virtual void reparseConfiguration();
114 
121  void setFileWriteMode(int mode);
122 
129  void setForceGlobal( bool force ) { bForceGlobal = force; }
130 
136  bool forceGlobal() const { return bForceGlobal; }
137 
152  void checkUpdate(const TQString &id, const TQString &updateFile);
153 
165  KConfig* copyTo(const TQString &file, KConfig *config=0) const;
166 
179  KLockFile::Ptr lockFile( bool bGlobal=false );
180 
181 protected:
182 
189  virtual bool internalHasGroup(const TQCString &group) const;
190 
201  virtual KEntryMap internalEntryMap(const TQString &pGroup) const;
202 
212  virtual KEntryMap internalEntryMap() const { return aEntryMap; }
213 
224  virtual void putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup=true);
225 
234  virtual KEntry lookupData(const KEntryKey &_key) const;
235 
243  KEntryMap aEntryMap;
244 
245 private:
250  KConfig( const KConfig& );
255  KConfig& operator= ( const KConfig& rConfig );
256 
257 private:
258  bool bGroupImmutable : 1; // Current group is immutable.
259  bool bFileImmutable : 1; // Current file is immutable.
260  bool bForceGlobal : 1; // Apply everything to kdeglobals.
261 protected:
262  virtual void virtual_hook( int id, void* data );
263 private:
264  KConfigPrivate *d;
265 };
266 
273 class KDECORE_EXPORT KSharedConfig : public KConfig, public KShared
274 {
275  friend class TQValueList<KSharedConfig*>;
276 public:
277  typedef KSharedPtr<KSharedConfig> Ptr;
278 
279 public:
286  static KSharedConfig::Ptr openConfig(const TQString& fileName, bool readOnly = false,
287  bool bUseKDEGlobals = true);
288 
289 private:
290  KSharedConfig( const TQString& fileName, bool readOnly, bool useKDEGlobals );
291  ~KSharedConfig();
292 
293  static TQValueList<KSharedConfig*> *s_list;
294 };
295 
296 #endif

kdecore

Skip menu "kdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |