author | insilmaril |
Mon Jul 30 09:47:11 2007 +0000 (2007-07-30) | |
changeset 572 | a97aabc21136 |
child 575 | 4b935d7e1671 |
permissions | -rw-r--r-- |
1 #ifndef XML_FREEMIND_H
2 #define XML_FREEMIND_H
5 #include <QString>
6 #include <QXmlAttributes>
8 #include "file.h"
9 #include "mapcenterobj.h"
10 #include "mapeditor.h"
13 class parseFMHandler : public QXmlDefaultHandler
14 {
15 public:
16 parseFMHandler();
17 ~parseFMHandler();
18 QString errorProtocol();
19 bool startDocument();
20 QString parseHREF(QString);
21 bool startElement ( const QString&, const QString&,
22 const QString& eName, const QXmlAttributes& atts );
23 bool endElement ( const QString&, const QString&, const QString& );
24 bool characters ( const QString&);
25 QString errorString();
26 bool fatalError( const QXmlParseException&);
27 void setMapEditor (MapEditor*);
28 void setTmpDir (QString);
29 void setInputFile (QString);
30 void setLoadMode (const LoadMode &);
31 bool readNodeAttr (const QXmlAttributes&);
33 private:
34 QString errorProt;
35 enum State
36 {
37 StateInit,
38 StateMap,
39 StateNode,
40 StateCloud,
41 StateEdge,
42 StateIcon,
43 StateFont,
44 StateArrowLink,
45 StateHook,
46 StateText
47 };
50 LoadMode loadMode;
51 bool isVymPart;
52 State state;
53 State laststate;
54 QList <State> stateStack;
55 QString htmldata;
56 int branchDepth;
57 NoteObj no;
58 MapCenterObj* mc;
59 MapEditor* me;
60 QString tmpDir;
61 QString inputFile;
62 };
63 #endif