xml-base.h
author insilmaril
Fri Jul 11 12:36:39 2008 +0000 (2008-07-11)
changeset 715 c7f2d53c98d1
parent 574 56fa27b2be3e
child 775 6e4b586aa88a
permissions -rw-r--r--
Fix for umlauts in paths
     1 #ifndef XML_BASE
     2 #define XML_BASE
     3 
     4 
     5 #include <QString>
     6 #include <QXmlAttributes>
     7 
     8 #include "file.h"
     9 #include "mapcenterobj.h"
    10 #include "mapeditor.h"
    11 #include "vymmodel.h"
    12 
    13 
    14 /*! \brief Base class for parsing maps from XML documents */
    15 
    16 class parseBaseHandler  : public QXmlDefaultHandler
    17 {
    18 public:
    19 	parseBaseHandler();
    20 	~parseBaseHandler();
    21 	QString errorProtocol();
    22 	QString parseHREF(QString);
    23 	virtual bool startElement ( const QString&, const QString&,
    24                         const QString& eName, const QXmlAttributes& atts )=0; 
    25 	virtual bool   endElement ( const QString&, const QString&, const QString& )=0; 
    26 	virtual bool characters   ( const QString&)=0;
    27 
    28 	virtual QString errorString()=0;
    29 	bool fatalError( const QXmlParseException&);
    30 	void setModel (VymModel *);
    31 	void setTmpDir (QString);
    32 	void setInputFile (QString);
    33 	void setLoadMode (const LoadMode &);
    34 
    35 protected:
    36 	QString     errorProt;
    37 
    38 	LoadMode loadMode;
    39 	bool isVymPart;
    40 //	State state;			 
    41 //	State laststate;
    42 //	QList <State> stateStack;
    43 //	QString htmldata;
    44 	int branchDepth; 
    45 //	NoteObj no;
    46 	VymModel *model;
    47 	QString tmpDir; 
    48 	QString inputFile;
    49 }; 
    50 #endif