summaryrefslogtreecommitdiffstats
path: root/kcontrol/keys/keyconfig.h
blob: 4da3f16b244025df93858c30f51d4bad2e671336 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//
// KDE Shortcut config module
//
// Copyright (c)  Mark Donohoe 1998
// Copyright (c)  Matthias Ettrich 1998
// Converted to generic key configuration module, Duncan Haldane 1998.

#ifndef __KEYCONFIG_H__
#define __KEYCONFIG_H__

#include <tqpushbutton.h>
#include <tqlistbox.h>

#include <tdeaccel.h>
#include <kkeydialog.h>
//#include <tdecmodule.h>
#include <tqdict.h>

class TQCheckBox;

class KeyChooserSpec;

class KKeyModule : public TQWidget
{
	TQ_OBJECT
public:
	TDEAccelActions actions;
        //TDEAccelActions dict;
        KeyChooserSpec *kc;

	KKeyModule( TQWidget *parent, bool isGlobal, bool bSeriesOnly, bool bSeriesNone, const char *name = 0 );
	KKeyModule( TQWidget *parent, bool isGlobal, const char *name = 0 );
	~KKeyModule ();

protected:
	void init( bool isGlobal, bool bSeriesOnly, bool bSeriesNone );

public:
        virtual void load();
        //virtual void save();
        virtual void defaults();
        static void init();

	bool writeSettings( const TQString& sGroup, TDEConfig* pConfig );
	bool writeSettingsGlobal( const TQString& sGroup );

public slots:
	//void slotPreviewScheme( int );
	//void slotAdd();
	//void slotSave();
	//void slotRemove();
	void slotKeyChange();
	void slotPreferMeta();
        //void updateKeys( const TDEAccelActions* map_P );
	//void readSchemeNames();

signals:
	void keyChange();
        //void keysChanged( const TDEAccelActions* map_P );

protected:
	TQListBox *sList;
	TQStringList *sFileList;
	TQPushButton *addBt;
	TQPushButton *removeBt;
	TQCheckBox *preferMetaBt;
	int nSysSchemes;
	bool bSeriesOnly;

	void readScheme( int index=0 );

	TQString KeyType;
	TQString KeyScheme;
	TQString KeySet;

};

class KeyChooserSpec : public KKeyChooser
{
        TQ_OBJECT
public:
        KeyChooserSpec( TDEAccelActions& actions, TQWidget* parent,
                 bool bGlobal );
        //void updateKeys( const TDEAccelActions* map_P );
protected:
        bool m_bGlobal;
};

#endif