rocs/RocsCore
DocumentManager.cpp
Go to the documentation of this file.
205 if (d->_activeDocument->backend()->internalName() != DataStructureBackendManager::self().activeBackend()->internalName()
209 kDebug() << "Data structure converted to " << DataStructureBackendManager::self().activeBackend()->name();
227 name = QString("%1 %2").arg(i18nc("document that contains graphs or data structures as a visual representation", "Document")).arg(i);
286 if (d->_sharedRenderers.count(iconPackage) == 0 || !d->_sharedRenderers.contains(iconPackage)) {
QSvgRenderer * sharedRenderer(const QString &iconPackage)
Definition: DocumentManager.cpp:284
DataStructureBackendInterface * activeBackend() const
Returns the currently active data structure backend.
Definition: DataStructureBackendManager.cpp:275
Document * activeDocument() const
Returns the currently active document, or 0 if there document list is empty.
Definition: DocumentManager.cpp:96
QObject * sender() const
void deactivateDocument(Document *document)
Signal is emitted if the currently active document is deactivated.
QVariant data() const
static const KCatalogLoader loader("rocscore")
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
static DataStructureBackendManager & self()
Returns self reference to backend manager.
Definition: DataStructureBackendManager.cpp:233
void saveDocumentAs(Document *document, const KUrl &documentUrl)
Save graph document document at url documentUrl.
Definition: DocumentManager.cpp:263
const char * name() const
virtual void writeFile(Document &graph)=0
Writes given graph document to formerly specified file.
QString name()
return the translated name to be used in user visible strings
Definition: DataStructureBackendInterface.cpp:54
static GraphFileBackendManager * self()
Returns self reference to backend manager.
Definition: GraphFileBackendManager.cpp:49
GraphFilePluginInterface * defaultBackend()
Returns the default backend used for serialization/loading of graph files.
Definition: GraphFileBackendManager.cpp:151
int count(const T &value) const
void append(const T &value)
void convertToDataStructure()
Convert document to new data structure.
Definition: DocumentManager.cpp:196
int toInt(bool *ok) const
Document * document(int index) const
Returns document with index i in document list.
Definition: DocumentManager.cpp:91
DataStructurePtr addDataStructure(const QString &name=QString())
Add data structure to graph document with name name.
Definition: Document.cpp:333
void deleteLater()
bool contains(const T &value) const
Definition: Document.h:41
virtual bool canConvertFrom(Document *doc) const =0
Check if is possÃble to convert from the doc document to this data structure.
QList< Document * > documentList() const
Returns the document list of the document manager.
Definition: DocumentManager.cpp:101
void setFile(const KUrl &file)
Set file that shall be used for nexte read or write operation.
Definition: GraphFilePluginInterface.cpp:114
virtual void readFile()=0
Open given file and imports it into internal format.
QList< DataStructurePtr > & dataStructures() const
Definition: Document.cpp:227
void activateDocument()
Signal is emitted if the currently active document changes.
void documentRemoved(Document *document)
Signal is emitted if document was removed from list.
Definition: DocumentManager.h:35
QString internalName()
return the internal name from plugin.
Definition: DataStructureBackendInterface.cpp:63
void documentListChanged()
Signal is emitted if the document list changes and older document index values get invalid...
QString errorString() const
Definition: GraphFilePluginInterface.cpp:77
void removeSharedRenderer(const QString &iconPackage)
Definition: DocumentManager.cpp:303
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
void addDocument(Document *document)
Add document to document list and set this document as active document.
Definition: DocumentManager.cpp:106
void exportDocument(Document *document, const KUrl &documentUrl)
Save graph document document at url documentUrl.
Definition: DocumentManager.cpp:271
This class provides an interface for graph file format plugins.
Definition: GraphFilePluginInterface.h:42
QSvgRenderer * registerSharedRenderer(const QString &iconPackage)
Definition: DocumentManager.cpp:293
Document * openDocument(const KUrl &documentUrl)
Loads graph document specified by documentUrl and adds document to document list. ...
Definition: DocumentManager.cpp:245
const T value(const Key &key) const
void removeDocument(Document *document)
Remove document from document list.
Definition: DocumentManager.cpp:173
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.