xml-vym.h
author insilmaril
Mon Oct 22 09:50:03 2007 +0000 (2007-10-22)
changeset 606 84c73902f727
child 742 54d44ecd6097
permissions -rw-r--r--
Various patches: Better windows support, branch sorting, Freedesktop support
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@577
     6
insilmaril@577
     7
/*! \brief Parsing VYM maps from XML documents */
insilmaril@577
     8
insilmaril@577
     9
class parseVYMHandler  : public parseBaseHandler
insilmaril@577
    10
{
insilmaril@577
    11
public:
insilmaril@577
    12
	bool startDocument();
insilmaril@577
    13
	bool startElement ( const QString&, const QString&,
insilmaril@577
    14
                        const QString& eName, const QXmlAttributes& atts ); 
insilmaril@577
    15
	bool   endElement ( const QString&, const QString&, const QString& ); 
insilmaril@577
    16
	bool characters   ( const QString&);
insilmaril@577
    17
	QString errorString();
insilmaril@577
    18
	bool readBranchAttr (const QXmlAttributes&);
insilmaril@577
    19
	bool readFrameAttr (const QXmlAttributes&);
insilmaril@577
    20
	bool readOOAttr (const QXmlAttributes&);
insilmaril@577
    21
	bool readNoteAttr (const QXmlAttributes&);
insilmaril@577
    22
	bool readFloatImageAttr (const QXmlAttributes&);
insilmaril@577
    23
	bool readXLinkAttr (const QXmlAttributes&);
insilmaril@577
    24
	bool readHtmlAttr (const QXmlAttributes&);
insilmaril@577
    25
	bool readSettingAttr (const QXmlAttributes&);
insilmaril@577
    26
insilmaril@577
    27
private:
insilmaril@577
    28
	enum State 
insilmaril@577
    29
	{ 
insilmaril@577
    30
		StateInit, 
insilmaril@577
    31
		StateMap, 
insilmaril@577
    32
		StateMapSelect, 
insilmaril@577
    33
		StateMapSetting,
insilmaril@577
    34
		StateMapCenter, 
insilmaril@577
    35
		StateBranch, 
insilmaril@577
    36
		StateBranchXLink,			//
insilmaril@577
    37
		StateHtmlNote, 
insilmaril@577
    38
		StateHtml, 
insilmaril@577
    39
		StateFrame,
insilmaril@577
    40
		StateStandardFlag,
insilmaril@577
    41
		StateNote,
insilmaril@577
    42
		StateFloatImage,
insilmaril@577
    43
		StateHeading
insilmaril@577
    44
	 };
insilmaril@577
    45
				 
insilmaril@577
    46
insilmaril@577
    47
insilmaril@577
    48
	State state;			 
insilmaril@577
    49
	State laststate;
insilmaril@577
    50
	QList <State> stateStack;
insilmaril@577
    51
	QString htmldata;
insilmaril@577
    52
	NoteObj no;
insilmaril@577
    53
}; 
insilmaril@577
    54
#endif