diff -r 000000000000 -r bc9083a4a7fb xml-freemind.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml-freemind.h Mon Jul 30 09:47:09 2007 +0000 @@ -0,0 +1,63 @@ +#ifndef XML_FREEMIND_H +#define XML_FREEMIND_H + + +#include +#include + +#include "file.h" +#include "mapcenterobj.h" +#include "mapeditor.h" + + +class parseFMHandler : public QXmlDefaultHandler +{ +public: + parseFMHandler(); + ~parseFMHandler(); + QString errorProtocol(); + bool startDocument(); + QString 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 setInputFile (QString); + void setLoadMode (const LoadMode &); + bool readNodeAttr (const QXmlAttributes&); + +private: + QString errorProt; + enum State + { + StateInit, + StateMap, + StateNode, + StateCloud, + StateEdge, + StateIcon, + StateFont, + StateArrowLink, + StateHook, + StateText + }; + + + LoadMode loadMode; + bool isVymPart; + State state; + State laststate; + QList stateStack; + QString htmldata; + int branchDepth; + NoteObj no; + MapCenterObj* mc; + MapEditor* me; + QString tmpDir; + QString inputFile; +}; +#endif