xml.h
author jhilmer
Tue Aug 16 17:27:34 2005 +0000 (2005-08-16)
changeset 153 47cd4ae30000
parent 0 7a96bd401351
child 160 72cc3873306a
permissions -rw-r--r--
Fixed link handling in aboutdialog
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@0
     8
#include "mapcenterobj.h"
insilmaril@0
     9
#include "mapeditor.h"
insilmaril@0
    10
insilmaril@0
    11
insilmaril@0
    12
class mapBuilderHandler  : public QXmlDefaultHandler
insilmaril@0
    13
{
insilmaril@0
    14
public:
insilmaril@0
    15
	mapBuilderHandler();
insilmaril@0
    16
	~mapBuilderHandler();
insilmaril@0
    17
	QString errorProtocol();
insilmaril@0
    18
	bool startDocument();
insilmaril@0
    19
	QString mapBuilderHandler::parseHREF(QString);
insilmaril@0
    20
	bool startElement ( const QString&, const QString&,
insilmaril@0
    21
                        const QString& eName, const QXmlAttributes& atts ); 
insilmaril@0
    22
	bool   endElement ( const QString&, const QString&, const QString& ); 
insilmaril@0
    23
	bool characters   ( const QString&);
insilmaril@0
    24
	QString errorString();
insilmaril@0
    25
	bool fatalError( const QXmlParseException&);
insilmaril@0
    26
	void setMapEditor (MapEditor*);
insilmaril@0
    27
	void setTmpDir (QString);
insilmaril@0
    28
	void setLoadMode (const LoadMode &);
insilmaril@0
    29
	bool readBranchAttr (const QXmlAttributes&);
insilmaril@0
    30
	bool readNoteAttr (const QXmlAttributes&);
insilmaril@0
    31
	bool readFloatImageAttr (const QXmlAttributes&);
insilmaril@95
    32
	bool readXLinkAttr (const QXmlAttributes&);
insilmaril@0
    33
	bool readHtmlAttr (const QXmlAttributes&);
insilmaril@0
    34
	bool readSettingAttr (const QXmlAttributes&);
insilmaril@0
    35
insilmaril@0
    36
private:
insilmaril@0
    37
	QString     errorProt;
insilmaril@0
    38
	enum State 
insilmaril@0
    39
	{ 
insilmaril@0
    40
		StateInit, StateMap, StateMapSelect, 
insilmaril@0
    41
		StateMapSetting,
insilmaril@0
    42
		StateMapCenter, StateMapCenterStandardFlag,
insilmaril@0
    43
		StateMapCenterHeading, StateMapCenterNote, 
insilmaril@0
    44
		StateMapCenterFloatImage,
insilmaril@0
    45
		
insilmaril@0
    46
		StateBranch, StateBranchStandardFlag,
insilmaril@0
    47
		StateBranchHeading, StateBranchNote, 
insilmaril@95
    48
		StateBranchFloatImage, StateBranchXLink,
insilmaril@0
    49
		StateHtmlNote, StateHtml 
insilmaril@0
    50
	 };
insilmaril@0
    51
				 
insilmaril@0
    52
insilmaril@0
    53
	LoadMode loadMode;
insilmaril@0
    54
	bool isVymPart;
insilmaril@0
    55
	State state;			 
insilmaril@0
    56
	State laststate;
insilmaril@0
    57
	QString htmldata;
insilmaril@0
    58
	int branchDepth; 
insilmaril@0
    59
	NoteObj no;
insilmaril@0
    60
	MapCenterObj* mc;
insilmaril@0
    61
	MapEditor* me; QString tmpDir; 
insilmaril@0
    62
}; 
insilmaril@0
    63
#endif