#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.
◆ canLinkProperties()
FeaturePythonImp::ValueT FeaturePythonImp::canLinkProperties | ( | ) | const |
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
◆ canLoadPartial()
int FeaturePythonImp::canLoadPartial | ( | ) | const |
References Base::pyCall().
◆ execute()
bool FeaturePythonImp::execute | ( | ) |
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 >::FeaturePythonT(), PathScripts.PathDressupHoldingTags.ObjectTagDressup::generateTags(), ArchPanel.PanelCut::getWires(), ArchSchedule.CommandArchSchedule::IsActive(), Mod.PartDesign.Scripts.Spring.MySpring::onChanged(), Mod.PartDesign.Scripts.Epitrochoid.Epitrochoid::onChanged(), Mod.PartDesign.Scripts.Parallelepiped.Parallelepiped::onChanged(), Mod.PartDesign.Scripts.DistanceBolt.DistanceBolt::onChanged(), Mod.PartDesign.Scripts.Parallelepiped.BoxCylinder::onChanged(), PathScripts.PathStock.StockFromBase::onChanged(), PathScripts.PathStock.StockCreateBox::onChanged(), PathScripts.PathStock.StockCreateCylinder::onChanged(), FeaturePython.DistanceBolt::onChanged(), draftobjects.draftlink.DraftLink::onDocumentRestored(), and draftobjects.patharray.PathArray::onDocumentRestored().
◆ getLinkedObject()
bool FeaturePythonImp::getLinkedObject | ( | App::DocumentObject *& | ret, |
bool | recurse, | ||
Base::Matrix4D * | mat, | ||
bool | transform, | ||
int | depth | ||
) | const |
◆ getPyObject()
PyObject * FeaturePythonImp::getPyObject | ( | void | ) |
Referenced by App::FeaturePythonT< FeatureT >::redirectSubName().
◆ getSubObject()
bool FeaturePythonImp::getSubObject | ( | App::DocumentObject *& | ret, |
const char * | subname, | ||
PyObject ** | pyObj, | ||
Base::Matrix4D * | mat, | ||
bool | transform, | ||
int | depth | ||
) | const |
◆ getSubObjects()
bool FeaturePythonImp::getSubObjects | ( | std::vector< std::string > & | ret, |
int | reason | ||
) | const |
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::getViewProviderNameOverride().
◆ getViewProviderName()
std::string FeaturePythonImp::getViewProviderName | ( | ) |
References Base::pyCall().
◆ hasChildElement()
FeaturePythonImp::ValueT FeaturePythonImp::hasChildElement | ( | ) | const |
return true to activate tree view group object handling
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
◆ init()
void FeaturePythonImp::init | ( | PyObject * | pyobj | ) |
Referenced by DocumentObject.DocumentObject::onChanged().
◆ isElementVisible()
int FeaturePythonImp::isElementVisible | ( | const char * | element | ) | const |
Get sub-element visibility.
References Base::pyCall().
◆ mustExecute()
bool FeaturePythonImp::mustExecute | ( | ) | const |
References Base::pyCall().
◆ onBeforeChange()
void FeaturePythonImp::onBeforeChange | ( | const Property * | prop | ) |
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::canLoadPartial().
◆ onBeforeChangeLabel()
bool FeaturePythonImp::onBeforeChangeLabel | ( | std::string & | newLabel | ) |
References Base::pyCall().
◆ 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(), draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy::updateData(), draftviewproviders.view_label.ViewProviderLabel::updateData(), DraftLayer.ViewProviderLayer::updateData(), ArchBuildingPart.ViewProviderBuildingPart::updateData(), ArchPanel.ViewProviderPanelCut::updateData(), and ArchPanel.ViewProviderPanelSheet::updateData().
◆ onDocumentRestored()
void FeaturePythonImp::onDocumentRestored | ( | ) |
References Base::pyCall().
◆ 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.
◆ setElementVisible()
int FeaturePythonImp::setElementVisible | ( | const char * | element, |
bool | visible | ||
) |
Set sub-element visibility.
References Base::pyCall().
The documentation for this class was generated from the following files:
- src/App/FeaturePython.h
- src/App/FeaturePython.cpp