Diffstat (limited to 'noncore/applets/keyhelper/keyhelperapplet/config/MappingsHandler.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/applets/keyhelper/keyhelperapplet/config/MappingsHandler.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/noncore/applets/keyhelper/keyhelperapplet/config/MappingsHandler.h b/noncore/applets/keyhelper/keyhelperapplet/config/MappingsHandler.h new file mode 100644 index 0000000..d899ea2 --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperapplet/config/MappingsHandler.h | |||
@@ -0,0 +1,48 @@ | |||
1 | #ifndef _MAPPINGS_HANDLER_H_ | ||
2 | #define _MAPPINGS_HANDLER_H_ | ||
3 | |||
4 | #include <qxml.h> | ||
5 | #include <qstring.h> | ||
6 | #include <qmap.h> | ||
7 | #include "KeyModifiers.h" | ||
8 | #include "KeyMappings.h" | ||
9 | #include "KeyNames.h" | ||
10 | #include "KHUtil.h" | ||
11 | |||
12 | class MappingsHandler : public QXmlDefaultHandler | ||
13 | { | ||
14 | public: | ||
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); | ||
33 | private: | ||
34 | QXmlContentHandler* m_parent; | ||
35 | QXmlReader* m_parser; | ||
36 | |||
37 | KeyModifiers* m_pModifiers; | ||
38 | KeyMappings* m_pMappings; | ||
39 | |||
40 | int m_code; | ||
41 | int m_mask; | ||
42 | int m_mapcode; | ||
43 | int m_unicode; | ||
44 | QMap<QString,QString> m_mapmodifiers; | ||
45 | QMap<QString,QString> m_mapunicodes; | ||
46 | }; | ||
47 | |||
48 | #endif /* _MAPPINGS_HANDLER_H_ */ | ||