Gui::SelectionObserver Class Referenceabstract

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.

Author
Werner Mayer

Constructor & Destructor Documentation

◆ SelectionObserver() [1/2]

SelectionObserver::SelectionObserver ( bool  attach = true,
int  resolve = 1 
)

Constructor.

Parameters
attachwhether to attach this observer on construction
resolvesub-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
vpfiltering view object.
attachwhether to attach this observer on construction
resolvesub-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()

SelectionObserver::~SelectionObserver ( )
virtual

References detachSelection().

Member Function Documentation

◆ attachSelection()

◆ blockConnection()

◆ detachSelection()

◆ isConnectionAttached()

◆ isConnectionBlocked()

bool SelectionObserver::isConnectionBlocked ( ) const

The documentation for this class was generated from the following files:
  • Sources/FreeCAD/src/Gui/Selection.h
  • Sources/FreeCAD/src/Gui/Selection.cpp