xml-freemind.h
changeset 566 ebebedffba50
child 575 4b935d7e1671
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xml-freemind.h	Mon Jul 23 12:42:02 2007 +0000
     1.3 @@ -0,0 +1,63 @@
     1.4 +#ifndef XML_FREEMIND_H
     1.5 +#define XML_FREEMIND_H
     1.6 +
     1.7 +
     1.8 +#include <QString>
     1.9 +#include <QXmlAttributes>
    1.10 +
    1.11 +#include "file.h"
    1.12 +#include "mapcenterobj.h"
    1.13 +#include "mapeditor.h"
    1.14 +
    1.15 +
    1.16 +class parseFMHandler  : public QXmlDefaultHandler
    1.17 +{
    1.18 +public:
    1.19 +	parseFMHandler();
    1.20 +	~parseFMHandler();
    1.21 +	QString errorProtocol();
    1.22 +	bool startDocument();
    1.23 +	QString parseHREF(QString);
    1.24 +	bool startElement ( const QString&, const QString&,
    1.25 +                        const QString& eName, const QXmlAttributes& atts ); 
    1.26 +	bool   endElement ( const QString&, const QString&, const QString& ); 
    1.27 +	bool characters   ( const QString&);
    1.28 +	QString errorString();
    1.29 +	bool fatalError( const QXmlParseException&);
    1.30 +	void setMapEditor (MapEditor*);
    1.31 +	void setTmpDir (QString);
    1.32 +	void setInputFile (QString);
    1.33 +	void setLoadMode (const LoadMode &);
    1.34 +	bool readNodeAttr (const QXmlAttributes&);
    1.35 +
    1.36 +private:
    1.37 +	QString     errorProt;
    1.38 +	enum State 
    1.39 +	{ 
    1.40 +		StateInit, 
    1.41 +		StateMap, 
    1.42 +		StateNode, 
    1.43 +		StateCloud,
    1.44 +		StateEdge, 
    1.45 +		StateIcon, 
    1.46 +		StateFont,
    1.47 +		StateArrowLink,
    1.48 +		StateHook,
    1.49 +		StateText
    1.50 +	 };
    1.51 +				 
    1.52 +
    1.53 +	LoadMode loadMode;
    1.54 +	bool isVymPart;
    1.55 +	State state;			 
    1.56 +	State laststate;
    1.57 +	QList <State> stateStack;
    1.58 +	QString htmldata;
    1.59 +	int branchDepth; 
    1.60 +	NoteObj no;
    1.61 +	MapCenterObj* mc;
    1.62 +	MapEditor* me; 
    1.63 +	QString tmpDir; 
    1.64 +	QString inputFile;
    1.65 +}; 
    1.66 +#endif