File: xml.h

package info (click to toggle)
vym 1.8.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,000 kB
  • ctags: 1,599
  • sloc: cpp: 14,723; sh: 373; xml: 277; perl: 89; makefile: 16
file content (69 lines) | stat: -rw-r--r-- 1,705 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef XLM_H
#define XLM_H


#include <qstring.h>
#include <qxml.h>

#include "file.h"
#include "mapcenterobj.h"
#include "mapeditor.h"


class mapBuilderHandler  : public QXmlDefaultHandler
{
public:
	mapBuilderHandler();
	~mapBuilderHandler();
	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 readBranchAttr (const QXmlAttributes&);
	bool readOOAttr (const QXmlAttributes&);
	bool readNoteAttr (const QXmlAttributes&);
	bool readFloatImageAttr (const QXmlAttributes&);
	bool readXLinkAttr (const QXmlAttributes&);
	bool readHtmlAttr (const QXmlAttributes&);
	bool readSettingAttr (const QXmlAttributes&);

private:
	QString     errorProt;
	enum State 
	{ 
		StateInit, StateMap, StateMapSelect, 
		StateMapSetting,
		StateFloatImage,
		StateMapCenter, StateMapCenterStandardFlag,
		StateMapCenterHeading, StateMapCenterNote, 
		StateMapCenterFloatImage,
		
		StateBranch, StateBranchStandardFlag,
		StateBranchHeading, StateBranchNote, 
		StateBranchFloatImage, StateBranchXLink,
		StateHtmlNote, StateHtml 
	 };
				 

	LoadMode loadMode;
	bool isVymPart;
	State state;			 
	State laststate;
	QString htmldata;
	int branchDepth; 
	NoteObj no;
	MapCenterObj* mc;
	MapEditor* me; 
	QString tmpDir; 
	QString inputFile;
}; 
#endif