diff -r 000000000000 -r 54475d6f006a xml-vym.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml-vym.h Tue Oct 16 09:53:22 2007 +0000 @@ -0,0 +1,54 @@ +#ifndef XML_H +#define XML_H + +#include "xml-base.h" + + +/*! \brief Parsing VYM maps from XML documents */ + +class parseVYMHandler : public parseBaseHandler +{ +public: + bool startDocument(); + bool startElement ( const QString&, const QString&, + const QString& eName, const QXmlAttributes& atts ); + bool endElement ( const QString&, const QString&, const QString& ); + bool characters ( const QString&); + QString errorString(); + bool readBranchAttr (const QXmlAttributes&); + bool readFrameAttr (const QXmlAttributes&); + bool readOOAttr (const QXmlAttributes&); + bool readNoteAttr (const QXmlAttributes&); + bool readFloatImageAttr (const QXmlAttributes&); + bool readXLinkAttr (const QXmlAttributes&); + bool readHtmlAttr (const QXmlAttributes&); + bool readSettingAttr (const QXmlAttributes&); + +private: + enum State + { + StateInit, + StateMap, + StateMapSelect, + StateMapSetting, + StateMapCenter, + StateBranch, + StateBranchXLink, // + StateHtmlNote, + StateHtml, + StateFrame, + StateStandardFlag, + StateNote, + StateFloatImage, + StateHeading + }; + + + + State state; + State laststate; + QList stateStack; + QString htmldata; + NoteObj no; +}; +#endif