#include <ViewProviderPythonFeature.h>
Public Types | |
enum | ValueT { NotImplemented = 0 , Accepted = 1 , Rejected = 2 } |
Public Member Functions | |
bool | claimChildren (std::vector< App::DocumentObject * > &) const |
ValueT | doubleClicked (void) |
bool | getDetail (const char *, SoDetail *&det) const |
ValueT | getDetailPath (const char *name, SoFullPath *path, bool append, SoDetail *&det) const |
bool | getElement (const SoDetail *det, std::string &) const |
ValueT | getElementPicked (const SoPickedPoint *pp, std::string &subname) const |
QIcon | getIcon () const |
std::vector< Base::Vector3d > | getSelectionShape (const char *Element) const |
ValueT | setEdit (int ModNum) |
ValueT | setEditViewer (View3DInventorViewer *, int ModNum) |
bool | setupContextMenu (QMenu *menu) |
ValueT | unsetEdit (int ModNum) |
ValueT | unsetEditViewer (View3DInventorViewer *) |
ValueT | useNewSelectionModel () const |
ViewProviderPythonFeatureImp (ViewProviderDocumentObject *, App::PropertyPythonObject &) | |
constructor. More... | |
~ViewProviderPythonFeatureImp () | |
destructor. More... | |
Update data methods | |
void | attach (App::DocumentObject *pcObject) |
void | updateData (const App::Property *) |
void | onChanged (const App::Property *prop) |
void | startRestoring () |
void | finishRestoring () |
ValueT | onDelete (const std::vector< std::string > &sub) |
ValueT | canDelete (App::DocumentObject *obj) const |
Display methods | |
ValueT | isShow () const |
Returns true if the icon must always appear enabled in the tree view. More... | |
bool | getDefaultDisplayMode (std::string &mode) const |
get the default display mode More... | |
std::vector< std::string > | getDisplayModes (void) const |
returns a list of all possible modes More... | |
std::string | setDisplayMode (const char *ModeName) |
set the display mode More... | |
ValueT | canRemoveChildrenFromRoot () const |
Drag and drop | |
ValueT | canDragObjects () const |
Returns true if the view provider generally supports dragging objects. More... | |
ValueT | canDragObject (App::DocumentObject *) const |
Check whether the object can be removed from the view provider by drag and drop. More... | |
ValueT | dragObject (App::DocumentObject *) |
Starts to drag the object. More... | |
ValueT | canDropObjects () const |
Returns true if the view provider generally accepts dropping of objects. More... | |
ValueT | canDropObject (App::DocumentObject *) const |
Check whether the object can be dropped to the view provider by drag and drop. More... | |
ValueT | dropObject (App::DocumentObject *) |
If the dropped object type is accepted the object will be added as child. More... | |
ValueT | canDragAndDropObject (App::DocumentObject *) const |
Return false to force drop only operation for a give object. More... | |
ValueT | canDropObjectEx (App::DocumentObject *obj, App::DocumentObject *, const char *, const std::vector< std::string > &elements) const |
Query object dropping with full qualified name. More... | |
bool | dropObjectEx (App::DocumentObject *obj, App::DocumentObject *, const char *, const std::vector< std::string > &elements, std::string &ret) |
Add an object with full qualified name to the view provider by drag and drop. More... | |
ValueT | replaceObject (App::DocumentObject *, App::DocumentObject *) |
bool | getLinkedViewProvider (ViewProviderDocumentObject *&res, std::string *subname, bool recursive) const |
ValueT | canAddToSceneGraph () const |
bool | getDropPrefix (std::string &prefix) const |
bool | editProperty (const char *propName) |
void | init (PyObject *pyobj) |
ViewProviderPythonFeatureImp::ViewProviderPythonFeatureImp | ( | ViewProviderDocumentObject * | vp, |
App::PropertyPythonObject & | proxy | ||
) |
constructor.
ViewProviderPythonFeatureImp::~ViewProviderPythonFeatureImp | ( | ) |
destructor.
void ViewProviderPythonFeatureImp::attach | ( | App::DocumentObject * | pcObject | ) |
References attach(), App::DocumentObject::Label, Base::pyCall(), and App::Property::touch().
Referenced by attach(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::onChanged().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canAddToSceneGraph | ( | ) | const |
References Accepted, canAddToSceneGraph(), NotImplemented, and Rejected.
Referenced by canAddToSceneGraph(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::canAddToSceneGraph().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canDelete | ( | App::DocumentObject * | obj | ) | const |
References Accepted, canDelete(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by canDelete(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDelete().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canDragAndDropObject | ( | App::DocumentObject * | obj | ) | const |
Return false to force drop only operation for a give object.
References Accepted, canDragAndDropObject(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by canDragAndDropObject(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDragAndDropObject().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canDragObject | ( | App::DocumentObject * | obj | ) | const |
Check whether the object can be removed from the view provider by drag and drop.
References Accepted, canDragObject(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by canDragObject(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDragObject().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canDragObjects | ( | ) | const |
Returns true if the view provider generally supports dragging objects.
References Accepted, canDragObjects(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by canDragObjects(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDragObjects().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canDropObject | ( | App::DocumentObject * | obj | ) | const |
Check whether the object can be dropped to the view provider by drag and drop.
References Accepted, canDropObject(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by canDropObject(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDropObject().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canDropObjectEx | ( | App::DocumentObject * | obj, |
App::DocumentObject * | owner, | ||
const char * | subname, | ||
const std::vector< std::string > & | elements | ||
) | const |
Query object dropping with full qualified name.
References Accepted, canDropObjectEx(), App::DocumentObject::getPyObject(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by canDropObjectEx(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDropObjectEx().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canDropObjects | ( | ) | const |
Returns true if the view provider generally accepts dropping of objects.
References Accepted, canDropObjects(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by canDropObjects(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDropObjects().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canRemoveChildrenFromRoot | ( | ) | const |
References Accepted, canRemoveChildrenFromRoot(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by canRemoveChildrenFromRoot(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::canRemoveChildrenFromRoot().
bool ViewProviderPythonFeatureImp::claimChildren | ( | std::vector< App::DocumentObject * > & | children | ) | const |
References claimChildren(), and Base::pyCall().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::claimChildren(), claimChildren(), femviewprovider.view_mesh_gmsh.VPMeshGmsh::onDelete(), femviewprovider.view_result_mechanical.VPResultMechanical::onDelete(), BOPTools.JoinFeatures.ViewProviderConnect::onDelete(), BOPTools.SplitFeatures.ViewProviderBooleanFragments::onDelete(), BOPTools.SplitFeatures.ViewProviderSlice::onDelete(), and BOPTools.SplitFeatures.ViewProviderXOR::onDelete().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::doubleClicked | ( | void | ) |
References Accepted, doubleClicked(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by doubleClicked(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::doubleClicked().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::dragObject | ( | App::DocumentObject * | obj | ) |
Starts to drag the object.
References Accepted, dragObject(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by dragObject(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::dragObject().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::dropObject | ( | App::DocumentObject * | obj | ) |
If the dropped object type is accepted the object will be added as child.
References Accepted, dropObject(), NotImplemented, Base::pyCall(), Rejected, and Base::PyException::ThrowException().
Referenced by dropObject(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::dropObject().
bool ViewProviderPythonFeatureImp::dropObjectEx | ( | App::DocumentObject * | obj, |
App::DocumentObject * | owner, | ||
const char * | subname, | ||
const std::vector< std::string > & | elements, | ||
std::string & | ret | ||
) |
Add an object with full qualified name to the view provider by drag and drop.
References dropObjectEx(), App::DocumentObject::getPyObject(), Base::pyCall(), and Base::PyException::ThrowException().
Referenced by dropObjectEx(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::dropObjectEx().
bool ViewProviderPythonFeatureImp::editProperty | ( | const char * | propName | ) |
References editProperty(), and Base::pyCall().
Referenced by editProperty(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::editProperty().
void ViewProviderPythonFeatureImp::finishRestoring | ( | ) |
bool ViewProviderPythonFeatureImp::getDefaultDisplayMode | ( | std::string & | mode | ) | const |
get the default display mode
References getDefaultDisplayMode(), and Base::pyCall().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::getDefaultDisplayMode(), and getDefaultDisplayMode().
bool ViewProviderPythonFeatureImp::getDetail | ( | const char * | name, |
SoDetail *& | det | ||
) | const |
References Base::InterpreterSingleton::convertSWIGPointerObj(), getDetail(), Base::Interpreter(), and Base::pyCall().
Referenced by getDetail(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::getDetail().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::getDetailPath | ( | const char * | name, |
SoFullPath * | path, | ||
bool | append, | ||
SoDetail *& | det | ||
) | const |
References Accepted, Base::InterpreterSingleton::convertSWIGPointerObj(), Base::InterpreterSingleton::createSWIGPointerObj(), getDetailPath(), Base::Interpreter(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by getDetailPath(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::getDetailPath().
std::vector< std::string > ViewProviderPythonFeatureImp::getDisplayModes | ( | void | ) | const |
returns a list of all possible modes
References getDisplayModes(), and Base::pyCall().
Referenced by getDisplayModes(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::getDisplayModes().
bool ViewProviderPythonFeatureImp::getDropPrefix | ( | std::string & | prefix | ) | const |
References getDropPrefix(), and Base::pyCall().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::getDropPrefix(), and getDropPrefix().
bool ViewProviderPythonFeatureImp::getElement | ( | const SoDetail * | det, |
std::string & | res | ||
) | const |
References Base::InterpreterSingleton::createSWIGPointerObj(), getElement(), Base::Interpreter(), and Base::pyCall().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::getElement(), and getElement().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::getElementPicked | ( | const SoPickedPoint * | pp, |
std::string & | subname | ||
) | const |
QIcon ViewProviderPythonFeatureImp::getIcon | ( | void | ) | const |
References Gui::BitmapFactory(), getIcon(), Gui::PythonWrapper::loadGuiModule(), Gui::PythonWrapper::loadWidgetsModule(), Base::pyCall(), and Gui::PythonWrapper::toQIcon().
Referenced by getIcon(), Gui::ViewProviderPythonFeatureT< ViewProviderT >::getIcon(), ArchAxisSystem.AxisSystemTaskPanel::update(), ArchComponent.ComponentTaskPanel::update(), and ArchSectionPlane.SectionPlaneTaskPanel::update().
bool ViewProviderPythonFeatureImp::getLinkedViewProvider | ( | ViewProviderDocumentObject *& | res, |
std::string * | subname, | ||
bool | recursive | ||
) | const |
References getLinkedViewProvider(), and Base::pyCall().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::getLinkedViewProvider(), and getLinkedViewProvider().
std::vector< Base::Vector3d > ViewProviderPythonFeatureImp::getSelectionShape | ( | const char * | Element | ) | const |
void ViewProviderPythonFeatureImp::init | ( | PyObject * | pyobj | ) |
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::isShow | ( | void | ) | const |
Returns true if the icon must always appear enabled in the tree view.
References Accepted, isShow(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by isShow(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::isShow().
void ViewProviderPythonFeatureImp::onChanged | ( | const App::Property * | prop | ) |
References Base::pyCall().
Referenced by ArchStructure.CommandStructuralSystem::Activated(), draftviewproviders.view_base.ViewProviderDraft::attach(), ArchSite.Compass::buildCoordinates(), draftobjects.wire.Wire::execute(), Gui::ViewProviderPythonFeatureT< ViewProviderT >::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().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::onDelete | ( | const std::vector< std::string > & | sub | ) |
References Accepted, NotImplemented, onDelete(), Base::pyCall(), and Rejected.
Referenced by onDelete(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::onDelete().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::replaceObject | ( | App::DocumentObject * | oldObj, |
App::DocumentObject * | newObj | ||
) |
std::string ViewProviderPythonFeatureImp::setDisplayMode | ( | const char * | ModeName | ) |
set the display mode
References Base::pyCall(), and setDisplayMode().
Referenced by setDisplayMode(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::setDisplayMode().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::setEdit | ( | int | ModNum | ) |
References Accepted, NotImplemented, Base::pyCall(), Rejected, and setEdit().
Referenced by ArchGrid.ViewProviderArchGrid::doubleClicked(), ArchReference.ViewProviderArchReference::doubleClicked(), draftviewproviders.view_dimension.ViewProviderDimensionBase::doubleClicked(), draftviewproviders.view_hatch.ViewProviderDraftHatch::doubleClicked(), draftviewproviders.view_text.ViewProviderText::doubleClicked(), PathScripts.PathPropertyBagGui.ViewProvider::doubleClicked(), PathScripts.PathSetupSheetGui.ViewProvider::doubleClicked(), PathScripts.PathToolBitGui.ViewProvider::doubleClicked(), Spreadsheet_legacy.ViewProviderSpreadsheet::doubleClicked(), ArchSchedule.CommandArchSchedule::IsActive(), setEdit(), Gui::ViewProviderPythonFeatureT< ViewProviderT >::setEdit(), PathScripts.PathIconViewProvider.ViewProvider::setupContextMenu(), PathScripts.PathJobGui.ViewProvider::setupContextMenu(), PathScripts.PathOpGui.ViewProvider::setupContextMenu(), and PathScripts.PathToolControllerGui.ViewProvider::setupContextMenu().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::setEditViewer | ( | View3DInventorViewer * | viewer, |
int | ModNum | ||
) |
References Accepted, NotImplemented, Base::pyCall(), Rejected, setEditViewer(), and OfflineRenderingUtils::viewer().
Referenced by setEditViewer(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::setEditViewer().
void ViewProviderPythonFeatureImp::startRestoring | ( | ) |
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::unsetEdit | ( | int | ModNum | ) |
References Accepted, NotImplemented, Base::pyCall(), Rejected, and unsetEdit().
Referenced by PathScripts.PathJobGui.ViewProvider::uneditObject(), unsetEdit(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::unsetEdit().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::unsetEditViewer | ( | View3DInventorViewer * | viewer | ) |
References Accepted, NotImplemented, Base::pyCall(), Rejected, unsetEditViewer(), and OfflineRenderingUtils::viewer().
Referenced by unsetEditViewer(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::unsetEditViewer().
void ViewProviderPythonFeatureImp::updateData | ( | const App::Property * | prop | ) |
References Base::pyCall().
Referenced by ArchStructure.CommandStructuralSystem::Activated(), PathScripts.PathJobDlg.JobCreate::exec_(), draftviewproviders.view_dimension.ViewProviderLinearDimension::onChanged(), draftviewproviders.view_dimension.ViewProviderAngularDimension::onChanged(), draftviewproviders.view_wire.ViewProviderWire::onChanged(), PathScripts.PathOpGui.TaskPanelPage::pageUpdateData(), PathScripts.PathPropertyBagGui.TaskPanel::setupUi(), PathScripts.PathSetupSheetGui.OpTaskPanel::setupUi(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::updateData().
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::useNewSelectionModel | ( | void | ) | const |
References Accepted, NotImplemented, Rejected, and useNewSelectionModel().
Referenced by useNewSelectionModel(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::useNewSelectionModel().