#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 quanlified 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 quanlified 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 |
void | init (PyObject *pyobj) |
Member Enumeration Documentation
◆ ValueT
Constructor & Destructor Documentation
◆ ViewProviderPythonFeatureImp()
ViewProviderPythonFeatureImp::ViewProviderPythonFeatureImp | ( | ViewProviderDocumentObject * | vp, |
App::PropertyPythonObject & | proxy | ||
) |
constructor.
◆ ~ViewProviderPythonFeatureImp()
ViewProviderPythonFeatureImp::~ViewProviderPythonFeatureImp | ( | ) |
destructor.
Member Function Documentation
◆ attach()
void ViewProviderPythonFeatureImp::attach | ( | App::DocumentObject * | pcObject | ) |
References App::DocumentObject::Label, Base::pyCall(), and App::Property::touch().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::onChanged().
◆ canAddToSceneGraph()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canAddToSceneGraph | ( | ) | const |
References Accepted, NotImplemented, and Rejected.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::canAddToSceneGraph(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::onChanged().
◆ canDelete()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canDelete | ( | App::DocumentObject * | obj | ) | const |
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDelete().
◆ canDragAndDropObject()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canDragAndDropObject | ( | App::DocumentObject * | obj | ) | const |
Return false to force drop only operation for a give object.
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDragAndDropObject().
◆ canDragObject()
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, NotImplemented, Base::pyCall(), and Rejected.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDragObject().
◆ canDragObjects()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canDragObjects | ( | ) | const |
Returns true if the view provider generally supports dragging objects.
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
◆ canDropObject()
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, NotImplemented, Base::pyCall(), and Rejected.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDropObject().
◆ canDropObjectEx()
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 quanlified name.
References Accepted, App::DocumentObject::getPyObject(), NotImplemented, Base::pyCall(), and Rejected.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDropObjectEx().
◆ canDropObjects()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canDropObjects | ( | ) | const |
Returns true if the view provider generally accepts dropping of objects.
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDropObjects().
◆ canRemoveChildrenFromRoot()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canRemoveChildrenFromRoot | ( | ) | const |
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::canRemoveChildrenFromRoot().
◆ claimChildren()
bool ViewProviderPythonFeatureImp::claimChildren | ( | std::vector< App::DocumentObject * > & | children | ) | const |
References Base::pyCall(), and App::DocumentObjectPy::Type.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::claimChildren(), femviewprovider.view_result_mechanical.VPResultMechanical::onDelete(), BOPTools.SplitFeatures.ViewProviderBooleanFragments::onDelete(), BOPTools.JoinFeatures.ViewProviderConnect::onDelete(), femviewprovider.view_mesh_gmsh.VPMeshGmsh::onDelete(), BOPTools.SplitFeatures.ViewProviderSlice::onDelete(), and BOPTools.SplitFeatures.ViewProviderXOR::onDelete().
◆ doubleClicked()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::doubleClicked | ( | void | ) |
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::doubleClicked().
◆ dragObject()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::dragObject | ( | App::DocumentObject * | obj | ) |
Starts to drag the object.
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::dragObject().
◆ dropObject()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::dropObject | ( | App::DocumentObject * | obj | ) |
If the dropped object type is accepted the object will be added as child.
References Accepted, NotImplemented, Base::pyCall(), Rejected, and Base::PyException::ThrowException().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::dropObject().
◆ dropObjectEx()
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 quanlified name to the view provider by drag and drop.
References App::DocumentObject::getPyObject(), Base::pyCall(), and Base::PyException::ThrowException().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::dropObjectEx().
◆ finishRestoring()
void ViewProviderPythonFeatureImp::finishRestoring | ( | ) |
◆ getDefaultDisplayMode()
bool ViewProviderPythonFeatureImp::getDefaultDisplayMode | ( | std::string & | mode | ) | const |
get the default display mode
References Base::pyCall().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::getDefaultDisplayMode().
◆ getDetail()
bool ViewProviderPythonFeatureImp::getDetail | ( | const char * | name, |
SoDetail *& | det | ||
) | const |
◆ getDetailPath()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::getDetailPath | ( | const char * | name, |
SoFullPath * | path, | ||
bool | append, | ||
SoDetail *& | det | ||
) | const |
◆ getDisplayModes()
std::vector< std::string > ViewProviderPythonFeatureImp::getDisplayModes | ( | void | ) | const |
returns a list of all possible modes
References Base::pyCall().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::getDisplayModes().
◆ getDropPrefix()
bool ViewProviderPythonFeatureImp::getDropPrefix | ( | std::string & | prefix | ) | const |
References Base::pyCall().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::getDropPrefix().
◆ getElement()
bool ViewProviderPythonFeatureImp::getElement | ( | const SoDetail * | det, |
std::string & | res | ||
) | const |
◆ getElementPicked()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::getElementPicked | ( | const SoPickedPoint * | pp, |
std::string & | subname | ||
) | const |
◆ getIcon()
QIcon ViewProviderPythonFeatureImp::getIcon | ( | ) | const |
References Gui::BitmapFactory(), Gui::PythonWrapper::loadGuiModule(), Gui::PythonWrapper::loadWidgetsModule(), Base::pyCall(), and Gui::PythonWrapper::toQIcon().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::getIcon(), ArchAxis.AxisSystemTaskPanel::update(), ArchSectionPlane.SectionPlaneTaskPanel::update(), and ArchComponent.ComponentTaskPanel::update().
◆ getLinkedViewProvider()
bool ViewProviderPythonFeatureImp::getLinkedViewProvider | ( | ViewProviderDocumentObject *& | res, |
std::string * | subname, | ||
bool | recursive | ||
) | const |
References Base::pyCall(), and Gui::ViewProviderDocumentObjectPy::Type.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::getLinkedViewProvider().
◆ getSelectionShape()
std::vector< Base::Vector3d > ViewProviderPythonFeatureImp::getSelectionShape | ( | const char * | Element | ) | const |
◆ init()
void ViewProviderPythonFeatureImp::init | ( | PyObject * | pyobj | ) |
◆ isShow()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::isShow | ( | ) | const |
Returns true if the icon must always appear enabled in the tree view.
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
◆ onChanged()
void ViewProviderPythonFeatureImp::onChanged | ( | const App::Property * | prop | ) |
References Base::pyCall().
Referenced by draftviewproviders.view_base.ViewProviderDraft::attach(), ArchSite.Compass::buildCoordinates(), draftobjects.wire.Wire::execute(), ArchAxis.CommandArchGrid::IsActive(), Gui::ViewProviderPythonFeatureT< ViewProviderT >::onChanged(), draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy::updateData(), draftviewproviders.view_label.ViewProviderLabel::updateData(), DraftLayer.ViewProviderLayer::updateData(), ArchBuildingPart.ViewProviderBuildingPart::updateData(), ArchPanel.ViewProviderPanelCut::updateData(), and ArchPanel.ViewProviderPanelSheet::updateData().
◆ onDelete()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::onDelete | ( | const std::vector< std::string > & | sub | ) |
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::onDelete().
◆ replaceObject()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::replaceObject | ( | App::DocumentObject * | oldObj, |
App::DocumentObject * | newObj | ||
) |
◆ setDisplayMode()
std::string ViewProviderPythonFeatureImp::setDisplayMode | ( | const char * | ModeName | ) |
set the display mode
References Base::pyCall().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::setDisplayMode().
◆ setEdit()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::setEdit | ( | int | ModNum | ) |
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
Referenced by PathScripts.PathSetupSheetGui.ViewProvider::doubleClicked(), PathScripts.PathToolBitGui.ViewProvider::doubleClicked(), ArchReference.ViewProviderArchReference::doubleClicked(), Spreadsheet_legacy.ViewProviderSpreadsheet::doubleClicked(), ArchAxis.ViewProviderArchGrid::doubleClicked(), ArchSchedule.CommandArchSchedule::IsActive(), ArchAxis.CommandArchGrid::IsActive(), Gui::ViewProviderPythonFeatureT< ViewProviderT >::setEdit(), PathScripts.PathIconViewProvider.ViewProvider::setupContextMenu(), PathScripts.PathToolControllerGui.ViewProvider::setupContextMenu(), PathScripts.PathOpGui.ViewProvider::setupContextMenu(), and PathScripts.PathJobGui.ViewProvider::setupContextMenu().
◆ setEditViewer()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::setEditViewer | ( | View3DInventorViewer * | viewer, |
int | ModNum | ||
) |
References Accepted, NotImplemented, Base::pyCall(), Rejected, and OfflineRenderingUtils::viewer().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::setEditViewer().
◆ setupContextMenu()
◆ startRestoring()
void ViewProviderPythonFeatureImp::startRestoring | ( | ) |
◆ unsetEdit()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::unsetEdit | ( | int | ModNum | ) |
References Accepted, NotImplemented, Base::pyCall(), and Rejected.
Referenced by PathScripts.PathJobGui.ViewProvider::uneditObject(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::unsetEdit().
◆ unsetEditViewer()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::unsetEditViewer | ( | View3DInventorViewer * | viewer | ) |
References Accepted, NotImplemented, Base::pyCall(), Rejected, and OfflineRenderingUtils::viewer().
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::unsetEditViewer().
◆ updateData()
void ViewProviderPythonFeatureImp::updateData | ( | const App::Property * | prop | ) |
References Base::pyCall().
Referenced by PathScripts.PathJobDlg.JobCreate::exec_(), draftviewproviders.view_wire.ViewProviderWire::onChanged(), draftviewproviders.view_dimension.ViewProviderLinearDimension::onChanged(), draftviewproviders.view_dimension.ViewProviderAngularDimension::onChanged(), PathScripts.PathOpGui.TaskPanelPage::pageUpdateData(), PathScripts.PathSetupSheetGui.OpTaskPanel::setupUi(), and Gui::ViewProviderPythonFeatureT< ViewProviderT >::updateData().
◆ useNewSelectionModel()
ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::useNewSelectionModel | ( | ) | const |
References Accepted, NotImplemented, and Rejected.
Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::useNewSelectionModel().
The documentation for this class was generated from the following files:
- src/Gui/ViewProviderPythonFeature.h
- src/Gui/ViewProviderPythonFeature.cpp