Diffstat (limited to 'pwmanager/pwmanager/configuration_31compat.h') (more/less context) (show whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/configuration_31compat.h | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/configuration_31compat.h b/pwmanager/pwmanager/configuration_31compat.h new file mode 100644 index 0000000..8ad6e09 --- a/dev/null +++ b/pwmanager/pwmanager/configuration_31compat.h | |||
@@ -0,0 +1,146 @@ | |||
1 | /*************************************************************************** | ||
2 | * * | ||
3 | * copyright (C) 2004 by Michael Buesch * | ||
4 | * email: mbuesch@freenet.de * | ||
5 | * * | ||
6 | * This program is free software; you can redistribute it and/or modify * | ||
7 | * it under the terms of the GNU General Public License version 2 * | ||
8 | * as published by the Free Software Foundation. * | ||
9 | * * | ||
10 | ***************************************************************************/ | ||
11 | |||
12 | /*************************************************************************** | ||
13 | * copyright (C) 2004 by Ulf Schenk | ||
14 | * This file is originaly based on version 1.0.1 of pwmanager | ||
15 | * and was modified to run on embedded devices that run microkde | ||
16 | * | ||
17 | * $Id$ | ||
18 | **************************************************************************/ | ||
19 | |||
20 | #ifndef CONFIGURATION_31COMPAT_H | ||
21 | #define CONFIGURATION_31COMPAT_H | ||
22 | |||
23 | #include "pwmexception.h" | ||
24 | |||
25 | #include <qsize.h> | ||
26 | #include <qfont.h> | ||
27 | #include <qstring.h> | ||
28 | |||
29 | #ifdef PWM_EMBEDDED | ||
30 | #include <configuration.h> | ||
31 | #endif | ||
32 | |||
33 | class KConfig; | ||
34 | |||
35 | /** This class is the compatibility layer for | ||
36 | * running the new KDE-3.2 Configuration interface on KDE-3.1. | ||
37 | * We have to keep this class in sync with the real configuration | ||
38 | * interface. | ||
39 | */ | ||
40 | class Configuration_31compat | ||
41 | { | ||
42 | public: | ||
43 | Configuration_31compat(); | ||
44 | ~Configuration_31compat(); | ||
45 | |||
46 | static Configuration_31compat * obj() | ||
47 | { | ||
48 | PWM_ASSERT(_obj); | ||
49 | return _obj; | ||
50 | } | ||
51 | static void init() | ||
52 | { | ||
53 | PWM_ASSERT(!_obj); | ||
54 | _obj = new Configuration_31compat; | ||
55 | } | ||
56 | static void cleanup() | ||
57 | { delete_ifnot_null(_obj); } | ||
58 | |||
59 | |||
60 | /** Read the configuration from the file. | ||
61 | * Normally this function has not to be called manually. | ||
62 | * | ||
63 | * This function is a NOP in KDE-3.1 compatibility layer. | ||
64 | */ | ||
65 | void readConfig() | ||
66 | { } | ||
67 | /** Write the configuration to the file. | ||
68 | * Normally this function has not to be called manually. | ||
69 | * | ||
70 | * This function is a NOP in KDE-3.1 compatibility layer. | ||
71 | */ | ||
72 | void writeConfig() | ||
73 | { } | ||
74 | /** reset the whole configuration to its defaults. | ||
75 | * | ||
76 | * This function is a NOP in KDE-3.1 compatibility layer. | ||
77 | * It should not be, but it is. :) | ||
78 | */ | ||
79 | void resetConfig() | ||
80 | { } | ||
81 | /** show the configuration window */ | ||
82 | bool showConfWnd(QWidget *parent); | ||
83 | |||
84 | public: | ||
85 | /* functions for reading the configuration settings */ | ||
86 | /* GLOBAL */ | ||
87 | QString confGlobAutoStart(); | ||
88 | QString confGlobBrowserCommand(); | ||
89 | QString confGlobXtermCommand(); | ||
90 | QFont confGlobEntryFont(); | ||
91 | int confGlobPwTimeout(); | ||
92 | int confGlobLockTimeout(); | ||
93 | int confGlobCompression(); | ||
94 | int confGlobFilePermissions(); | ||
95 | int confGlobMinimizeLock(); | ||
96 | bool confGlobUnlockOnOpen(); | ||
97 | bool confGlobTray(); | ||
98 | bool confGlobMakeFileBackup(); | ||
99 | bool confGlobAutostartDeepLocked(); | ||
100 | bool confGlobAutoDeepLock(); | ||
101 | bool confGlobKwalletEmu(); | ||
102 | bool confGlobNewEntrLockStat(); | ||
103 | /* WND */ | ||
104 | QSize confWndMainWndSize(); | ||
105 | int confWndMainViewStyle(); | ||
106 | bool confWndAutoMinimizeOnStart(); | ||
107 | bool confWndClose(); | ||
108 | |||
109 | public: | ||
110 | /* functions for writing the configuration settings */ | ||
111 | /* GLOBAL */ | ||
112 | void confGlobAutoStart(const QString &e); | ||
113 | void confGlobBrowserCommand(const QString &e); | ||
114 | void confGlobXtermCommand(const QString &e); | ||
115 | void confGlobEntryFont(const QFont &e); | ||
116 | void confGlobPwTimeout(int e); | ||
117 | void confGlobLockTimeout(int e); | ||
118 | void confGlobCompression(int e); | ||
119 | void confGlobFilePermissions(int e); | ||
120 | void confGlobMinimizeLock(int e); | ||
121 | void confGlobUnlockOnOpen(bool e); | ||
122 | void confGlobTray(bool e); | ||
123 | void confGlobMakeFileBackup(bool e); | ||
124 | void confGlobAutostartDeepLocked(bool e); | ||
125 | void confGlobAutoDeepLock(bool e); | ||
126 | void confGlobKwalletEmu(bool e); | ||
127 | void confGlobNewEntrLockStat(bool e); | ||
128 | /* WND */ | ||
129 | void confWndMainWndSize(const QSize &e); | ||
130 | void confWndMainViewStyle(int e); | ||
131 | void confWndAutoMinimizeOnStart(bool e); | ||
132 | void confWndClose(bool e); | ||
133 | |||
134 | protected: | ||
135 | /** static instance of this class returned by obj() */ | ||
136 | static Configuration_31compat *_obj; | ||
137 | /** configuration object */ | ||
138 | KConfig *conf; | ||
139 | }; | ||
140 | |||
141 | #ifdef Configuration | ||
142 | # error "Configuration already defined!" | ||
143 | #endif | ||
144 | #define ConfigurationConfiguration_31compat | ||
145 | |||
146 | #endif | ||