xml-vym.h
author insilmaril
Thu Nov 08 15:28:03 2007 +0000 (2007-11-08)
changeset 620 24bfecc949a0
child 742 54d44ecd6097
permissions -rw-r--r--
1.11.2 split up of xml helper functions. started to work on attributes
     1 #ifndef XML_H
     2 #define XML_H
     3 
     4 #include "xml-base.h"
     5 
     6 
     7 /*! \brief Parsing VYM maps from XML documents */
     8 
     9 class parseVYMHandler  : public parseBaseHandler
    10 {
    11 public:
    12 	bool startDocument();
    13 	bool startElement ( const QString&, const QString&,
    14                         const QString& eName, const QXmlAttributes& atts ); 
    15 	bool   endElement ( const QString&, const QString&, const QString& ); 
    16 	bool characters   ( const QString&);
    17 	QString errorString();
    18 	bool readBranchAttr (const QXmlAttributes&);
    19 	bool readFrameAttr (const QXmlAttributes&);
    20 	bool readOOAttr (const QXmlAttributes&);
    21 	bool readNoteAttr (const QXmlAttributes&);
    22 	bool readFloatImageAttr (const QXmlAttributes&);
    23 	bool readXLinkAttr (const QXmlAttributes&);
    24 	bool readHtmlAttr (const QXmlAttributes&);
    25 	bool readSettingAttr (const QXmlAttributes&);
    26 
    27 private:
    28 	enum State 
    29 	{ 
    30 		StateInit, 
    31 		StateMap, 
    32 		StateMapSelect, 
    33 		StateMapSetting,
    34 		StateMapCenter, 
    35 		StateBranch, 
    36 		StateBranchXLink,			//
    37 		StateHtmlNote, 
    38 		StateHtml, 
    39 		StateFrame,
    40 		StateStandardFlag,
    41 		StateNote,
    42 		StateFloatImage,
    43 		StateHeading
    44 	 };
    45 				 
    46 
    47 
    48 	State state;			 
    49 	State laststate;
    50 	QList <State> stateStack;
    51 	QString htmldata;
    52 	NoteObj no;
    53 }; 
    54 #endif