xml.h
author insilmaril
Wed May 06 10:00:18 2009 +0000 (2009-05-06)
branchrelease-1-12-maintained
changeset 68 3f25bb36200e
child 95 f688a9913724
permissions -rw-r--r--
Updated french translation from Claude Hiebel
     1 #ifndef XLM_H
     2 #define XLM_H
     3 
     4 
     5 #include <qstring.h>
     6 #include <qxml.h>
     7 
     8 #include "mapcenterobj.h"
     9 #include "mapeditor.h"
    10 
    11 
    12 class mapBuilderHandler  : public QXmlDefaultHandler
    13 {
    14 public:
    15 	mapBuilderHandler();
    16 	~mapBuilderHandler();
    17 	QString errorProtocol();
    18 	bool startDocument();
    19 	QString mapBuilderHandler::parseHREF(QString);
    20 	bool startElement ( const QString&, const QString&,
    21                         const QString& eName, const QXmlAttributes& atts ); 
    22 	bool   endElement ( const QString&, const QString&, const QString& ); 
    23 	bool characters   ( const QString&);
    24 	QString errorString();
    25 	bool fatalError( const QXmlParseException&);
    26 	void setMapEditor (MapEditor*);
    27 	void setTmpDir (QString);
    28 	void setLoadMode (const LoadMode &);
    29 	bool readBranchAttr (const QXmlAttributes&);
    30 	bool readNoteAttr (const QXmlAttributes&);
    31 	bool readFloatImageAttr (const QXmlAttributes&);
    32 	bool readHtmlAttr (const QXmlAttributes&);
    33 	bool readSettingAttr (const QXmlAttributes&);
    34 
    35 private:
    36 	QString     errorProt;
    37 	enum State 
    38 	{ 
    39 		StateInit, StateMap, StateMapSelect, 
    40 		StateMapSetting,
    41 		StateMapCenter, StateMapCenterStandardFlag,
    42 		StateMapCenterHeading, StateMapCenterNote, 
    43 		StateMapCenterFloatImage,
    44 		
    45 		StateBranch, StateBranchStandardFlag,
    46 		StateBranchHeading, StateBranchNote, 
    47 		StateBranchFloatImage, 
    48 		StateHtmlNote, StateHtml 
    49 	 };
    50 				 
    51 
    52 	LoadMode loadMode;
    53 	bool isVymPart;
    54 	State state;			 
    55 	State laststate;
    56 	QString htmldata;
    57 	int branchDepth; 
    58 	NoteObj no;
    59 	MapCenterObj* mc;
    60 	MapEditor* me; QString tmpDir; 
    61 }; 
    62 #endif