The SelectionObserver class simplifies the step to write classes that listen to what happens to the selection. More...
#include <Selection.h>
Public Member Functions | |
void | attachSelection () |
Attaches to the selection. More... | |
bool | blockConnection (bool block) |
void | detachSelection () |
Detaches from the selection. More... | |
bool | isConnectionAttached () const |
bool | isConnectionBlocked () const |
SelectionObserver (bool attach=true, int resolve=1) | |
Constructor. More... | |
SelectionObserver (const Gui::ViewProviderDocumentObject *vp, bool attach=true, int resolve=1) | |
Constructor. More... | |
virtual | ~SelectionObserver () |
Detailed Description
The SelectionObserver class simplifies the step to write classes that listen to what happens to the selection.
Constructor & Destructor Documentation
◆ SelectionObserver() [1/2]
SelectionObserver::SelectionObserver | ( | bool | attach = true , |
int | resolve = 1 |
||
) |
Constructor.
- Parameters
-
attach whether to attach this observer on construction resolve sub-object resolving mode. 0 no resolve, 1 resolve sub-object with old style element name 2 resolve sub-object with new style element name
References attachSelection().
◆ SelectionObserver() [2/2]
SelectionObserver::SelectionObserver | ( | const Gui::ViewProviderDocumentObject * | vp, |
bool | attach = true , |
||
int | resolve = 1 |
||
) |
Constructor.
- Parameters
-
vp filtering view object. attach whether to attach this observer on construction resolve sub-object resolving mode. 0 no resolve, 1 resolve sub-object with old style element name 2 resolve sub-object with new style element name
Constructs an selection observer that receives only selection event of objects within the same document as the input view object.
References attachSelection(), App::DocumentObject::getDocument(), App::Document::getName(), App::DocumentObject::getNameInDocument(), and Gui::ViewProviderDocumentObject::getObject().
◆ ~SelectionObserver()
|
virtual |
References detachSelection().
Member Function Documentation
◆ attachSelection()
void SelectionObserver::attachSelection | ( | ) |
Attaches to the selection.
References Gui::SelectionSingleton::addSelectionGate(), Gui::Selection(), Gui::SelectionSingleton::signalSelectionChanged, Gui::SelectionSingleton::signalSelectionChanged2, and Gui::SelectionSingleton::signalSelectionChanged3.
Referenced by Gui::Dialog::DlgPropertyLink::attachObserver(), Gui::View3DInventorViewer::init(), SelectionObserver(), Gui::PropertyView::showEvent(), and Gui::TreeWidget::showEvent().
◆ blockConnection()
Referenced by SketcherGui::TaskSketcherConstrains::on_listWidgetConstraints_itemSelectionChanged(), SketcherGui::TaskSketcherElements::on_listWidgetElements_itemSelectionChanged(), Gui::TreeWidget::onSelectTimer(), Gui::DocumentItem::populateItem(), TechDrawGui::MDIViewPage::print(), TechDrawGui::MDIViewPage::saveSVG(), Gui::DocumentItem::selectAllInstances(), TechDrawGui::MDIViewPage::setTreeToSceneSelect(), and Gui::DocumentItem::updateSelection().
◆ detachSelection()
void SelectionObserver::detachSelection | ( | ) |
Detaches from the selection.
References Gui::SelectionSingleton::rmvSelectionGate(), and Gui::Selection().
Referenced by TechDrawGui::MDIViewPage::closeEvent(), Gui::Dialog::DlgPropertyLink::detachObserver(), Gui::PropertyView::hideEvent(), Gui::TreeWidget::hideEvent(), ~SelectionObserver(), and Gui::View3DInventorViewer::~View3DInventorViewer().
◆ isConnectionAttached()
bool SelectionObserver::isConnectionAttached | ( | ) | const |
Referenced by Gui::Dialog::DlgPropertyLink::attachObserver(), Gui::Dialog::DlgPropertyLink::detachObserver(), Gui::TreeWidget::expandSelectedItems(), Gui::TreeWidget::getSelection(), Gui::PropertyView::onTimer(), Gui::TreeWidget::selectAllInstances(), Gui::TreeWidget::selectAllLinks(), and Gui::TreeWidget::selectLinkedObject().
◆ isConnectionBlocked()
bool SelectionObserver::isConnectionBlocked | ( | ) | const |
Referenced by Gui::TreeWidget::selectLinkedObject().
The documentation for this class was generated from the following files:
- src/Gui/Selection.h
- src/Gui/Selection.cpp