• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

rocs/RocsCore

Public Slots | Signals | Public Member Functions | Static Public Member Functions | List of all members
DocumentManager Class Reference

#include <DocumentManager.h>

Inheritance diagram for DocumentManager:
Inheritance graph
[legend]

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

DocumentManager::~DocumentManager ( )
virtual

Definition at line 76 of file DocumentManager.cpp.

Member Function Documentation

void DocumentManager::activateDocument ( )
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.

void DocumentManager::addDocument ( Document *  document)
slot

Add document to document list and set this document as active document.

Parameters
documentthat shall be added to document list

Definition at line 106 of file DocumentManager.cpp.

void DocumentManager::changeDocument ( Document *  document)
slot

Change active document to be document.

Parameters
documentis the document to be set active.

Definition at line 143 of file DocumentManager.cpp.

void DocumentManager::changeDocument ( int  index)
slot

Change to document with given index.

Parameters
indexis expected to be a valid index

Definition at line 119 of file DocumentManager.cpp.

void DocumentManager::changeDocument ( )
slot

Definition at line 130 of file DocumentManager.cpp.

void DocumentManager::closeAllDocuments ( )
slot

Close all documents from document list.

This method does not write data to document files.

Definition at line 165 of file DocumentManager.cpp.

void DocumentManager::convertToDataStructure ( )
slot

Convert document to new data structure.

Definition at line 196 of file DocumentManager.cpp.

void DocumentManager::deactivateDocument ( Document *  document)
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
indexof 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.

void DocumentManager::documentListChanged ( )
signal

Signal is emitted if the document list changes and older document index values get invalid.

void DocumentManager::documentRemoved ( Document *  document)
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.

void DocumentManager::exportDocument ( Document *  document,
const KUrl &  documentUrl 
)
slot

Save graph document document at url documentUrl.

The document is not changed by this operation.

Parameters
documentis the graph document to be save
documentUrlis the target file for saving

Definition at line 271 of file DocumentManager.cpp.

Document * DocumentManager::newDocument ( )
slot

Creates and loads a new graph document.

Returns
created document

Definition at line 215 of file DocumentManager.cpp.

Document * DocumentManager::openDocument ( const KUrl &  documentUrl)
slot

Loads graph document specified by documentUrl and adds document to document list.

Sets loaded document as active document.

Parameters
documentUrlis 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.

void DocumentManager::removeDocument ( Document *  document)
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
documentthat 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.

void DocumentManager::saveDocumentAs ( Document *  document,
const KUrl &  documentUrl 
)
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
documentis the graph document to be save
documentUrlis the target file for saving

Definition at line 263 of file DocumentManager.cpp.

DocumentManager & DocumentManager::self ( )
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:
  • DocumentManager.h
  • DocumentManager.cpp
This file is part of the KDE documentation.
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.

rocs/RocsCore

Skip menu "rocs/RocsCore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal