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 |
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.
| DocumentObserver::DocumentObserver | ( | ) |
| DocumentObserver::DocumentObserver | ( | Document * | doc | ) |
References attachDocument().
|
virtual |
References detachDocument().
| void DocumentObserver::attachDocument | ( | Document * | doc | ) |
Attaches to another document, the old document is not longer observed then.
References draftgeoutils.faces::bind(), and detachDocument().
Referenced by MeshGui::ViewProviderMeshCurvature::attach(), PartGui::DlgProjectionOnSurface::DlgProjectionOnSurface(), DocumentObserver(), MeshGui::DlgEvaluateMeshImp::on_refreshButton_clicked(), FemGui::ActiveAnalysisObserver::setActiveObject(), and MeshGui::DlgEvaluateMeshImp::setMesh().
| void DocumentObserver::detachDocument | ( | ) |
Detaches from the current document, the document is not longer observed then.
Referenced by attachDocument(), and ~DocumentObserver().
|
protected |
Referenced by Sandbox::DocumentProtector::addObject(), Spreadsheet::SheetObserver::getDocument(), MeshGui::DlgEvaluateMeshImp::on_meshNameButton_activated(), MeshGui::DlgEvaluateMeshImp::on_refreshButton_clicked(), Sandbox::DocumentProtector::recompute(), MeshGui::DlgEvaluateMeshImp::refreshList(), Sandbox::DocumentProtector::removeObject(), and MeshGui::DlgEvaluateMeshImp::setMesh().