rocs/RocsCore
#include <DocumentManager.h>

Public Slots | |
void | addDocument (Document *document) |
void | changeDocument (Document *document) |
void | changeDocument (int index) |
void | changeDocument () |
void | closeAllDocuments () |
void | convertToDataStructure () |
void | exportDocument (Document *document, const KUrl &documentUrl) |
Document * | newDocument () |
Document * | openDocument (const KUrl &documentUrl) |
void | removeDocument (Document *document) |
void | saveDocumentAs (Document *document, const KUrl &documentUrl) |
Signals | |
void | activateDocument () |
void | deactivateDocument (Document *document) |
void | documentListChanged () |
void | documentRemoved (Document *document) |
Public Member Functions | |
virtual | ~DocumentManager () |
Document * | activeDocument () const |
Document * | document (int index) const |
QList< Document * > | documentList () const |
QSvgRenderer * | registerSharedRenderer (const QString &iconPackage) |
void | removeSharedRenderer (const QString &iconPackage) |
QSvgRenderer * | sharedRenderer (const QString &iconPackage) |
Static Public Member Functions | |
static DocumentManager & | self () |
Detailed Description
Definition at line 35 of file DocumentManager.h.
Constructor & Destructor Documentation
|
virtual |
Definition at line 76 of file DocumentManager.cpp.
Member Function Documentation
|
signal |
Signal is emitted if the currently active document changes.
Document * DocumentManager::activeDocument | ( | ) | const |
Returns the currently active document, or 0 if there document list is empty.
- Returns
- currently active document
Definition at line 96 of file DocumentManager.cpp.
|
slot |
Add document to document list and set this document as active document.
- Parameters
-
document that shall be added to document list
Definition at line 106 of file DocumentManager.cpp.
|
slot |
Change active document to be document
.
- Parameters
-
document is the document to be set active.
Definition at line 143 of file DocumentManager.cpp.
|
slot |
Change to document with given index
.
- Parameters
-
index is expected to be a valid index
Definition at line 119 of file DocumentManager.cpp.
|
slot |
Definition at line 130 of file DocumentManager.cpp.
|
slot |
Close all documents from document list.
This method does not write data to document files.
Definition at line 165 of file DocumentManager.cpp.
|
slot |
Convert document to new data structure.
Definition at line 196 of file DocumentManager.cpp.
|
signal |
Signal is emitted if the currently active document is deactivated.
(This can be caused by a removal or a change.)
Document * DocumentManager::document | ( | int | index | ) | const |
Returns document with index i
in document list.
Note that index can change due to various operations. Signal
- See also
- documentListChanged() is emitted if this happens.
- Parameters
-
index of document in document list
- Returns
- the document
Definition at line 91 of file DocumentManager.cpp.
QList< Document * > DocumentManager::documentList | ( | ) | const |
Returns the document list of the document manager.
Position of document in this list is temporary document index. List order can change by
- See also
- removeDocument().
- Returns
- list with documents
Definition at line 101 of file DocumentManager.cpp.
|
signal |
Signal is emitted if the document list changes and older document index values get invalid.
|
signal |
Signal is emitted if document
was removed from list.
If document
is the active document, both, deactivateDocument() and activeDocument() were called before this signal.
|
slot |
Save graph document document
at url documentUrl
.
The document is not changed by this operation.
- Parameters
-
document is the graph document to be save documentUrl is the target file for saving
Definition at line 271 of file DocumentManager.cpp.
|
slot |
Creates and loads a new graph document.
- Returns
- created document
Definition at line 215 of file DocumentManager.cpp.
|
slot |
Loads graph document specified by documentUrl
and adds document to document list.
Sets loaded document as active document.
- Parameters
-
documentUrl is Url specifying the to be opened document
- Returns
- loaded document
Definition at line 245 of file DocumentManager.cpp.
QSvgRenderer * DocumentManager::registerSharedRenderer | ( | const QString & | iconPackage | ) |
Definition at line 293 of file DocumentManager.cpp.
|
slot |
Remove document from document list.
If the document is currently active, then the last document from document list becomes active. If document list contains only this document, a new (empty) document is created. This method does not write data to document files.
- Parameters
-
document that shall be removed
Definition at line 173 of file DocumentManager.cpp.
void DocumentManager::removeSharedRenderer | ( | const QString & | iconPackage | ) |
Definition at line 303 of file DocumentManager.cpp.
|
slot |
Save graph document document
at url documentUrl
.
The internal file url for the document is reset with documentUrl
and the modification state is set to false. To save document without changing its properties
- See also
- exportDocument(...).
- Parameters
-
document is the graph document to be save documentUrl is the target file for saving
Definition at line 263 of file DocumentManager.cpp.
|
static |
Definition at line 57 of file DocumentManager.cpp.
QSvgRenderer * DocumentManager::sharedRenderer | ( | const QString & | iconPackage | ) |
Definition at line 284 of file DocumentManager.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.