summaryrefslogtreecommitdiffstats
path: root/tdeui/kactionshortcutlist.h
blob: ac8ac020db5d54afc7d3d6e4d861cae72145ae5d (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
#ifndef _KACTIONSHORTCUTLIST_H
#define _KACTIONSHORTCUTLIST_H

#include <kshortcutlist.h>
#include <kaction.h>

//---------------------------------------------------------------------
// class TDEActionShortcutList
//---------------------------------------------------------------------

class TDEAccelShortcutListPrivate;
class TDEUI_EXPORT TDEActionShortcutList : public TDEShortcutList
{
 public:
	TDEActionShortcutList( TDEActionCollection* );
	virtual ~TDEActionShortcutList();

	virtual uint count() const;
	virtual TQString name( uint index ) const;
	virtual TQString label( uint index ) const;
	virtual TQString whatsThis( uint index ) const;
	virtual const TDEShortcut& shortcut( uint index ) const;
	virtual const TDEShortcut& shortcutDefault( uint index ) const;
	virtual bool isConfigurable( uint index ) const;
	virtual bool setShortcut( uint index, const TDEShortcut& shortcut );

	virtual const TDEInstance* instance() const;

	virtual TQVariant getOther( Other, uint index ) const;
	virtual bool setOther( Other, uint index, TQVariant );

	virtual bool save() const;

	const TDEAction *action( uint ) const;

 protected:
	TDEActionCollection& m_actions;

 protected:
        virtual void virtual_hook( int id, void* data );
 private:
	TDEAccelShortcutListPrivate* d;
};

//---------------------------------------------------------------------
// class TDEActionPtrShortcutList
//---------------------------------------------------------------------

class TDEAccelShortcutListPrivate;
class TDEUI_EXPORT TDEActionPtrShortcutList : public TDEShortcutList
{
 public:
	TDEActionPtrShortcutList( TDEActionPtrList& );
	virtual ~TDEActionPtrShortcutList();

	virtual uint count() const;
	virtual TQString name( uint index ) const;
	virtual TQString label( uint index ) const;
	virtual TQString whatsThis( uint index ) const;
	virtual const TDEShortcut& shortcut( uint index ) const;
	virtual const TDEShortcut& shortcutDefault( uint index ) const;
	virtual bool isConfigurable( uint index ) const;
	virtual bool setShortcut( uint index, const TDEShortcut& shortcut);

	virtual TQVariant getOther( Other, uint index ) const;
	virtual bool setOther( Other, uint index, TQVariant );

	virtual bool save() const;

 protected:
	TDEActionPtrList& m_actions;

 protected:
       virtual void virtual_hook( int id, void* data );
 private:
	TDEAccelShortcutListPrivate* d;
};

#endif // !_KACTIONSHORTCUTLIST_H