diff -r 000000000000 -r 7a96bd401351 xml.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml.h Sun Jan 30 12:58:47 2005 +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