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

tdecore

  • tdecore
tdeconfigbase.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 Copyright (c) 2001 Waldo Bastian <bastian@kde.org>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
22
23#ifndef _TDECONFIGBASE_H
24#define _TDECONFIGBASE_H
25
26#include <tqobject.h>
27#include <tqcolor.h>
28#include <tqfont.h>
29#include <tqdatetime.h>
30#include <tqstrlist.h>
31#include <tqstringlist.h>
32#include <tqvariant.h>
33#include <tqmap.h>
34
35#include "tdeconfigdata.h"
36#include "tdelibs_export.h"
37
38class TDEConfigBackEnd;
39class TDEConfigBasePrivate;
40class TDEConfigGroup;
41
70class TDECORE_EXPORT TDEConfigBase : public TQObject
71{
72 TQ_OBJECT
73
74
75 friend class TDEConfigBackEnd;
76 friend class TDEConfigINIBackEnd;
77 friend class TDEConfigGroup;
78
79public:
83 TDEConfigBase();
84
88 virtual ~TDEConfigBase();
89
100 void setGroup( const TQString& group );
101
106 void setDesktopGroup();
107
114 TQString group() const;
115
122 bool hasGroup(const TQString &group) const;
123
129 virtual TQStringList groupList() const = 0;
130
136 TQString locale() const;
137
146 TQString readEntry(const TQString& pKey,
147 const TQString& aDefault = TQString::null ) const;
148
156 TQString readEntry(const char *pKey,
157 const TQString& aDefault = TQString::null ) const;
158
172 TQVariant readPropertyEntry( const TQString& pKey, TQVariant::Type ) const;
173
188 TQVariant readPropertyEntry( const char *pKey, TQVariant::Type ) const;
189
204 TQVariant readPropertyEntry( const TQString& pKey,
205 const TQVariant &aDefault) const;
206
221 TQVariant readPropertyEntry( const char *pKey,
222 const TQVariant &aDefault) const;
223
234 int readListEntry( const TQString& pKey, TQStrList &list, char sep = ',' ) const;
235
246 int readListEntry( const char *pKey, TQStrList &list, char sep = ',' ) const;
247
255 TQStringList readListEntry( const TQString& pKey, char sep = ',' ) const;
256
264 TQStringList readListEntry( const char *pKey, char sep = ',' ) const;
265
275 TQStringList readListEntry( const char* pKey, const TQStringList& aDefault,
276 char sep = ',' ) const;
277
284 TQValueList<int> readIntListEntry( const TQString& pKey ) const;
285
292 TQValueList<int> readIntListEntry( const char *pKey ) const;
293
305 TQString readPathEntry( const TQString& pKey, const TQString & aDefault = TQString::null ) const;
306
318 TQString readPathEntry( const char *pKey, const TQString & aDefault = TQString::null ) const;
319
332 TQStringList readPathListEntry( const TQString& pKey, char sep = ',' ) const;
333
346 TQStringList readPathListEntry( const char *pKey, char sep = ',' ) const;
347
348
360 int readNumEntry( const TQString& pKey, int nDefault = 0 ) const;
361
373 int readNumEntry( const char *pKey, int nDefault = 0 ) const;
374
386 unsigned int readUnsignedNumEntry( const TQString& pKey, unsigned int nDefault = 0 ) const;
387
399 unsigned int readUnsignedNumEntry( const char *pKey, unsigned int nDefault = 0 ) const;
400
401
413 long readLongNumEntry( const TQString& pKey, long nDefault = 0 ) const;
414
426 long readLongNumEntry( const char *pKey, long nDefault = 0 ) const;
427
439 unsigned long readUnsignedLongNumEntry( const TQString& pKey, unsigned long nDefault = 0 ) const;
440
452 unsigned long readUnsignedLongNumEntry( const char *pKey, unsigned long nDefault = 0 ) const;
453
465 TQ_INT64 readNum64Entry( const TQString& pKey, TQ_INT64 nDefault = 0 ) const;
466
478 TQ_INT64 readNum64Entry( const char *pKey, TQ_INT64 nDefault = 0 ) const;
479
491 TQ_UINT64 readUnsignedNum64Entry( const TQString& pKey, TQ_UINT64 nDefault = 0 ) const;
492
504 TQ_UINT64 readUnsignedNum64Entry( const char *pKey, TQ_UINT64 nDefault = 0 ) const;
505
517 double readDoubleNumEntry( const TQString& pKey, double nDefault = 0.0 ) const;
518
530 double readDoubleNumEntry( const char *pKey, double nDefault = 0.0 ) const;
531
543 TQFont readFontEntry( const TQString& pKey, const TQFont* pDefault = 0L ) const;
544
556 TQFont readFontEntry( const char *pKey, const TQFont* pDefault = 0L ) const;
557
569 bool readBoolEntry( const TQString& pKey, bool bDefault = false ) const;
570
582 bool readBoolEntry( const char *pKey, bool bDefault = false ) const;
583
595 TQRect readRectEntry( const TQString& pKey, const TQRect* pDefault = 0L ) const;
596
608 TQRect readRectEntry( const char *pKey, const TQRect* pDefault = 0L ) const;
609
621 TQPoint readPointEntry( const TQString& pKey, const TQPoint* pDefault = 0L ) const;
622
634 TQPoint readPointEntry( const char *pKey, const TQPoint* pDefault = 0L ) const;
635
647 TQSize readSizeEntry( const TQString& pKey, const TQSize* pDefault = 0L ) const;
648
660 TQSize readSizeEntry( const char *pKey, const TQSize* pDefault = 0L ) const;
661
662
674 TQColor readColorEntry( const TQString& pKey, const TQColor* pDefault = 0L ) const;
675
687 TQColor readColorEntry( const char *pKey, const TQColor* pDefault = 0L ) const;
688
701 TQDateTime readDateTimeEntry( const TQString& pKey, const TQDateTime* pDefault = 0L ) const;
702
715 TQDateTime readDateTimeEntry( const char *pKey, const TQDateTime* pDefault = 0L ) const;
716
725 TQString readEntryUntranslated( const TQString& pKey,
726 const TQString& aDefault = TQString::null ) const;
727
736 TQString readEntryUntranslated( const char *pKey,
737 const TQString& aDefault = TQString::null ) const;
738
758 void writeEntry( const TQString& pKey, const TQString& pValue,
759 bool bPersistent = true, bool bGlobal = false,
760 bool bNLS = false );
761
779 void writeEntry( const char *pKey, const TQString& pValue,
780 bool bPersistent = true, bool bGlobal = false,
781 bool bNLS = false );
782
802 void writeEntry( const TQString& pKey, const TQVariant& rValue,
803 bool bPersistent = true, bool bGlobal = false,
804 bool bNLS = false );
824 void writeEntry( const char *pKey, const TQVariant& rValue,
825 bool bPersistent = true, bool bGlobal = false,
826 bool bNLS = false );
827
848 void writeEntry( const TQString& pKey, const TQStrList &rValue,
849 char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
870 void writeEntry( const char *pKey, const TQStrList &rValue,
871 char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
872
893 void writeEntry( const TQString& pKey, const TQStringList &rValue,
894 char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
915 void writeEntry( const char *pKey, const TQStringList &rValue,
916 char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
917
918
938 void writeEntry( const TQString& pKey, const TQValueList<int>& rValue,
939 bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
959 void writeEntry( const char *pKey, const TQValueList<int>& rValue,
960 bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
961
979 void writeEntry( const TQString& pKey, const char *pValue,
980 bool bPersistent = true, bool bGlobal = false,
981 bool bNLS = false )
982 { writeEntry(pKey, TQString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
1000 void writeEntry( const char *pKey, const char *pValue,
1001 bool bPersistent = true, bool bGlobal = false,
1002 bool bNLS = false )
1003 { writeEntry(pKey, TQString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
1004
1020 void writeEntry( const TQString& pKey, int nValue,
1021 bool bPersistent = true, bool bGlobal = false,
1022 bool bNLS = false );
1038 void writeEntry( const char *pKey, int nValue,
1039 bool bPersistent = true, bool bGlobal = false,
1040 bool bNLS = false );
1041
1057 void writeEntry( const TQString& pKey, unsigned int nValue,
1058 bool bPersistent = true, bool bGlobal = false,
1059 bool bNLS = false );
1075 void writeEntry( const char *pKey, unsigned int nValue,
1076 bool bPersistent = true, bool bGlobal = false,
1077 bool bNLS = false );
1078
1093 void writeEntry( const TQString& pKey, long nValue,
1094 bool bPersistent = true, bool bGlobal = false,
1095 bool bNLS = false );
1110 void writeEntry( const char *pKey, long nValue,
1111 bool bPersistent = true, bool bGlobal = false,
1112 bool bNLS = false );
1113
1128 void writeEntry( const TQString& pKey, unsigned long nValue,
1129 bool bPersistent = true, bool bGlobal = false,
1130 bool bNLS = false );
1145 void writeEntry( const char *pKey, unsigned long nValue,
1146 bool bPersistent = true, bool bGlobal = false,
1147 bool bNLS = false );
1148
1163 void writeEntry( const TQString& pKey, TQ_INT64 nValue,
1164 bool bPersistent = true, bool bGlobal = false,
1165 bool bNLS = false );
1180 void writeEntry( const char *pKey, TQ_INT64 nValue,
1181 bool bPersistent = true, bool bGlobal = false,
1182 bool bNLS = false );
1183
1198 void writeEntry( const TQString& pKey, TQ_UINT64 nValue,
1199 bool bPersistent = true, bool bGlobal = false,
1200 bool bNLS = false );
1215 void writeEntry( const char *pKey, TQ_UINT64 nValue,
1216 bool bPersistent = true, bool bGlobal = false,
1217 bool bNLS = false );
1218
1236 void writeEntry( const TQString& pKey, double nValue,
1237 bool bPersistent = true, bool bGlobal = false,
1238 char format = 'g', int precision = 6,
1239 bool bNLS = false );
1257 void writeEntry( const char *pKey, double nValue,
1258 bool bPersistent = true, bool bGlobal = false,
1259 char format = 'g', int precision = 6,
1260 bool bNLS = false );
1261
1276 void writeEntry( const TQString& pKey, bool bValue,
1277 bool bPersistent = true, bool bGlobal = false,
1278 bool bNLS = false );
1293 void writeEntry( const char *pKey, bool bValue,
1294 bool bPersistent = true, bool bGlobal = false,
1295 bool bNLS = false );
1296
1311 void writeEntry( const TQString& pKey, const TQFont& rFont,
1312 bool bPersistent = true, bool bGlobal = false,
1313 bool bNLS = false );
1328 void writeEntry( const char *pKey, const TQFont& rFont,
1329 bool bPersistent = true, bool bGlobal = false,
1330 bool bNLS = false );
1331
1349 void writeEntry( const TQString& pKey, const TQColor& rColor,
1350 bool bPersistent = true, bool bGlobal = false,
1351 bool bNLS = false );
1369 void writeEntry( const char *pKey, const TQColor& rColor,
1370 bool bPersistent = true, bool bGlobal = false,
1371 bool bNLS = false );
1372
1390 void writeEntry( const TQString& pKey, const TQDateTime& rDateTime,
1391 bool bPersistent = true, bool bGlobal = false,
1392 bool bNLS = false );
1410 void writeEntry( const char *pKey, const TQDateTime& rDateTime,
1411 bool bPersistent = true, bool bGlobal = false,
1412 bool bNLS = false );
1413
1414
1432 void writeEntry( const TQString& pKey, const TQRect& rValue,
1433 bool bPersistent = true, bool bGlobal = false,
1434 bool bNLS = false );
1452 void writeEntry( const char *pKey, const TQRect& rValue,
1453 bool bPersistent = true, bool bGlobal = false,
1454 bool bNLS = false );
1455
1473 void writeEntry( const TQString& pKey, const TQPoint& rValue,
1474 bool bPersistent = true, bool bGlobal = false,
1475 bool bNLS = false );
1493 void writeEntry( const char *pKey, const TQPoint& rValue,
1494 bool bPersistent = true, bool bGlobal = false,
1495 bool bNLS = false );
1496
1514 void writeEntry( const TQString& pKey, const TQSize& rValue,
1515 bool bPersistent = true, bool bGlobal = false,
1516 bool bNLS = false );
1534 void writeEntry( const char *pKey, const TQSize& rValue,
1535 bool bPersistent = true, bool bGlobal = false,
1536 bool bNLS = false );
1537
1555 void writePathEntry( const TQString& pKey, const TQString & path,
1556 bool bPersistent = true, bool bGlobal = false,
1557 bool bNLS = false );
1575 void writePathEntry( const char *pKey, const TQString & path,
1576 bool bPersistent = true, bool bGlobal = false,
1577 bool bNLS = false );
1578
1598 void writePathEntry( const char *pKey, const TQString & path,
1599 bool bPersistent, bool bGlobal,
1600 bool bNLS, bool expand );
1601
1625 void writePathEntry( const TQString& pKey, const TQStringList &rValue,
1626 char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
1650 void writePathEntry( const char *pKey, const TQStringList &rValue,
1651 char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
1652
1653
1662 void deleteEntry( const TQString& pKey,
1663 bool bNLS = false, bool bGlobal = false);
1672 void deleteEntry( const char *pKey,
1673 bool bNLS = false, bool bGlobal = false);
1674
1692 bool deleteGroup( const TQString& group, bool bDeep = true, bool bGlobal = false );
1693
1694
1702 void setDollarExpansion( bool _bExpand = true ) { bExpand = _bExpand; }
1703
1709 bool isDollarExpansion() const { return bExpand; }
1710
1725 virtual void rollback( bool bDeep = true );
1726
1740 virtual void sync();
1741
1746 bool isDirty() const { return bDirty; }
1747
1755 virtual void setReadOnly(bool _ro) { bReadOnly = _ro; }
1756
1762 bool isReadOnly() const { return bReadOnly; }
1763
1773 bool hasKey( const TQString& key ) const;
1774
1785 virtual TQMap<TQString, TQString> entryMap(const TQString &group) const = 0;
1786
1799 virtual void reparseConfiguration() = 0;
1800
1805 bool isImmutable() const;
1806
1813 bool groupIsImmutable(const TQString &group) const;
1814
1821 bool entryIsImmutable(const TQString &key) const;
1822
1828 enum ConfigState { NoAccess, ReadOnly, ReadWrite };
1829
1843 ConfigState getConfigState() const;
1844
1851 bool checkConfigFilesWritable(bool warnUser);
1852
1859 void setReadDefaults(bool b);
1860
1866 bool readDefaults() const;
1867
1879 void revertToDefault(const TQString &key);
1880
1907 bool hasDefault(const TQString &key) const;
1908
1909protected:
1915 void setLocale();
1916
1922 virtual void setDirty(bool _bDirty = true) { bDirty = _bDirty; }
1923
1929 virtual void parseConfigFiles();
1930
1946 virtual KEntryMap internalEntryMap( const TQString& pGroup ) const = 0;
1947
1959 virtual KEntryMap internalEntryMap() const = 0;
1960
1976 virtual void putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup = true) = 0;
1977
1992 virtual KEntry lookupData(const KEntryKey &_key) const = 0;
1993
1994 virtual bool internalHasGroup(const TQCString &group) const = 0;
1995
1999 TDEConfigBackEnd *backEnd;
2000public:
2004 void setGroup( const TQCString &pGroup );
2005 void setGroup( const char *pGroup );
2006 bool hasGroup(const TQCString &_pGroup) const;
2007 bool hasGroup(const char *_pGroup) const;
2008 bool hasKey( const char *pKey ) const;
2009
2010protected:
2011 TQCString readEntryUtf8( const char *pKey) const;
2012 bool hasTranslatedKey( const char *pKey ) const;
2013
2016 TQCString mGroup;
2017
2020 TQCString aLocaleString;
2021
2025 bool bDirty;
2026
2027 bool bLocaleInitialized;
2028 bool bReadOnly; // currently only used by KSimpleConfig
2029 mutable bool bExpand; // whether dollar expansion is used
2030
2031protected:
2032 virtual void virtual_hook( int id, void* data );
2033private:
2034 class TDEConfigBasePrivate;
2035 TDEConfigBasePrivate *d;
2036
2037 void writeEntry( const char *pKey, const TQString &rValue,
2038 bool bPersistent, bool bGlobal, bool bNLS, bool bExpand );
2039 void writeEntry( const char *pKey, const TQStringList &rValue,
2040 char sep, bool bPersistent, bool bGlobal, bool bNLS, bool bExpand );
2041
2042};
2043
2044class TDEConfigGroupSaverPrivate;
2045
2082class TDECORE_EXPORT TDEConfigGroupSaver // KDE4 remove
2083{
2084public:
2094 TDEConfigGroupSaver( TDEConfigBase* config, TQString group )
2095 /* KDE 4 : make the second parameter const TQString & */
2096 : _config(config), _oldgroup(config->group())
2097 { _config->setGroup( group ); }
2098
2099 TDEConfigGroupSaver( TDEConfigBase* config, const char *group )
2100 : _config(config), _oldgroup(config->group())
2101 { _config->setGroup( group ); }
2102
2103 TDEConfigGroupSaver( TDEConfigBase* config, const TQCString &group )
2104 : _config(config), _oldgroup(config->group())
2105 { _config->setGroup( group ); }
2106
2107 ~TDEConfigGroupSaver() { _config->setGroup( _oldgroup ); }
2108
2109 TDEConfigBase* config() { return _config; };
2110
2111private:
2112 TDEConfigBase* _config;
2113 TQString _oldgroup;
2114
2115 TDEConfigGroupSaver(const TDEConfigGroupSaver&);
2116 TDEConfigGroupSaver& operator=(const TDEConfigGroupSaver&);
2117
2118 TDEConfigGroupSaverPrivate *d;
2119};
2120
2121class TDEConfigGroupPrivate;
2122
2126class TDECORE_EXPORT TDEConfigGroup: public TDEConfigBase
2127{
2128public:
2133 TDEConfigGroup(TDEConfigBase *master, const TQCString &group);
2140 TDEConfigGroup(TDEConfigBase *master, const TQString &group);
2148 TDEConfigGroup(TDEConfigBase *master, const char * group);
2149
2156 void deleteGroup(bool bGlobal = false);
2157
2164 bool groupIsImmutable() const;
2165
2166 // The following functions are reimplemented:
2167 virtual void setDirty(bool _bDirty);
2168 virtual void putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup = true);
2169 virtual KEntry lookupData(const KEntryKey &_key) const;
2170 virtual void sync();
2171
2172private:
2173 // Hide the following members:
2174 void setGroup() { }
2175 void setDesktopGroup() { }
2176 void group() { }
2177 void hasGroup() { }
2178 void setReadOnly(bool) { }
2179 void isDirty() { }
2180
2181 // The following members are not used.
2182 virtual TQStringList groupList() const { return TQStringList(); }
2183 virtual void rollback(bool) { }
2184 virtual void reparseConfiguration() { }
2185 virtual TQMap<TQString, TQString> entryMap(const TQString &) const
2186 { return TQMap<TQString,TQString>(); }
2187 virtual KEntryMap internalEntryMap( const TQString&) const
2188 { return KEntryMap(); }
2189 virtual KEntryMap internalEntryMap() const
2190 { return KEntryMap(); }
2191 virtual bool internalHasGroup(const TQCString &) const
2192 { return false; }
2193
2194 void getConfigState() { }
2195
2196 TDEConfigBase *mMaster;
2197protected:
2198 virtual void virtual_hook( int id, void* data );
2199private:
2200 TDEConfigGroupPrivate* d;
2201};
2202
2203#endif
TDEConfigBackEnd
Abstract base class for KDE configuration file loading/saving.
Definition: tdeconfigbackend.h:49
TDEConfigBase
KDE Configuration Management abstract base class.
Definition: tdeconfigbase.h:71
TDEConfigBase::readUnsignedLongNumEntry
unsigned long readUnsignedLongNumEntry(const TQString &pKey, unsigned long nDefault=0) const
Read an unsigned numerical value.
Definition: tdeconfigbase.cpp:672
TDEConfigBase::hasDefault
bool hasDefault(const TQString &key) const
Returns whether a default is specified for an entry in either the system wide configuration file or t...
Definition: tdeconfigbase.cpp:1804
TDEConfigBase::setReadDefaults
void setReadDefaults(bool b)
When set, all readEntry and readXXXEntry calls return the system wide (default) values instead of the...
Definition: tdeconfigbase.cpp:1761
TDEConfigBase::readEntry
TQString readEntry(const TQString &pKey, const TQString &aDefault=TQString::null) const
Reads the value of an entry specified by pKey in the current group.
Definition: tdeconfigbase.cpp:221
TDEConfigBase::revertToDefault
void revertToDefault(const TQString &key)
Reverts the entry with key key in the current group in the application specific config file to either...
Definition: tdeconfigbase.cpp:1777
TDEConfigBase::isImmutable
bool isImmutable() const
Checks whether this configuration file can be modified.
Definition: tdeconfigbase.cpp:167
TDEConfigBase::readColorEntry
TQColor readColorEntry(const TQString &pKey, const TQColor *pDefault=0L) const
Reads a TQColor entry.
Definition: tdeconfigbase.cpp:947
TDEConfigBase::lookupData
virtual KEntry lookupData(const KEntryKey &_key) const =0
Looks up an entry in the config object's internal structure.
TDEConfigBase::internalEntryMap
virtual KEntryMap internalEntryMap() const =0
Returns a map (tree) of the entries in the tree.
TDEConfigBase::writeEntry
void writeEntry(const char *pKey, const char *pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
Write a (key/value) pair.
Definition: tdeconfigbase.h:1000
TDEConfigBase::groupList
virtual TQStringList groupList() const =0
Returns a list of groups that are known about.
TDEConfigBase::readUnsignedNum64Entry
TQ_UINT64 readUnsignedNum64Entry(const TQString &pKey, TQ_UINT64 nDefault=0) const
Read an 64-bit unsigned numerical value.
Definition: tdeconfigbase.cpp:710
TDEConfigBase::readNum64Entry
TQ_INT64 readNum64Entry(const TQString &pKey, TQ_INT64 nDefault=0) const
Reads a 64-bit numerical value.
Definition: tdeconfigbase.cpp:690
TDEConfigBase::readNumEntry
int readNumEntry(const TQString &pKey, int nDefault=0) const
Reads a numerical value.
Definition: tdeconfigbase.cpp:613
TDEConfigBase::readBoolEntry
bool readBoolEntry(const TQString &pKey, bool bDefault=false) const
Reads a boolean entry.
Definition: tdeconfigbase.cpp:748
TDEConfigBase::readSizeEntry
TQSize readSizeEntry(const TQString &pKey, const TQSize *pDefault=0L) const
Reads a TQSize entry.
Definition: tdeconfigbase.cpp:921
TDEConfigBase::writePathEntry
void writePathEntry(const TQString &pKey, const TQString &path, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
Writes a file path.
Definition: tdeconfigbase.cpp:1093
TDEConfigBase::entryIsImmutable
bool entryIsImmutable(const TQString &key) const
Checks whether it is possible to change the given entry.
Definition: tdeconfigbase.cpp:182
TDEConfigBase::backEnd
TDEConfigBackEnd * backEnd
A back end for loading/saving to disk in a particular format.
Definition: tdeconfigbase.h:1999
TDEConfigBase::readUnsignedNumEntry
unsigned int readUnsignedNumEntry(const TQString &pKey, unsigned int nDefault=0) const
Reads an unsigned numerical value.
Definition: tdeconfigbase.cpp:634
TDEConfigBase::reparseConfiguration
virtual void reparseConfiguration()=0
Reparses all configuration files.
TDEConfigBase::setDollarExpansion
void setDollarExpansion(bool _bExpand=true)
Turns on or off "dollar expansion" (see TDEConfigBase introduction) when reading config entries.
Definition: tdeconfigbase.h:1702
TDEConfigBase::deleteEntry
void deleteEntry(const TQString &pKey, bool bNLS=false, bool bGlobal=false)
Deletes the entry specified by pKey in the current group.
Definition: tdeconfigbase.cpp:1204
TDEConfigBase::readDoubleNumEntry
double readDoubleNumEntry(const TQString &pKey, double nDefault=0.0) const
Reads a floating point value.
Definition: tdeconfigbase.cpp:729
TDEConfigBase::isReadOnly
bool isReadOnly() const
Returns the read-only status of the config object.
Definition: tdeconfigbase.h:1762
TDEConfigBase::putData
virtual void putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup=true)=0
Inserts a (key/value) pair into the internal storage mechanism of the configuration object.
TDEConfigBase::aLocaleString
TQCString aLocaleString
The locale to retrieve keys under if possible, i.e en_US or fr.
Definition: tdeconfigbase.h:2020
TDEConfigBase::~TDEConfigBase
virtual ~TDEConfigBase()
Destructs the TDEConfigBase object.
Definition: tdeconfigbase.cpp:57
TDEConfigBase::readEntryUntranslated
TQString readEntryUntranslated(const TQString &pKey, const TQString &aDefault=TQString::null) const
Reads the value of an entry specified by pKey in the current group.
Definition: tdeconfigbase.cpp:204
TDEConfigBase::parseConfigFiles
virtual void parseConfigFiles()
Parses all configuration files for a configuration object.
Definition: tdeconfigbase.cpp:1726
TDEConfigBase::isDirty
bool isDirty() const
Checks whether the config file has any dirty (modified) entries.
Definition: tdeconfigbase.h:1746
TDEConfigBase::readIntListEntry
TQValueList< int > readIntListEntry(const TQString &pKey) const
Reads a list of Integers.
Definition: tdeconfigbase.cpp:567
TDEConfigBase::readPointEntry
TQPoint readPointEntry(const TQString &pKey, const TQPoint *pDefault=0L) const
Reads a TQPoint entry.
Definition: tdeconfigbase.cpp:896
TDEConfigBase::writeEntry
void writeEntry(const TQString &pKey, const char *pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
Write a (key/value) pair.
Definition: tdeconfigbase.h:979
TDEConfigBase::ConfigState
ConfigState
Possible return values for getConfigState().
Definition: tdeconfigbase.h:1828
TDEConfigBase::isDollarExpansion
bool isDollarExpansion() const
Returns whether dollar expansion is on or off.
Definition: tdeconfigbase.h:1709
TDEConfigBase::readRectEntry
TQRect readRectEntry(const TQString &pKey, const TQRect *pDefault=0L) const
Reads a TQRect entry.
Definition: tdeconfigbase.cpp:872
TDEConfigBase::readListEntry
int readListEntry(const TQString &pKey, TQStrList &list, char sep=',') const
Reads a list of strings.
Definition: tdeconfigbase.cpp:467
TDEConfigBase::setDirty
virtual void setDirty(bool _bDirty=true)
Sets the global dirty flag of the config object.
Definition: tdeconfigbase.h:1922
TDEConfigBase::setLocale
void setLocale()
Reads the locale and put in the configuration data struct.
Definition: tdeconfigbase.cpp:62
TDEConfigBase::TDEConfigBase
TDEConfigBase()
Construct a TDEConfigBase object.
Definition: tdeconfigbase.cpp:50
TDEConfigBase::readPathListEntry
TQStringList readPathListEntry(const TQString &pKey, char sep=',') const
Reads a list of string paths.
Definition: tdeconfigbase.cpp:599
TDEConfigBase::checkConfigFilesWritable
bool checkConfigFilesWritable(bool warnUser)
Check whether the config files are writable.
Definition: tdeconfigbase.cpp:1904
TDEConfigBase::readLongNumEntry
long readLongNumEntry(const TQString &pKey, long nDefault=0) const
Reads a numerical value.
Definition: tdeconfigbase.cpp:653
TDEConfigBase::setReadOnly
virtual void setReadOnly(bool _ro)
Sets the config object's read-only status.
Definition: tdeconfigbase.h:1755
TDEConfigBase::internalEntryMap
virtual KEntryMap internalEntryMap(const TQString &pGroup) const =0
Returns a map (tree) of the entries in the specified group.
TDEConfigBase::hasKey
bool hasKey(const TQString &key) const
Checks whether the key has an entry in the currently active group.
Definition: tdeconfigbase.cpp:109
TDEConfigBase::writeEntry
void writeEntry(const TQString &pKey, const TQString &pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
Writes a key/value pair.
Definition: tdeconfigbase.cpp:1044
TDEConfigBase::readDateTimeEntry
TQDateTime readDateTimeEntry(const TQString &pKey, const TQDateTime *pDefault=0L) const
Reads a TQDateTime entry.
Definition: tdeconfigbase.cpp:1012
TDEConfigBase::readPathEntry
TQString readPathEntry(const TQString &pKey, const TQString &aDefault=TQString::null) const
Reads a path.
Definition: tdeconfigbase.cpp:585
TDEConfigBase::readFontEntry
TQFont readFontEntry(const TQString &pKey, const TQFont *pDefault=0L) const
Reads a TQFont value.
Definition: tdeconfigbase.cpp:775
TDEConfigBase::bDirty
bool bDirty
Indicates whether there are any dirty entries in the config object that need to be written back to di...
Definition: tdeconfigbase.h:2025
TDEConfigBase::mGroup
TQCString mGroup
The currently selected group.
Definition: tdeconfigbase.h:2016
TDEConfigBase::entryMap
virtual TQMap< TQString, TQString > entryMap(const TQString &group) const =0
Returns a map (tree) of entries for all entries in a particular group.
TDEConfigBase::readPropertyEntry
TQVariant readPropertyEntry(const TQString &pKey, TQVariant::Type) const
Reads the value of an entry specified by pKey in the current group.
Definition: tdeconfigbase.cpp:365
TDEConfigBase::readDefaults
bool readDefaults() const
Definition: tdeconfigbase.cpp:1772
TDEConfigBase::locale
TQString locale() const
Returns a the current locale.
Definition: tdeconfigbase.cpp:74
TDEConfigGroupSaver
Helper class to facilitate working with TDEConfig / KSimpleConfig groups.
Definition: tdeconfigbase.h:2083
TDEConfigGroupSaver::TDEConfigGroupSaver
TDEConfigGroupSaver(TDEConfigBase *config, TQString group)
Constructor.
Definition: tdeconfigbase.h:2094
TDEConfigGroup
A TDEConfigBase derived class for one specific group in a TDEConfig object.
Definition: tdeconfigbase.h:2127
TDEConfigGroup::deleteGroup
void deleteGroup(bool bGlobal=false)
Delete all entries in the entire group.
Definition: tdeconfigbase.cpp:1868
TDEConfigGroup::groupIsImmutable
bool groupIsImmutable() const
Checks whether it is possible to change this group.
Definition: tdeconfigbase.cpp:1873
TDEConfigGroup::sync
virtual void sync()
Flushes all changes that currently reside only in memory back to disk / permanent storage.
Definition: tdeconfigbase.cpp:1893
TDEConfigINIBackEnd
Class for KDE INI-style configuration file loading/saving.
Definition: tdeconfigbackend.h:192
KEntryKey
key structure holding both the actual key and the the group to which it belongs.
Definition: tdeconfigdata.h:70
KEntry
map/dict/list config node entry.
Definition: tdeconfigdata.h:33

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.