-rwxr-xr-x | noncore/apps/zsafe/qsettings.h | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/noncore/apps/zsafe/qsettings.h b/noncore/apps/zsafe/qsettings.h index b11b533..95e87b5 100755 --- a/noncore/apps/zsafe/qsettings.h +++ b/noncore/apps/zsafe/qsettings.h | |||
@@ -1,56 +1,56 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id$ | 2 | ** $Id$ |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef _QSETTINGS_H_ | 5 | #ifndef _QSETTINGS_H_ |
6 | #define _QSETTINGS_H_ | 6 | #define _QSETTINGS_H_ |
7 | 7 | ||
8 | #include <qstring.h> | 8 | #include <qstring.h> |
9 | #include <qstringlist.h> | 9 | #include <qstringlist.h> |
10 | #include <qasciidict.h> | 10 | #include <qasciidict.h> |
11 | 11 | ||
12 | // class to hold one category item | 12 | // class to hold one category item |
13 | 13 | ||
14 | class QSettings | 14 | class QSettings |
15 | { | 15 | { |
16 | public: | 16 | public: |
17 | enum Format { | 17 | enum Format { |
18 | Native = 0, | 18 | Native = 0, |
19 | Ini | 19 | Ini |
20 | }; | 20 | }; |
21 | enum System { | 21 | enum System { |
22 | Unix = 0, | 22 | Unix = 0, |
23 | Windows, | 23 | Windows, |
24 | Mac | 24 | Mac |
25 | }; | 25 | }; |
26 | enum Scope { | 26 | enum Scope { |
27 | User, | 27 | User, |
28 | Global | 28 | Global |
29 | }; | 29 | }; |
30 | 30 | ||
31 | QSettings(const QString &); | 31 | QSettings(const QString &file=0); |
32 | ~QSettings(); | 32 | ~QSettings(); |
33 | 33 | ||
34 | void insertSearchPath (System, const QString &); | 34 | void insertSearchPath (System, const QString &); |
35 | 35 | ||
36 | QString readEntry (const QString &, const QString &def = QString::null); | 36 | QString readEntry (const QString &, const QString &def = QString::null); |
37 | int readNumEntry (const QString &, int def = 0); | 37 | int readNumEntry (const QString &, int def = 0); |
38 | bool readBoolEntry (const QString &, bool def = 0); | 38 | bool readBoolEntry (const QString &, bool def = 0); |
39 | 39 | ||
40 | bool writeEntry (const QString &, int); | 40 | bool writeEntry (const QString &, int); |
41 | bool writeEntry (const QString &, bool); | 41 | bool writeEntry (const QString &, bool); |
42 | bool writeEntry (const QString &, const QString &); | 42 | bool writeEntry (const QString &, const QString &); |
43 | bool writeEntry (const QString &, const char *); | 43 | bool writeEntry (const QString &, const char *); |
44 | 44 | ||
45 | bool removeEntry (const QString &); | 45 | bool removeEntry (const QString &); |
46 | 46 | ||
47 | QStringList entryList (const QString &) const; | 47 | QStringList entryList (const QString &) const; |
48 | 48 | ||
49 | protected: | 49 | protected: |
50 | 50 | ||
51 | private: | 51 | private: |
52 | QAsciiDict <QString> prefs; // key, value dictonary | 52 | QAsciiDict <QString> prefs; // key, value dictonary |
53 | QString fn; // preference filename | 53 | QString fn; // preference filename |
54 | 54 | ||
55 | }; | 55 | }; |
56 | #endif // _QSETTINGS_H_ | 56 | #endif // _QSETTINGS_H_ |