App::FeaturePythonT< FeatureT > Class Template Reference

Generic Python feature class which allows to behave every DocumentObject derived class as Python feature – simply by subclassing. More...

#include <FeaturePython.h>

Public Member Functions

 FeaturePythonT ()
 
virtual ~FeaturePythonT ()
 

methods override DocumentObject

short mustExecute () const override
 
virtual DocumentObjectExecReturnexecute (void) override
 recalculate the Feature More...
 
virtual const char * getViewProviderNameOverride (void) const override
 
virtual const char * getViewProviderName (void) const override
 returns the type name of the ViewProvider More...
 
virtual App::DocumentObjectgetSubObject (const char *subname, PyObject **pyObj, Base::Matrix4D *mat, bool transform, int depth) const override
 
virtual std::vector< std::string > getSubObjects (int reason=0) const override
 
virtual App::DocumentObjectgetLinkedObject (bool recurse, Base::Matrix4D *mat, bool transform, int depth) const override
 
virtual bool hasChildElement () const override
 return true to activate tree view group object handling More...
 
virtual int isElementVisible (const char *element) const override
 Get sub-element visibility. More...
 
virtual int setElementVisible (const char *element, bool visible) override
 Set sub-element visibility. More...
 
virtual bool canLinkProperties () const override
 
virtual bool allowDuplicateLabel () const override
 
virtual bool redirectSubName (std::ostringstream &ss, App::DocumentObject *topParent, App::DocumentObject *child) const override
 
virtual int canLoadPartial () const override
 
PyObjectgetPyObject (void) override
 
void setPyObject (PyObject *obj) override
 
virtual void onBeforeChange (const Property *prop) override
 
virtual void onBeforeChangeLabel (std::string &newLabel) override
 
virtual void onChanged (const Property *prop) override
 
virtual void onDocumentRestored () override
 

Detailed Description

template<class FeatureT>
class App::FeaturePythonT< FeatureT >

Generic Python feature class which allows to behave every DocumentObject derived class as Python feature – simply by subclassing.

Author
Werner Mayer

Constructor & Destructor Documentation

◆ FeaturePythonT()

template<class FeatureT >
App::FeaturePythonT< FeatureT >::FeaturePythonT ( )

◆ ~FeaturePythonT()

template<class FeatureT >
virtual App::FeaturePythonT< FeatureT >::~FeaturePythonT ( )
virtual

Member Function Documentation

◆ allowDuplicateLabel()

template<class FeatureT >
virtual bool App::FeaturePythonT< FeatureT >::allowDuplicateLabel ( ) const
overridevirtual

◆ canLinkProperties()

template<class FeatureT >
virtual bool App::FeaturePythonT< FeatureT >::canLinkProperties ( ) const
overridevirtual

◆ canLoadPartial()

template<class FeatureT >
virtual int App::FeaturePythonT< FeatureT >::canLoadPartial ( ) const
overridevirtual

◆ execute()

◆ getLinkedObject()

template<class FeatureT >
virtual App::DocumentObject* App::FeaturePythonT< FeatureT >::getLinkedObject ( bool  recurse,
Base::Matrix4D mat,
bool  transform,
int  depth 
) const
overridevirtual

◆ getPyObject()

PyObject * App::FeaturePython::getPyObject ( void  )
override

◆ getSubObject()

template<class FeatureT >
virtual App::DocumentObject* App::FeaturePythonT< FeatureT >::getSubObject ( const char *  subname,
PyObject **  pyObj,
Base::Matrix4D mat,
bool  transform,
int  depth 
) const
overridevirtual

◆ getSubObjects()

template<class FeatureT >
virtual std::vector<std::string> App::FeaturePythonT< FeatureT >::getSubObjects ( int  reason = 0) const
overridevirtual

◆ getViewProviderName()

const char * App::PlacementPython::getViewProviderName ( void  ) const
overridevirtual

returns the type name of the ViewProvider

◆ getViewProviderNameOverride()

template<class FeatureT >
virtual const char* App::FeaturePythonT< FeatureT >::getViewProviderNameOverride ( void  ) const
overridevirtual

◆ hasChildElement()

template<class FeatureT >
virtual bool App::FeaturePythonT< FeatureT >::hasChildElement ( ) const
overridevirtual

return true to activate tree view group object handling

References App::FeaturePythonImp::Accepted, App::FeaturePythonImp::hasChildElement(), and App::FeaturePythonImp::Rejected.

◆ isElementVisible()

template<class FeatureT >
virtual int App::FeaturePythonT< FeatureT >::isElementVisible ( const char *  element) const
overridevirtual

Get sub-element visibility.

References App::FeaturePythonImp::isElementVisible().

◆ mustExecute()

template<class FeatureT >
short App::FeaturePythonT< FeatureT >::mustExecute ( void  ) const
override

◆ onBeforeChange()

template<class FeatureT >
virtual void App::FeaturePythonT< FeatureT >::onBeforeChange ( const Property prop)
overrideprotectedvirtual

◆ onBeforeChangeLabel()

template<class FeatureT >
virtual void App::FeaturePythonT< FeatureT >::onBeforeChangeLabel ( std::string &  newLabel)
overrideprotectedvirtual

◆ onChanged()

◆ onDocumentRestored()

template<class FeatureT >
virtual void App::FeaturePythonT< FeatureT >::onDocumentRestored ( )
overrideprotectedvirtual

◆ redirectSubName()

template<class FeatureT >
virtual bool App::FeaturePythonT< FeatureT >::redirectSubName ( std::ostringstream &  ss,
App::DocumentObject topParent,
App::DocumentObject child 
) const
overridevirtual

◆ setElementVisible()

template<class FeatureT >
virtual int App::FeaturePythonT< FeatureT >::setElementVisible ( const char *  element,
bool  visible 
)
overridevirtual

Set sub-element visibility.

References App::FeaturePythonImp::setElementVisible().

◆ setPyObject()

template<class FeatureT >
void App::FeaturePythonT< FeatureT >::setPyObject ( PyObject obj)
override

The documentation for this class was generated from the following files:
  • Sources/FreeCAD/src/App/FeaturePython.h
  • Sources/FreeCAD/src/App/FeaturePython.cpp
  • Sources/FreeCAD/src/App/Link.cpp
  • Sources/FreeCAD/src/App/Placement.cpp