Diffstat (limited to 'noncore/applets/keyhelper/keyhelperapplet/config/MappingsHandler.h') (more/less context) (ignore 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 @@ +#ifndef _MAPPINGS_HANDLER_H_ +#define _MAPPINGS_HANDLER_H_ + +#include <qxml.h> +#include <qstring.h> +#include <qmap.h> +#include "KeyModifiers.h" +#include "KeyMappings.h" +#include "KeyNames.h" +#include "KHUtil.h" + +class MappingsHandler : 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; + + int m_code; + int m_mask; + int m_mapcode; + int m_unicode; + QMap<QString,QString> m_mapmodifiers; + QMap<QString,QString> m_mapunicodes; +}; + +#endif /* _MAPPINGS_HANDLER_H_ */ |