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