xml-vym.h
author insilmaril
Tue, 07 Jul 2009 11:21:27 +0000
changeset 780 fe839bdfd10c
parent 776 25e634a7e1dc
child 795 6b0a5f4923d3
permissions -rw-r--r--
vymLinks working again
     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 readImageAttr (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 		StateImage,
    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* lastBranch;
    57 	ImageItem* lastImage;
    58 }; 
    59 #endif