xml-vym.h
author insilmaril
Mon May 18 09:41:31 2009 +0000 (2009-05-18)
changeset 770 57ce1ba6d1cb
parent 749 9ff332964015
child 776 25e634a7e1dc
permissions -rw-r--r--
Fixed Standard Flags finally
     1 #ifndef XML_H
     2 #define XML_H
     3 
     4 #include "xml-base.h"
     5 
     6 class BranchItem;
     7 
     8 /*! \brief Parsing VYM maps from XML documents */
     9 
    10 class parseVYMHandler  : public parseBaseHandler
    11 {
    12 public:
    13 	bool startDocument();
    14 	bool startElement ( const QString&, const QString&,
    15                         const QString& eName, const QXmlAttributes& atts ); 
    16 	bool   endElement ( const QString&, const QString&, const QString& ); 
    17 	bool characters   ( const QString&);
    18 	QString errorString();
    19 	bool readBranchAttr (const QXmlAttributes&);
    20 	bool readFrameAttr (const QXmlAttributes&);
    21 	bool readOOAttr (const QXmlAttributes&);
    22 	bool readNoteAttr (const QXmlAttributes&);
    23 	bool readFloatImageAttr (const QXmlAttributes&);
    24 	bool readXLinkAttr (const QXmlAttributes&);
    25 	bool readHtmlAttr (const QXmlAttributes&);
    26 	bool readSettingAttr (const QXmlAttributes&);
    27 
    28 private:
    29 	enum State 
    30 	{ 
    31 		StateInit, 
    32 		StateMap, 
    33 		StateMapSelect, 
    34 		StateMapSetting,
    35 		StateMapCenter, 
    36 		StateBranch, 
    37 		StateBranchXLink,			//
    38 		StateHtmlNote, 
    39 		StateHtml, 
    40 		StateFrame,
    41 		StateStandardFlag,
    42 		StateNote,
    43 		StateFloatImage,
    44 		StateHeading
    45 	 };
    46 
    47 	 int branchesCurrent;
    48 	 int branchesTotal;
    49 
    50 	State state;			 
    51 	State laststate;
    52 	QList <State> stateStack;
    53 	QString htmldata;
    54 	NoteObj no;
    55 
    56 	BranchItem* lastBranchItem;
    57 }; 
    58 #endif