Diffstat (limited to 'qmake/include/private/qsettings_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qmake/include/private/qsettings_p.h | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/qmake/include/private/qsettings_p.h b/qmake/include/private/qsettings_p.h new file mode 100644 index 0000000..18d118b --- a/dev/null +++ b/qmake/include/private/qsettings_p.h | |||
@@ -0,0 +1,133 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QSettings related classes | ||
5 | ** | ||
6 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
11 | ** licenses for Windows may use this file in accordance with the Qt Commercial | ||
12 | ** License Agreement provided with the Software. | ||
13 | ** | ||
14 | ** This file is not available for use under any other license without | ||
15 | ** express written permission from the copyright holder. | ||
16 | ** | ||
17 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
18 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
19 | ** | ||
20 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
21 | ** information about Qt Commercial License Agreements. | ||
22 | ** | ||
23 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
24 | ** not clear to you. | ||
25 | ** | ||
26 | **********************************************************************/ | ||
27 | |||
28 | #ifndef QSETTINGS_P_H | ||
29 | #define QSETTINGS_P_H | ||
30 | |||
31 | // | ||
32 | // W A R N I N G | ||
33 | // ------------- | ||
34 | // | ||
35 | // This file is not part of the Qt API. It exists for the convenience | ||
36 | // of QSettings. This header file may change from version to | ||
37 | // version without notice, or even be removed. | ||
38 | // | ||
39 | // We mean it. | ||
40 | // | ||
41 | // | ||
42 | |||
43 | #ifndef QT_H | ||
44 | #include "qstringlist.h" | ||
45 | #include "qmap.h" | ||
46 | #include "qvaluestack.h" | ||
47 | #endif // QT_H | ||
48 | |||
49 | class QSettingsSysPrivate; | ||
50 | |||
51 | // QSettingsGroup is a map of key/value pairs | ||
52 | class QSettingsGroup : public QMap<QString,QString> | ||
53 | { | ||
54 | public: | ||
55 | QSettingsGroup(); | ||
56 | |||
57 | bool modified; | ||
58 | }; | ||
59 | |||
60 | // QSettingsHeading is a map of heading/group pairs | ||
61 | class QSettingsHeading : public QMap<QString,QSettingsGroup> | ||
62 | { | ||
63 | public: | ||
64 | QSettingsHeading::Iterator git; | ||
65 | void read(const QString &); | ||
66 | void parseLine(QTextStream &); | ||
67 | }; | ||
68 | |||
69 | |||
70 | class QSettingsPrivate | ||
71 | { | ||
72 | public: | ||
73 | QSettingsPrivate( QSettings::Format format ); | ||
74 | ~QSettingsPrivate(); | ||
75 | |||
76 | QSettingsGroup readGroup(); | ||
77 | void removeGroup(const QString &); | ||
78 | void writeGroup(const QString &, const QString &); | ||
79 | QDateTime modificationTime(); | ||
80 | |||
81 | QStringList searchPaths; | ||
82 | QMap<QString,QSettingsHeading> headings; | ||
83 | QString group; | ||
84 | QString heading; | ||
85 | |||
86 | /*### static data brings threading trouble | ||
87 | static QString *defProduct; | ||
88 | static QString *defDomain; | ||
89 | */ | ||
90 | QValueStack<QString> groupStack; | ||
91 | QString groupPrefix; | ||
92 | |||
93 | bool groupDirty :1; | ||
94 | bool modified :1; | ||
95 | bool globalScope :1; | ||
96 | |||
97 | #if defined(Q_WS_WIN) || defined(Q_OS_MAC) | ||
98 | // system dependent implementations to use the | ||
99 | // system specific setting database (ie. registry on Windows) | ||
100 | |||
101 | QSettingsSysPrivate *sysd; | ||
102 | voidsysInit(); | ||
103 | voidsysClear(); | ||
104 | |||
105 | #if !defined(Q_NO_BOOL_TYPE) | ||
106 | boolsysWriteEntry( const QString &, bool ); | ||
107 | #endif | ||
108 | boolsysWriteEntry( const QString &, double ); | ||
109 | boolsysWriteEntry( const QString &, int ); | ||
110 | boolsysWriteEntry( const QString &, const QString & ); | ||
111 | boolsysWriteEntry( const QString &, const QStringList & ); | ||
112 | boolsysWriteEntry( const QString &, const QStringList &, const QChar& sep ); | ||
113 | |||
114 | QStringList sysEntryList(const QString &) const; | ||
115 | QStringList sysSubkeyList(const QString &) const; | ||
116 | |||
117 | QStringList sysReadListEntry( const QString &, bool * = 0 ) const; | ||
118 | QStringList sysReadListEntry( const QString &, const QChar& sep, bool * = 0 ) const; | ||
119 | QStringsysReadEntry( const QString &, const QString &def = QString::null, bool * = 0 ) const; | ||
120 | int sysReadNumEntry( const QString &, int def = 0, bool * = 0 ) const; | ||
121 | doublesysReadDoubleEntry( const QString &, double def = 0, bool * = 0 ) const; | ||
122 | boolsysReadBoolEntry( const QString &, bool def = 0, bool * = 0 ) const; | ||
123 | |||
124 | boolsysRemoveEntry( const QString & ); | ||
125 | |||
126 | boolsysSync(); | ||
127 | |||
128 | voidsysInsertSearchPath( QSettings::System, const QString & ); | ||
129 | voidsysRemoveSearchPath( QSettings::System, const QString & ); | ||
130 | #endif | ||
131 | }; | ||
132 | |||
133 | #endif // QSETTINGS_P_H | ||