summaryrefslogtreecommitdiff
path: root/noncore/applets/keyhelper/keyhelperapplet/extension/TaskSwitcher.h
blob: 7bbde559b860146503743551ca27b09e2f7a542a (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
#ifndef _TASK_SWITCHER_H_
#define _TASK_SWITCHER_H_

#include <qstring.h>
#include <qstringlist.h>
#include <qvaluelist.h>
#include <qwindowsystem_qws.h>

#include <qpe/global.h>

#include "ExtensionInterface.h"

class TaskSwitcher : public ExtensionInterface
{
public:
	TaskSwitcher(const QString& kind = "switch");
	virtual ~TaskSwitcher();

	virtual bool onKeyPress(int keycode);
	virtual bool onModRelease(int modcode);
	virtual int getKeycode()
	{
		return(m_keycode);
	}
	virtual int getKeymask()
	{
		return(m_keymask);
	}
	virtual const QValueList<int>& getModcodes()
	{
		return(m_modcodes);
	}
	virtual void setKeycode(int keycode)
	{
		m_keycode = keycode;
	}
	virtual void setKeymask(int keymask)
	{
		m_keymask = keymask;
	}
	virtual void setModcodes(const QValueList<int>& modcodes)
	{
		m_modcodes = modcodes;
	}
	virtual const QString& kind()
	{
		return(m_kind);
	}
private:
	int m_keycode;
	int m_keymask;
	QString m_kind;
	QValueList<int> m_modcodes;

	QStringList m_applist;
	QStringList::Iterator m_appit;

	void next();
};

#endif /* _TASK_SWITCHER_H_ */