00001 #ifndef _REPEATER_HANDLER_H_ 00002 #define _REPEATER_HANDLER_H_ 00003 00004 #include <qstring.h> 00005 #include <qvaluelist.h> 00006 #include <qxml.h> 00007 #include "KeyRepeater.h" 00008 #include "KeyNames.h" 00009 #include "KHUtil.h" 00010 00011 class RepeaterHandler : public QXmlDefaultHandler 00012 { 00013 public: 00014 void dispose(QXmlReader* parser, QXmlContentHandler* parent); 00015 00016 void setKeyRepeater(KeyRepeater* rep) 00017 { 00018 m_pRepeater = rep; 00019 } 00020 00021 bool startElement(const QString& namespaceURI, 00022 const QString& localName, 00023 const QString& qName, 00024 const QXmlAttributes& atts); 00025 bool endElement(const QString& namespaceURI, 00026 const QString& localName, 00027 const QString& qName); 00028 private: 00029 QXmlContentHandler* m_parent; 00030 QXmlReader* m_parser; 00031 00032 KeyRepeater* m_pRepeater; 00033 00034 int m_code; 00035 bool m_enable; 00036 00037 }; 00038 00039 #endif /* _REPEATER_HANDLER_H_ */
1.4.2