xml.h
author insilmaril
Tue Mar 07 11:32:02 2006 +0000 (2006-03-07)
changeset 231 1fe2373efbc3
parent 166 325958acb69b
child 239 bdeb503d2b7f
permissions -rw-r--r--
Added xsl for Taskjuggler Export by Matt
insilmaril@0
     1
#ifndef XLM_H
insilmaril@0
     2
#define XLM_H
insilmaril@0
     3
insilmaril@0
     4
insilmaril@0
     5
#include <qstring.h>
insilmaril@0
     6
#include <qxml.h>
insilmaril@0
     7
insilmaril@169
     8
#include "file.h"
insilmaril@0
     9
#include "mapcenterobj.h"
insilmaril@0
    10
#include "mapeditor.h"
insilmaril@0
    11
insilmaril@0
    12
insilmaril@0
    13
class mapBuilderHandler  : public QXmlDefaultHandler
insilmaril@0
    14
{
insilmaril@0
    15
public:
insilmaril@0
    16
	mapBuilderHandler();
insilmaril@0
    17
	~mapBuilderHandler();
insilmaril@0
    18
	QString errorProtocol();
insilmaril@0
    19
	bool startDocument();
insilmaril@166
    20
	QString parseHREF(QString);
insilmaril@0
    21
	bool startElement ( const QString&, const QString&,
insilmaril@0
    22
                        const QString& eName, const QXmlAttributes& atts ); 
insilmaril@0
    23
	bool   endElement ( const QString&, const QString&, const QString& ); 
insilmaril@0
    24
	bool characters   ( const QString&);
insilmaril@0
    25
	QString errorString();
insilmaril@0
    26
	bool fatalError( const QXmlParseException&);
insilmaril@0
    27
	void setMapEditor (MapEditor*);
insilmaril@0
    28
	void setTmpDir (QString);
insilmaril@0
    29
	void setLoadMode (const LoadMode &);
insilmaril@0
    30
	bool readBranchAttr (const QXmlAttributes&);
insilmaril@160
    31
	bool readLinkAttr (const QXmlAttributes&);
insilmaril@0
    32
	bool readNoteAttr (const QXmlAttributes&);
insilmaril@0
    33
	bool readFloatImageAttr (const QXmlAttributes&);
insilmaril@95
    34
	bool readXLinkAttr (const QXmlAttributes&);
insilmaril@0
    35
	bool readHtmlAttr (const QXmlAttributes&);
insilmaril@0
    36
	bool readSettingAttr (const QXmlAttributes&);
insilmaril@0
    37
insilmaril@0
    38
private:
insilmaril@0
    39
	QString     errorProt;
insilmaril@0
    40
	enum State 
insilmaril@0
    41
	{ 
insilmaril@0
    42
		StateInit, StateMap, StateMapSelect, 
insilmaril@0
    43
		StateMapSetting,
insilmaril@166
    44
		StateFloatImage,
insilmaril@0
    45
		StateMapCenter, StateMapCenterStandardFlag,
insilmaril@0
    46
		StateMapCenterHeading, StateMapCenterNote, 
insilmaril@0
    47
		StateMapCenterFloatImage,
insilmaril@0
    48
		
insilmaril@0
    49
		StateBranch, StateBranchStandardFlag,
insilmaril@0
    50
		StateBranchHeading, StateBranchNote, 
insilmaril@95
    51
		StateBranchFloatImage, StateBranchXLink,
insilmaril@0
    52
		StateHtmlNote, StateHtml 
insilmaril@0
    53
	 };
insilmaril@0
    54
				 
insilmaril@0
    55
insilmaril@0
    56
	LoadMode loadMode;
insilmaril@0
    57
	bool isVymPart;
insilmaril@0
    58
	State state;			 
insilmaril@0
    59
	State laststate;
insilmaril@0
    60
	QString htmldata;
insilmaril@0
    61
	int branchDepth; 
insilmaril@0
    62
	NoteObj no;
insilmaril@0
    63
	MapCenterObj* mc;
insilmaril@0
    64
	MapEditor* me; QString tmpDir; 
insilmaril@0
    65
}; 
insilmaril@0
    66
#endif