The DocumentObserver class simplfies the step to write classes that listen to what happens inside a document. More...
#include <DocumentObserver.h>
Public Member Functions | |
void | attachDocument (Document *) |
Attaches to another document, the old document is not longer observed then. More... | |
void | detachDocument () |
Detaches from the current document, the document is not longer observed then. More... | |
DocumentObserver () | |
Constructor. More... | |
DocumentObserver (Document *) | |
virtual | ~DocumentObserver () |
Protected Member Functions | |
Document * | getDocument () const |
Detailed Description
The DocumentObserver class simplfies the step to write classes that listen to what happens inside a document.
This is very useful for classes that needs to be notified when an observed object has changed.
Constructor & Destructor Documentation
◆ DocumentObserver() [1/2]
DocumentObserver::DocumentObserver | ( | ) |
Constructor.
References App::GetApplication(), App::Application::signalDeleteDocument, and App::Application::signalNewDocument.
◆ DocumentObserver() [2/2]
DocumentObserver::DocumentObserver | ( | Document * | doc | ) |
◆ ~DocumentObserver()
|
virtual |
References detachDocument().
Member Function Documentation
◆ attachDocument()
void DocumentObserver::attachDocument | ( | Document * | doc | ) |
Attaches to another document, the old document is not longer observed then.
References detachDocument().
Referenced by PartGui::DlgProjectionOnSurface::DlgProjectionOnSurface(), DocumentObserver(), MeshGui::DlgEvaluateMeshImp::on_refreshButton_clicked(), FemGui::ActiveAnalysisObserver::setActiveObject(), and MeshGui::DlgEvaluateMeshImp::setMesh().
◆ detachDocument()
void DocumentObserver::detachDocument | ( | ) |
Detaches from the current document, the document is not longer observed then.
Referenced by attachDocument(), and ~DocumentObserver().
◆ getDocument()
|
protected |
Referenced by Sandbox::DocumentProtector::addObject(), MeshGui::DlgEvaluateMeshImp::on_meshNameButton_activated(), MeshGui::DlgEvaluateMeshImp::on_refreshButton_clicked(), Sandbox::DocumentProtector::recompute(), MeshGui::DlgEvaluateMeshImp::refreshList(), Sandbox::DocumentProtector::removeObject(), and MeshGui::DlgEvaluateMeshImp::setMesh().
The documentation for this class was generated from the following files:
- src/App/DocumentObserver.h
- src/App/DocumentObserver.cpp