author | alwin <alwin> | 2004-02-26 15:33:31 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-02-26 15:33:31 (UTC) |
commit | 42eb413737eb6e911867e1b9c0f5b6cf81c677fd (patch) (side-by-side diff) | |
tree | b32284f8cec0f584151f0826fd121c153fc07601 /noncore/apps/keyz-cfg/zkbxml.h | |
parent | d26a7814b7b454583a136a78aeb7016467ec9ff8 (diff) | |
download | opie-42eb413737eb6e911867e1b9c0f5b6cf81c677fd.zip opie-42eb413737eb6e911867e1b9c0f5b6cf81c677fd.tar.gz opie-42eb413737eb6e911867e1b9c0f5b6cf81c677fd.tar.bz2 |
Yeah - zkb fixed and working within OPIE.
Diffstat (limited to 'noncore/apps/keyz-cfg/zkbxml.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/keyz-cfg/zkbxml.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/noncore/apps/keyz-cfg/zkbxml.h b/noncore/apps/keyz-cfg/zkbxml.h new file mode 100644 index 0000000..2b15cbb --- a/dev/null +++ b/noncore/apps/keyz-cfg/zkbxml.h @@ -0,0 +1,68 @@ +#ifndef ZKBXML_H +#define ZKBXML_H + +#include <qxml.h> + +class ZkbXmlHandler : public QXmlDefaultHandler { +public: + ZkbXmlHandler(); + virtual ~ZkbXmlHandler(); + + virtual bool startElement(const QString&, const QString&, + const QString& name, const QXmlAttributes& attr); + + virtual bool endElement(const QString&, const QString&, + const QString& name); + + virtual QString errorString(); + +protected: + QString err; + QStringList elements; + + virtual bool startKeymapElement(int ardelay, int arperiod, + const QString& author); + virtual bool startIncludeElement(const QString& file, + const QString& prfix); + virtual bool startLabelElement(const QString& label, + const QString& state); + virtual bool startStateElement(const QString& name, + const QString& parent, bool dflt); + virtual bool startMapElement(int key, bool pressed); + virtual bool startEventElement(int keycode, int unicode, int modifiers, + bool pressed, bool autorepeat); + virtual bool startNextStateElement(const QString& state); + + virtual bool endKeymapElement(); + virtual bool endIncludeElement(); + virtual bool endLabelElement(); + virtual bool endStateElement(); + virtual bool endMapElement(); + virtual bool endEventElement(); + virtual bool endNextStateElement(); + + bool start_keymap(const QXmlAttributes&); + bool start_include(const QXmlAttributes&); + bool start_label(const QXmlAttributes&); + bool start_state(const QXmlAttributes&); + bool start_map(const QXmlAttributes&); + bool start_event(const QXmlAttributes&); + bool start_next_state(const QXmlAttributes&); + bool end_keymap(); + bool end_include(); + bool end_label(); + bool end_state(); + bool end_map(); + bool end_event(); + bool end_next_state(); + + void setError(const QString&); + int str2key(const QString&); + int str2modifier(const QString&); + bool str2bool(const QString&); + int str2unicode(const QString&); + int str2keycode(const QString&); + int str2uint(const QString&); +}; + +#endif |