Gui::ViewProviderPythonFeatureImp Class Reference

#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::Vector3dgetSelectionShape (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
 
void init (PyObject *pyobj)
 

Member Enumeration Documentation

◆ ValueT

Enumerator
NotImplemented 
Accepted 
Rejected 

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)

◆ canAddToSceneGraph()

ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::canAddToSceneGraph ( ) const

◆ 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.

Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::canDragObjects().

◆ 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

◆ 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

◆ claimChildren()

◆ doubleClicked()

◆ dragObject()

ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::dragObject ( App::DocumentObject obj)

◆ 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 qualified 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()

◆ 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()

◆ 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

◆ getElement()

bool ViewProviderPythonFeatureImp::getElement ( const SoDetail *  det,
std::string &  res 
) const

◆ getElementPicked()

ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::getElementPicked ( const SoPickedPoint *  pp,
std::string &  subname 
) const

◆ getIcon()

◆ getLinkedViewProvider()

bool ViewProviderPythonFeatureImp::getLinkedViewProvider ( ViewProviderDocumentObject *&  res,
std::string *  subname,
bool  recursive 
) const

◆ getSelectionShape()

std::vector< Base::Vector3d > ViewProviderPythonFeatureImp::getSelectionShape ( const char *  Element) const

◆ init()

void ViewProviderPythonFeatureImp::init ( PyObject pyobj)

◆ isShow()

ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::isShow ( void  ) const

Returns true if the icon must always appear enabled in the tree view.

References Accepted, NotImplemented, Base::pyCall(), and Rejected.

Referenced by Gui::ViewProviderPythonFeatureT< ViewProviderT >::isShow().

◆ onChanged()

◆ onDelete()

ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::onDelete ( const std::vector< std::string > &  sub)

◆ replaceObject()

◆ setDisplayMode()

std::string ViewProviderPythonFeatureImp::setDisplayMode ( const char *  ModeName)

◆ setEdit()

◆ setEditViewer()

◆ setupContextMenu()

◆ startRestoring()

void ViewProviderPythonFeatureImp::startRestoring ( )

◆ unsetEdit()

◆ unsetEditViewer()

◆ updateData()

◆ useNewSelectionModel()

ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::useNewSelectionModel ( void  ) const

The documentation for this class was generated from the following files:
  • Sources/FreeCAD/src/Gui/ViewProviderPythonFeature.h
  • Sources/FreeCAD/src/Gui/ViewProviderPythonFeature.cpp