diff -r 000000000000 -r 84f76a3876d7 xml.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml.h Tue Jul 04 12:10:56 2006 +0000 @@ -0,0 +1,62 @@ +#ifndef XLM_H +#define XLM_H + + +#include +#include + +#include "mapcenterobj.h" +#include "mapeditor.h" + + +class mapBuilderHandler : public QXmlDefaultHandler +{ +public: + mapBuilderHandler(); + ~mapBuilderHandler(); + QString errorProtocol(); + bool startDocument(); + QString mapBuilderHandler::parseHREF(QString); + 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 fatalError( const QXmlParseException&); + void setMapEditor (MapEditor*); + void setTmpDir (QString); + void setLoadMode (const LoadMode &); + bool readBranchAttr (const QXmlAttributes&); + bool readNoteAttr (const QXmlAttributes&); + bool readFloatImageAttr (const QXmlAttributes&); + bool readHtmlAttr (const QXmlAttributes&); + bool readSettingAttr (const QXmlAttributes&); + +private: + QString errorProt; + enum State + { + StateInit, StateMap, StateMapSelect, + StateMapSetting, + StateMapCenter, StateMapCenterStandardFlag, + StateMapCenterHeading, StateMapCenterNote, + StateMapCenterFloatImage, + + StateBranch, StateBranchStandardFlag, + StateBranchHeading, StateBranchNote, + StateBranchFloatImage, + StateHtmlNote, StateHtml + }; + + + LoadMode loadMode; + bool isVymPart; + State state; + State laststate; + QString htmldata; + int branchDepth; + NoteObj no; + MapCenterObj* mc; + MapEditor* me; QString tmpDir; +}; +#endif