blob: 753d056c34bbb5026b22dae88335a932527430d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/****************************************************************************
KHotKeys
Copyright (C) 1999-2001 Lubos Lunak <[email protected]>
Distributed under the terms of the GNU General Public License version 2.
****************************************************************************/
#ifndef _SETTINGS_H_
#define _SETTINGS_H_
#include "actions.h"
#include <tdeshortcut.h>
class TDEConfig;
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 TDE_EXPORT Settings
{
public:
Settings();
bool read_settings( bool include_disabled_P );
void write_settings();
bool import( TDEConfig& 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;
TDEShortcut voice_shortcut;
protected:
bool read_settings( TDEConfig& cfg_P, bool include_disabled_P, ImportType import_P );
void read_settings_v1( TDEConfig& cfg_P );
void read_settings_v2( TDEConfig& cfg_P, bool include_disabled_P );
int write_actions_recursively_v2( TDEConfig& cfg_P, Action_data_group* parent_P, bool enabled_P );
void read_actions_recursively_v2( TDEConfig& cfg_P, Action_data_group* parent_P,
bool include_disabled_P );
private:
TQStringList already_imported;
KHOTKEYS_DISABLE_COPY( Settings );
};
//***************************************************************************
// Inline
//***************************************************************************
} // namespace KHotKeys
#endif
|