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