00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GRAPHML_HPP
00016 #define GRAPHML_HPP
00017
00018 #include <qxml.h>
00019 #include <qfile.h>
00020 #include "../propositiongraph.hpp"
00021
00022 class GraphML : public QXmlDefaultHandler
00023 {
00024 public:
00025 GraphML(PropositionGraph* cl);
00026 ~GraphML();
00027
00028 bool startElement(const QString &namespaceURI,
00029 const QString &localName,
00030 const QString &qName,
00031 const QXmlAttributes &attribs);
00032 bool endElement(const QString &namespaceURI,
00033 const QString &localName,
00034 const QString &qName);
00035 bool characters(const QString &str);
00036 bool fatalError(const QXmlParseException &exception);
00040 PropositionGraph* caller;
00041 void ioError(const QFile file, const QString message);
00042 Edge* e;
00043 QString type;
00044
00045 void loadProp(QString pname);
00046 void loadCat (QString dir);
00051 void save(QString dir);
00052 void saveProp(QString dir, QString prop);
00053 void init();
00054 QString currentItem;
00055
00056
00057 private:
00058 QString currentText;
00059
00060 };
00061
00062
00063 #endif // GRAPHML_HPP