#include <FeaturePython.h>
Public Types | |
enum | ValueT { NotImplemented = 0 , Accepted = 1 , Rejected = 2 } |
Public Member Functions | |
ValueT | allowDuplicateLabel () const |
ValueT | canLinkProperties () const |
int | canLoadPartial () const |
bool | execute () |
FeaturePythonImp (App::DocumentObject *) | |
bool | getLinkedObject (App::DocumentObject *&ret, bool recurse, Base::Matrix4D *mat, bool transform, int depth) const |
PyObject * | getPyObject (void) |
bool | getSubObject (App::DocumentObject *&ret, const char *subname, PyObject **pyObj, Base::Matrix4D *mat, bool transform, int depth) const |
bool | getSubObjects (std::vector< std::string > &ret, int reason) const |
std::string | getViewProviderName () |
ValueT | hasChildElement () const |
return true to activate tree view group object handling More... | |
void | init (PyObject *pyobj) |
int | isElementVisible (const char *) const |
Get sub-element visibility. More... | |
bool | mustExecute () const |
void | onBeforeChange (const Property *prop) |
bool | onBeforeChangeLabel (std::string &newLabel) |
void | onChanged (const Property *prop) |
void | onDocumentRestored () |
ValueT | redirectSubName (std::ostringstream &ss, App::DocumentObject *topParent, App::DocumentObject *child) const |
int | setElementVisible (const char *, bool) |
Set sub-element visibility. More... | |
~FeaturePythonImp () | |
Member Enumeration Documentation
◆ ValueT
Constructor & Destructor Documentation
◆ FeaturePythonImp()
FeaturePythonImp::FeaturePythonImp | ( | App::DocumentObject * | o | ) |
◆ ~FeaturePythonImp()
FeaturePythonImp::~FeaturePythonImp | ( | ) |
Member Function Documentation
◆ allowDuplicateLabel()
FeaturePythonImp::ValueT FeaturePythonImp::allowDuplicateLabel | ( | ) | const |
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
Referenced by App::FeaturePythonT< FeatureT >::allowDuplicateLabel().
◆ canLinkProperties()
FeaturePythonImp::ValueT FeaturePythonImp::canLinkProperties | ( | ) | const |
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
Referenced by App::FeaturePythonT< FeatureT >::canLinkProperties().
◆ canLoadPartial()
int FeaturePythonImp::canLoadPartial | ( | ) | const |
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::canLoadPartial().
◆ execute()
bool FeaturePythonImp::execute | ( | void | ) |
Calls the execute() method of the Python feature class. If the Python feature class doesn't have an execute() method or if it returns False this method also return false and true otherwise.
References Base::pyCall(), and Base::PyException::ThrowException().
Referenced by draftobjects.facebinder.Facebinder::addSubobjects(), PathScripts.PathDressupDogbone.ObjectDressup::boneStateList(), ArchSite.Compass::buildCoordinates(), App::FeaturePythonT< FeatureT >::execute(), PathScripts.PathDressupHoldingTags.ObjectTagDressup::generateTags(), ArchPanel.PanelCut::getWires(), ArchSchedule.CommandArchSchedule::IsActive(), Mod.PartDesign.Scripts.DistanceBolt.DistanceBolt::onChanged(), Mod.PartDesign.Scripts.Epitrochoid.Epitrochoid::onChanged(), Mod.PartDesign.Scripts.Parallelepiped.Parallelepiped::onChanged(), Mod.PartDesign.Scripts.Parallelepiped.BoxCylinder::onChanged(), Mod.PartDesign.Scripts.Spring.MySpring::onChanged(), FeaturePython.DistanceBolt::onChanged(), PathScripts.PathStock.StockFromBase::onChanged(), PathScripts.PathStock.StockCreateBox::onChanged(), PathScripts.PathStock.StockCreateCylinder::onChanged(), draftobjects.draftlink.DraftLink::onDocumentRestored(), draftobjects.patharray.PathArray::onDocumentRestored(), and draftobjects.pathtwistedarray.PathTwistedArray::onDocumentRestored().
◆ getLinkedObject()
bool FeaturePythonImp::getLinkedObject | ( | App::DocumentObject *& | ret, |
bool | recurse, | ||
Base::Matrix4D * | mat, | ||
bool | transform, | ||
int | depth | ||
) | const |
References Base::MatrixPy::getMatrixPtr(), Base::pyCall(), App::DocumentObjectPy::Type, and Base::MatrixPy::Type.
Referenced by App::FeaturePythonT< FeatureT >::getLinkedObject().
◆ getPyObject()
PyObject * FeaturePythonImp::getPyObject | ( | void | ) |
Referenced by App::FeaturePythonT< FeatureT >::getPyObject().
◆ getSubObject()
bool FeaturePythonImp::getSubObject | ( | App::DocumentObject *& | ret, |
const char * | subname, | ||
PyObject ** | pyObj, | ||
Base::Matrix4D * | mat, | ||
bool | transform, | ||
int | depth | ||
) | const |
References Base::MatrixPy::getMatrixPtr(), Base::pyCall(), App::DocumentObjectPy::Type, and Base::MatrixPy::Type.
Referenced by App::FeaturePythonT< FeatureT >::getSubObject().
◆ getSubObjects()
bool FeaturePythonImp::getSubObjects | ( | std::vector< std::string > & | ret, |
int | reason | ||
) | const |
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::getSubObjects().
◆ getViewProviderName()
std::string FeaturePythonImp::getViewProviderName | ( | void | ) |
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::getViewProviderNameOverride().
◆ hasChildElement()
FeaturePythonImp::ValueT FeaturePythonImp::hasChildElement | ( | ) | const |
return true to activate tree view group object handling
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
Referenced by App::FeaturePythonT< FeatureT >::hasChildElement().
◆ init()
void FeaturePythonImp::init | ( | PyObject * | pyobj | ) |
◆ isElementVisible()
int FeaturePythonImp::isElementVisible | ( | const char * | element | ) | const |
Get sub-element visibility.
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::isElementVisible().
◆ mustExecute()
bool FeaturePythonImp::mustExecute | ( | void | ) | const |
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::mustExecute().
◆ onBeforeChange()
void FeaturePythonImp::onBeforeChange | ( | const Property * | prop | ) |
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::onBeforeChange(), and PathScripts.PathGui.QuantitySpinBox::updateProperty().
◆ onBeforeChangeLabel()
bool FeaturePythonImp::onBeforeChangeLabel | ( | std::string & | newLabel | ) |
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::onBeforeChangeLabel().
◆ onChanged()
void FeaturePythonImp::onChanged | ( | const Property * | prop | ) |
References Base::pyCall().
Referenced by draftviewproviders.view_base.ViewProviderDraft::attach(), ArchSite.Compass::buildCoordinates(), draftobjects.wire.Wire::execute(), ArchAxis.CommandArchGrid::IsActive(), App::FeaturePythonT< FeatureT >::onChanged(), ArchBuildingPart.ViewProviderBuildingPart::updateData(), ArchPanel.ViewProviderPanelCut::updateData(), ArchPanel.ViewProviderPanelSheet::updateData(), draftviewproviders.view_label.ViewProviderLabel::updateData(), draftviewproviders.view_layer.ViewProviderLayer::updateData(), and draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy::updateData().
◆ onDocumentRestored()
void FeaturePythonImp::onDocumentRestored | ( | ) |
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::onDocumentRestored().
◆ redirectSubName()
FeaturePythonImp::ValueT FeaturePythonImp::redirectSubName | ( | std::ostringstream & | ss, |
App::DocumentObject * | topParent, | ||
App::DocumentObject * | child | ||
) | const |
References Accepted, App::DocumentObject::getPyObject(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by App::FeaturePythonT< FeatureT >::redirectSubName().
◆ setElementVisible()
int FeaturePythonImp::setElementVisible | ( | const char * | element, |
bool | visible | ||
) |
Set sub-element visibility.
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::setElementVisible().
The documentation for this class was generated from the following files:
- Sources/FreeCAD/src/App/FeaturePython.h
- Sources/FreeCAD/src/App/FeaturePython.cpp