summaryrefslogtreecommitdiffstats
path: root/khotkeys/shared/settings.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /khotkeys/shared/settings.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khotkeys/shared/settings.h')
-rw-r--r--khotkeys/shared/settings.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/khotkeys/shared/settings.h b/khotkeys/shared/settings.h
new file mode 100644
index 000000000..cf05dcd31
--- /dev/null
+++ b/khotkeys/shared/settings.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+
+ KHotKeys
+
+ Copyright (C) 1999-2001 Lubos Lunak <l.lunak@kde.org>
+
+ Distributed under the terms of the GNU General Public License version 2.
+
+****************************************************************************/
+
+#ifndef _SETTINGS_H_
+#define _SETTINGS_H_
+
+#include "actions.h"
+#include <kshortcut.h>
+
+class KConfig;
+
+namespace KHotKeys
+{
+
+enum ImportType
+ {
+ ImportNone, // no import is done
+ ImportAsk, // if already imported before, ask (called from GUI)
+ ImportSilent // if already imported before, ignore (called from the update script)
+ };
+
+class KDE_EXPORT Settings
+ {
+ public:
+ Settings();
+ bool read_settings( bool include_disabled_P );
+ void write_settings();
+ bool import( KConfig& cfg_P, bool ask_P );
+ Action_data_group* actions;
+ bool gestures_disabled_globally;
+ int gesture_mouse_button;
+ int gesture_timeout;
+ bool daemon_disabled;
+ Windowdef_list* gestures_exclude;
+ KShortcut voice_shortcut;
+ protected:
+ bool read_settings( KConfig& cfg_P, bool include_disabled_P, ImportType import_P );
+ void read_settings_v1( KConfig& cfg_P );
+ void read_settings_v2( KConfig& cfg_P, bool include_disabled_P );
+ int write_actions_recursively_v2( KConfig& cfg_P, Action_data_group* parent_P, bool enabled_P );
+ void read_actions_recursively_v2( KConfig& cfg_P, Action_data_group* parent_P,
+ bool include_disabled_P );
+ private:
+ QStringList already_imported;
+ KHOTKEYS_DISABLE_COPY( Settings );
+ };
+
+//***************************************************************************
+// Inline
+//***************************************************************************
+
+} // namespace KHotKeys
+
+#endif