summaryrefslogtreecommitdiff
path: root/noncore/applets/keyhelper/keyhelperapplet/config/ModifiersHandler.h
Side-by-side diff
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 @@
+#ifndef _MODIFIERS_HANDLER_H_
+#define _MODIFIERS_HANDLER_H_
+
+#include <qstring.h>
+#include <qvaluelist.h>
+#include <qxml.h>
+#include "KeyModifiers.h"
+#include "KeyMappings.h"
+#include "KeyNames.h"
+#include "KHUtil.h"
+
+class ModifiersHandler : public QXmlDefaultHandler
+{
+public:
+ void dispose(QXmlReader* parser, QXmlContentHandler* parent);
+
+ void setKeyModifiers(KeyModifiers* mod)
+ {
+ m_pModifiers = mod;
+ }
+ void setKeyMappings(KeyMappings* map)
+ {
+ m_pMappings = map;
+ }
+
+ bool startElement(const QString& namespaceURI,
+ const QString& localName,
+ const QString& qName,
+ const QXmlAttributes& atts);
+ bool endElement(const QString& namespaceURI,
+ const QString& localName,
+ const QString& qName);
+private:
+ QXmlContentHandler* m_parent;
+ QXmlReader* m_parser;
+
+ KeyModifiers* m_pModifiers;
+ KeyMappings* m_pMappings;
+
+ QString m_type;
+ int m_code;
+ int m_mask;
+ QValueList<int> m_release;
+ bool m_mapping;
+ bool m_toggle;
+};
+
+#endif /* _MODIFIERS_HANDLER_H_ */