rocs/RocsCore
GmlFileFormatPlugin.cpp
Go to the documentation of this file.
71 setError(CouldNotOpenFile, i18n("Could not open file \"%1\" in read mode: %2", file().toLocalFile(), fileHandle.errorString()));
98 setError(FileIsReadOnly, i18n("Cannot open file %1 to write document. Error: %2", file().fileName(), fileHandle.errorString()));
135 edge.append(QString("source \"%1\"\n target \"%2\"\n").arg(e->from()->property("name").toString(), e->to()->property("name").toString()));
137 // edge.append (QString(" color \"%1\"\n").arg(e->color())); //Problem with comments (both starts by '#')
152 // node.append (QString(" color \"%1\"\n").arg(n->color())); //Problem with comments (both starts by '#')
153 node.append(QString(" iconPackage \"%1\"\n").arg(n->dataStructure()->document()->iconPackage()));
QString & append(QChar ch)
QString errorString() const
static const KAboutData aboutdata("rocs_gmlfileformat", 0, ki18nc("@title Displayed plugin name","GML File Backend"),"0.1", ki18n("Read and write Graph Markup Language (GML) files."), KAboutData::License_GPL_V2)
static DataStructureBackendManager & self()
Returns self reference to backend manager.
Definition: DataStructureBackendManager.cpp:233
void setError(Error error, QString message=QString())
Definition: GraphFilePluginInterface.cpp:83
QByteArray readAll()
virtual void readFile()
Open given file and imports it into internal format.
Definition: GmlFileFormatPlugin.cpp:63
virtual void writeFile(Document &document)
Writes given graph document to formerly specified file.
Definition: GmlFileFormatPlugin.cpp:86
DataStructurePtr activeDataStructure() const
Definition: Document.cpp:431
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
Definition: Document.h:41
Definition: GmlFileFormatPlugin.h:31
~GmlFileFormatPlugin()
Definition: GmlFileFormatPlugin.cpp:53
QString & replace(int position, int n, QChar after)
void setBackend(const QString &pluginIdentifier)
Change the active backend.
Definition: DataStructureBackendManager.cpp:240
void setGraphDocument(Document *document)
Definition: GraphFilePluginInterface.cpp:108
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
const KUrl & file() const
Definition: GraphFilePluginInterface.cpp:120
This class provides an interface for graph file format plugins.
Definition: GraphFilePluginInterface.h:42
virtual const QStringList extensions() const
File extensions that are common for this file type.
Definition: GmlFileFormatPlugin.cpp:57
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.