1.1 Binary file demos/vym-projectplan.vym has changed
2.1 --- a/xml.cpp Mon Jul 23 12:42:01 2007 +0000
2.2 +++ b/xml.cpp Mon Jul 23 12:42:02 2007 +0000
2.3 @@ -17,14 +17,14 @@
2.4 extern Settings settings;
2.5 extern QString vymVersion;
2.6
2.7 -mapBuilderHandler::mapBuilderHandler() {}
2.8 +parseVYMHandler::parseVYMHandler() {}
2.9
2.10 -mapBuilderHandler::~mapBuilderHandler() {}
2.11 +parseVYMHandler::~parseVYMHandler() {}
2.12
2.13 -QString mapBuilderHandler::errorProtocol() { return errorProt; }
2.14 +QString parseVYMHandler::errorProtocol() { return errorProt; }
2.15
2.16
2.17 -bool mapBuilderHandler::startDocument()
2.18 +bool parseVYMHandler::startDocument()
2.19 {
2.20 errorProt = "";
2.21 state = StateInit;
2.22 @@ -38,7 +38,7 @@
2.23 }
2.24
2.25
2.26 -QString mapBuilderHandler::parseHREF(QString href)
2.27 +QString parseVYMHandler::parseHREF(QString href)
2.28 {
2.29 QString type=href.section(":",0,0);
2.30 QString path=href.section(":",1,1);
2.31 @@ -48,7 +48,7 @@
2.32 return tmpDir + path;
2.33 }
2.34
2.35 -bool mapBuilderHandler::startElement ( const QString&, const QString&,
2.36 +bool parseVYMHandler::startElement ( const QString&, const QString&,
2.37 const QString& eName, const QXmlAttributes& atts )
2.38 {
2.39 QColor col;
2.40 @@ -272,7 +272,7 @@
2.41 return true;
2.42 }
2.43
2.44 -bool mapBuilderHandler::endElement ( const QString&, const QString&, const QString &eName)
2.45 +bool parseVYMHandler::endElement ( const QString&, const QString&, const QString &eName)
2.46 {
2.47 /* Testing
2.48 cout << "endElement </" <<eName.ascii()
2.49 @@ -303,7 +303,7 @@
2.50 return true;
2.51 }
2.52
2.53 -bool mapBuilderHandler::characters ( const QString& ch)
2.54 +bool parseVYMHandler::characters ( const QString& ch)
2.55 {
2.56 //cout << "characters \""<<ch<<"\" state="<<state <<" laststate="<<laststate<<endl;
2.57
2.58 @@ -341,12 +341,12 @@
2.59 return true;
2.60 }
2.61
2.62 -QString mapBuilderHandler::errorString()
2.63 +QString parseVYMHandler::errorString()
2.64 {
2.65 return "the document is not in the VYM file format";
2.66 }
2.67
2.68 -bool mapBuilderHandler::fatalError( const QXmlParseException& exception )
2.69 +bool parseVYMHandler::fatalError( const QXmlParseException& exception )
2.70 {
2.71 errorProt += QString( "Fatal parsing error: %1 in line %2, column %3\n")
2.72 .arg( exception.message() )
2.73 @@ -372,28 +372,28 @@
2.74 return QXmlDefaultHandler::fatalError( exception );
2.75 }
2.76
2.77 -void mapBuilderHandler::setMapEditor (MapEditor* e)
2.78 +void parseVYMHandler::setMapEditor (MapEditor* e)
2.79 {
2.80 me=e;
2.81 mc=me->getMapCenter();
2.82 }
2.83
2.84 -void mapBuilderHandler::setTmpDir (QString tp)
2.85 +void parseVYMHandler::setTmpDir (QString tp)
2.86 {
2.87 tmpDir=tp;
2.88 }
2.89
2.90 -void mapBuilderHandler::setInputFile (QString f)
2.91 +void parseVYMHandler::setInputFile (QString f)
2.92 {
2.93 inputFile=f;
2.94 }
2.95
2.96 -void mapBuilderHandler::setLoadMode (const LoadMode &lm)
2.97 +void parseVYMHandler::setLoadMode (const LoadMode &lm)
2.98 {
2.99 loadMode=lm;
2.100 }
2.101
2.102 -bool mapBuilderHandler::readBranchAttr (const QXmlAttributes& a)
2.103 +bool parseVYMHandler::readBranchAttr (const QXmlAttributes& a)
2.104 {
2.105 lastOO=lastBranch;
2.106 if (!readOOAttr(a)) return false;
2.107 @@ -420,7 +420,7 @@
2.108 return true;
2.109 }
2.110
2.111 -bool mapBuilderHandler::readFrameAttr (const QXmlAttributes& a)
2.112 +bool parseVYMHandler::readFrameAttr (const QXmlAttributes& a)
2.113 {
2.114 bool ok;
2.115 int x;
2.116 @@ -446,7 +446,7 @@
2.117 return true;
2.118 }
2.119
2.120 -bool mapBuilderHandler::readOOAttr (const QXmlAttributes& a)
2.121 +bool parseVYMHandler::readOOAttr (const QXmlAttributes& a)
2.122 {
2.123 if (lastOO)
2.124 {
2.125 @@ -500,7 +500,7 @@
2.126 return true;
2.127 }
2.128
2.129 -bool mapBuilderHandler::readNoteAttr (const QXmlAttributes& a)
2.130 +bool parseVYMHandler::readNoteAttr (const QXmlAttributes& a)
2.131 { // only for backward compatibility (<1.4.6). Use htmlnote now.
2.132 no.clear();
2.133 QString fn;
2.134 @@ -513,7 +513,7 @@
2.135
2.136 if ( !file.open( QIODevice::ReadOnly) )
2.137 {
2.138 - qWarning ("mapBuilderHandler::readNoteAttr: Couldn't load "+fn);
2.139 + qWarning ("parseVYMHandler::readNoteAttr: Couldn't load "+fn);
2.140 return false;
2.141 }
2.142 QTextStream stream( &file );
2.143 @@ -532,7 +532,7 @@
2.144 return true;
2.145 }
2.146
2.147 -bool mapBuilderHandler::readFloatImageAttr (const QXmlAttributes& a)
2.148 +bool parseVYMHandler::readFloatImageAttr (const QXmlAttributes& a)
2.149 {
2.150 lastOO=lastFloat;
2.151
2.152 @@ -599,7 +599,7 @@
2.153 return true;
2.154 }
2.155
2.156 -bool mapBuilderHandler::readXLinkAttr (const QXmlAttributes& a)
2.157 +bool parseVYMHandler::readXLinkAttr (const QXmlAttributes& a)
2.158 {
2.159 QColor col;
2.160 bool okx;
2.161 @@ -659,14 +659,14 @@
2.162 return success;
2.163 }
2.164
2.165 -bool mapBuilderHandler::readHtmlAttr (const QXmlAttributes& a)
2.166 +bool parseVYMHandler::readHtmlAttr (const QXmlAttributes& a)
2.167 {
2.168 for (int i=1; i<=a.count(); i++)
2.169 htmldata+=" "+a.localName(i-1)+"=\""+a.value(i-1)+"\"";
2.170 return true;
2.171 }
2.172
2.173 -bool mapBuilderHandler::readSettingAttr (const QXmlAttributes& a)
2.174 +bool parseVYMHandler::readSettingAttr (const QXmlAttributes& a)
2.175 {
2.176 if (!a.value( "key").isEmpty() )
2.177 {
3.1 --- a/xml.h Mon Jul 23 12:42:01 2007 +0000
3.2 +++ b/xml.h Mon Jul 23 12:42:02 2007 +0000
3.3 @@ -10,11 +10,11 @@
3.4 #include "mapeditor.h"
3.5
3.6
3.7 -class mapBuilderHandler : public QXmlDefaultHandler
3.8 +class parseVYMHandler : public QXmlDefaultHandler
3.9 {
3.10 public:
3.11 - mapBuilderHandler();
3.12 - ~mapBuilderHandler();
3.13 + parseVYMHandler();
3.14 + ~parseVYMHandler();
3.15 QString errorProtocol();
3.16 bool startDocument();
3.17 QString parseHREF(QString);