xml-vym.h
author insilmaril
Wed, 09 Jun 2010 13:14:08 +0000
changeset 847 43268373032d
parent 821 4a84d7e444d8
permissions -rw-r--r--
1.13.4 Various fixes
     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 readLinkNewAttr (const QXmlAttributes&);
    26 	bool readHtmlAttr (const QXmlAttributes&);
    27 	bool readSettingAttr (const QXmlAttributes&);
    28 
    29 private:
    30 	enum State 
    31 	{ 
    32 		StateInit, 
    33 		StateMap, 
    34 		StateMapSelect, 
    35 		StateMapSetting,
    36 		StateMapCenter, 
    37 		StateBranch, 
    38 		StateBranchXLink,			//
    39 		StateHtmlNote, 
    40 		StateHtml, 
    41 		StateFrame,
    42 		StateStandardFlag,
    43 		StateNote,
    44 		StateImage,
    45 		StateHeading,
    46 		StateLink,
    47 	 };
    48 
    49 	 int branchesCounter;
    50 	 int branchesTotal;
    51 
    52 	State state;			 
    53 	State laststate;
    54 	QList <State> stateStack;
    55 	QString htmldata;
    56 	NoteObj no;
    57 
    58 	BranchItem* lastBranch;
    59 	ImageItem* lastImage;
    60 	MapItem* lastMI;
    61 
    62 	bool useProgress;
    63 }; 
    64 #endif