1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/xml-vym.h Wed Jan 16 15:45:19 2008 +0000
1.3 @@ -0,0 +1,54 @@
1.4 +#ifndef XML_H
1.5 +#define XML_H
1.6 +
1.7 +#include "xml-base.h"
1.8 +
1.9 +
1.10 +/*! \brief Parsing VYM maps from XML documents */
1.11 +
1.12 +class parseVYMHandler : public parseBaseHandler
1.13 +{
1.14 +public:
1.15 + bool startDocument();
1.16 + bool startElement ( const QString&, const QString&,
1.17 + const QString& eName, const QXmlAttributes& atts );
1.18 + bool endElement ( const QString&, const QString&, const QString& );
1.19 + bool characters ( const QString&);
1.20 + QString errorString();
1.21 + bool readBranchAttr (const QXmlAttributes&);
1.22 + bool readFrameAttr (const QXmlAttributes&);
1.23 + bool readOOAttr (const QXmlAttributes&);
1.24 + bool readNoteAttr (const QXmlAttributes&);
1.25 + bool readFloatImageAttr (const QXmlAttributes&);
1.26 + bool readXLinkAttr (const QXmlAttributes&);
1.27 + bool readHtmlAttr (const QXmlAttributes&);
1.28 + bool readSettingAttr (const QXmlAttributes&);
1.29 +
1.30 +private:
1.31 + enum State
1.32 + {
1.33 + StateInit,
1.34 + StateMap,
1.35 + StateMapSelect,
1.36 + StateMapSetting,
1.37 + StateMapCenter,
1.38 + StateBranch,
1.39 + StateBranchXLink, //
1.40 + StateHtmlNote,
1.41 + StateHtml,
1.42 + StateFrame,
1.43 + StateStandardFlag,
1.44 + StateNote,
1.45 + StateFloatImage,
1.46 + StateHeading
1.47 + };
1.48 +
1.49 +
1.50 +
1.51 + State state;
1.52 + State laststate;
1.53 + QList <State> stateStack;
1.54 + QString htmldata;
1.55 + NoteObj no;
1.56 +};
1.57 +#endif