Diffstat (limited to 'noncore/games/kpacman/config.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/kpacman/config.h | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/noncore/games/kpacman/config.h b/noncore/games/kpacman/config.h deleted file mode 100644 index 3c26b5d..0000000 --- a/noncore/games/kpacman/config.h +++ b/dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qt Designer. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #ifndef CONFIG_H | ||
22 | #define CONFIG_H | ||
23 | |||
24 | // ##### could use QSettings with Qt 3.0 | ||
25 | |||
26 | #include <qmap.h> | ||
27 | #include <qstringlist.h> | ||
28 | |||
29 | class ConfigPrivate; | ||
30 | class Config | ||
31 | { | ||
32 | public: | ||
33 | typedef QMap< QString, QString > ConfigGroup; | ||
34 | |||
35 | enum Domain { File, User }; | ||
36 | Config( const QString &name, Domain domain=User ); | ||
37 | ~Config(); | ||
38 | |||
39 | bool isValid() const; | ||
40 | bool hasKey( const QString &key ) const; | ||
41 | |||
42 | void setGroup( const QString &gname ); | ||
43 | void writeEntry( const QString &key, const QString &value ); | ||
44 | void writeEntry( const QString &key, int num ); | ||
45 | #ifdef Q_HAS_BOOL_TYPE | ||
46 | void writeEntry( const QString &key, bool b ); | ||
47 | #endif | ||
48 | void writeEntry( const QString &key, const QStringList &lst, const QChar &sep ); | ||
49 | |||
50 | QString readEntry( const QString &key, const QString &deflt = QString::null ); | ||
51 | QString readEntryDirect( const QString &key, const QString &deflt = QString::null ); | ||
52 | int readNumEntry( const QString &key, int deflt = -1 ); | ||
53 | bool readBoolEntry( const QString &key, bool deflt = FALSE ); | ||
54 | QStringList readListEntry( const QString &key, const QChar &sep ); | ||
55 | |||
56 | void clearGroup(); | ||
57 | |||
58 | void write( const QString &fn = QString::null ); | ||
59 | |||
60 | protected: | ||
61 | void read(); | ||
62 | bool parse( const QString &line ); | ||
63 | |||
64 | QMap< QString, ConfigGroup > groups; | ||
65 | QMap< QString, ConfigGroup >::Iterator git; | ||
66 | QString filename; | ||
67 | QString lang; | ||
68 | QString glang; | ||
69 | bool changed; | ||
70 | ConfigPrivate *d; | ||
71 | static QString configFilename(const QString& name, Domain); | ||
72 | }; | ||
73 | |||
74 | #endif | ||