#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 | editProperty (const char *propName) |
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 () | |
FeaturePythonImp::FeaturePythonImp | ( | App::DocumentObject * | o | ) |
FeaturePythonImp::~FeaturePythonImp | ( | ) |
FeaturePythonImp::ValueT FeaturePythonImp::allowDuplicateLabel | ( | ) | const |
References Accepted, allowDuplicateLabel(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by allowDuplicateLabel(), and App::FeaturePythonT< FeatureT >::allowDuplicateLabel().
FeaturePythonImp::ValueT FeaturePythonImp::canLinkProperties | ( | ) | const |
References Accepted, canLinkProperties(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by canLinkProperties(), and App::FeaturePythonT< FeatureT >::canLinkProperties().
int FeaturePythonImp::canLoadPartial | ( | ) | const |
References canLoadPartial(), and Base::pyCall().
Referenced by canLoadPartial(), and App::FeaturePythonT< FeatureT >::canLoadPartial().
bool FeaturePythonImp::editProperty | ( | const char * | propName | ) |
References editProperty(), and Base::pyCall().
Referenced by editProperty(), and App::FeaturePythonT< FeatureT >::editProperty().
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 execute(), Base::pyCall(), and Base::PyException::ThrowException().
Referenced by draftobjects.facebinder.Facebinder::addSubobjects(), PathScripts.PathDressupDogbone.ObjectDressup::boneStateList(), ArchSite.Compass::buildCoordinates(), execute(), 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().
bool FeaturePythonImp::getLinkedObject | ( | App::DocumentObject *& | ret, |
bool | recurse, | ||
Base::Matrix4D * | mat, | ||
bool | transform, | ||
int | depth | ||
) | const |
References getLinkedObject(), and Base::pyCall().
Referenced by getLinkedObject(), and App::FeaturePythonT< FeatureT >::getLinkedObject().
PyObject * FeaturePythonImp::getPyObject | ( | void | ) |
Referenced by App::FeaturePythonT< FeatureT >::getPyObject().
bool FeaturePythonImp::getSubObject | ( | App::DocumentObject *& | ret, |
const char * | subname, | ||
PyObject ** | pyObj, | ||
Base::Matrix4D * | mat, | ||
bool | transform, | ||
int | depth | ||
) | const |
References getSubObject(), and Base::pyCall().
Referenced by getSubObject(), and App::FeaturePythonT< FeatureT >::getSubObject().
References getSubObjects(), and Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::getSubObjects(), and getSubObjects().
std::string FeaturePythonImp::getViewProviderName | ( | void | ) |
References getViewProviderName(), and Base::pyCall().
Referenced by getViewProviderName(), and App::FeaturePythonT< FeatureT >::getViewProviderNameOverride().
FeaturePythonImp::ValueT FeaturePythonImp::hasChildElement | ( | ) | const |
return true to activate tree view group object handling
References Accepted, hasChildElement(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by hasChildElement(), and App::FeaturePythonT< FeatureT >::hasChildElement().
void FeaturePythonImp::init | ( | PyObject * | pyobj | ) |
int FeaturePythonImp::isElementVisible | ( | const char * | element | ) | const |
Get sub-element visibility.
References isElementVisible(), and Base::pyCall().
Referenced by isElementVisible(), and App::FeaturePythonT< FeatureT >::isElementVisible().
bool FeaturePythonImp::mustExecute | ( | void | ) | const |
References mustExecute(), and Base::pyCall().
Referenced by mustExecute(), and App::FeaturePythonT< FeatureT >::mustExecute().
void FeaturePythonImp::onBeforeChange | ( | const Property * | prop | ) |
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::onBeforeChange(), and PathScripts.PathGui.QuantitySpinBox::updateProperty().
bool FeaturePythonImp::onBeforeChangeLabel | ( | std::string & | newLabel | ) |
References Base::pyCall().
Referenced by App::FeaturePythonT< FeatureT >::onBeforeChangeLabel().
void FeaturePythonImp::onChanged | ( | const Property * | prop | ) |
References Base::pyCall().
Referenced by ArchStructure.CommandStructuralSystem::Activated(), draftviewproviders.view_base.ViewProviderDraft::attach(), ArchSite.Compass::buildCoordinates(), draftobjects.wire.Wire::execute(), 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().
void FeaturePythonImp::onDocumentRestored | ( | ) |
References onDocumentRestored(), and Base::pyCall().
Referenced by onDocumentRestored(), and App::FeaturePythonT< FeatureT >::onDocumentRestored().
FeaturePythonImp::ValueT FeaturePythonImp::redirectSubName | ( | std::ostringstream & | ss, |
App::DocumentObject * | topParent, | ||
App::DocumentObject * | child | ||
) | const |
References Accepted, App::DocumentObject::getPyObject(), NotImplemented, Base::pyCall(), redirectSubName(), and Rejected.
Referenced by redirectSubName(), and App::FeaturePythonT< FeatureT >::redirectSubName().
Set sub-element visibility.
References Base::pyCall(), and setElementVisible().
Referenced by setElementVisible(), and App::FeaturePythonT< FeatureT >::setElementVisible().