summaryrefslogtreecommitdiff
path: root/noncore/applets/keyhelper/keyhelperapplet/config/ModifiersHandler.h
Unidiff
Diffstat (limited to 'noncore/applets/keyhelper/keyhelperapplet/config/ModifiersHandler.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/keyhelper/keyhelperapplet/config/ModifiersHandler.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/noncore/applets/keyhelper/keyhelperapplet/config/ModifiersHandler.h b/noncore/applets/keyhelper/keyhelperapplet/config/ModifiersHandler.h
new file mode 100644
index 0000000..e2d8785
--- a/dev/null
+++ b/noncore/applets/keyhelper/keyhelperapplet/config/ModifiersHandler.h
@@ -0,0 +1,48 @@
1#ifndef _MODIFIERS_HANDLER_H_
2#define _MODIFIERS_HANDLER_H_
3
4#include <qstring.h>
5#include <qvaluelist.h>
6#include <qxml.h>
7#include "KeyModifiers.h"
8#include "KeyMappings.h"
9#include "KeyNames.h"
10#include "KHUtil.h"
11
12class ModifiersHandler : public QXmlDefaultHandler
13{
14public:
15 void dispose(QXmlReader* parser, QXmlContentHandler* parent);
16
17 void setKeyModifiers(KeyModifiers* mod)
18 {
19 m_pModifiers = mod;
20 }
21 void setKeyMappings(KeyMappings* map)
22 {
23 m_pMappings = map;
24 }
25
26 bool startElement(const QString& namespaceURI,
27 const QString& localName,
28 const QString& qName,
29 const QXmlAttributes& atts);
30 bool endElement(const QString& namespaceURI,
31 const QString& localName,
32 const QString& qName);
33private:
34 QXmlContentHandler* m_parent;
35 QXmlReader* m_parser;
36
37 KeyModifiers* m_pModifiers;
38 KeyMappings* m_pMappings;
39
40 QString m_type;
41 int m_code;
42 int m_mask;
43 QValueList<int> m_release;
44 bool m_mapping;
45 bool m_toggle;
46};
47
48#endif /* _MODIFIERS_HANDLER_H_ */