Gui::ViewProvider Class Reference

General interface for all visual stuff in FreeCAD This class is used to generate and handle all around visualizing and presenting objects from the FreeCAD App layer to the user. More...

#include <ViewProvider.h>

Inheritance diagram for Gui::ViewProvider:
App::PropertyContainer Base::Persistence Base::BaseClass Gui::ViewProviderDocumentObject Gui::ViewProviderExtern PartGui::ViewProviderCrossSections DrawingGui::ViewProviderDrawingView Gui::ViewProviderAnnotation Gui::ViewProviderAnnotationLabel Gui::ViewProviderDocumentObjectGroup Gui::ViewProviderFeature Gui::ViewProviderGeometryObject Gui::ViewProviderInventorObject Gui::ViewProviderMeasureDistance Gui::ViewProviderPointMarker Gui::ViewProviderVRMLObject InspectionGui::ViewProviderInspection MeshGui::ViewProviderExport MeshGui::ViewProviderFace MeshGui::ViewProviderMeshCurvature MeshGui::ViewProviderMeshDefects

List of all members.

Public Member Functions

virtual bool doubleClicked (void)
 is called by the tree if the user double click on the object
SoSeparator * getAnnotation (void)
virtual SoSeparator * getBackRoot (void) const
virtual SoSeparator * getFrontRoot (void) const
PyObjectgetPyObject ()
 This method returns the Python wrapper for a C++ object.
virtual SoSeparator * getRoot (void)
virtual Base::Type getTypeId (void) const
bool isUpdatesEnabled () const
virtual bool keyPressed (bool pressed, int key)
 is called when the provider is in edit and a key event occurs. Only ESC ends edit.
virtual bool mouseButtonPressed (int Button, bool pressed, const SbVec3f &pos, const SbVec3f &norm, const SoPickedPoint *pp)
 is called when the Provider is in edit and the mouse is clicked
virtual bool mouseMove (const SbVec3f &pos, const SbVec3f &norm, const SoPickedPoint *pp)
 is called when the provider is in edit and the mouse is moved
virtual void setupContextMenu (QMenu *, QObject *, const char *)
 set up the context-menu with the supported edit modes
void setUpdatesEnabled (bool enable)
std::string toString () const
void update (const App::Property *)
 update the content of the ViewProvider this method have to implement the recalcualtion of the ViewProvider.
virtual void updateData (const App::Property *)=0
 ViewProvider ()
 constructor.
virtual ~ViewProvider ()
 destructor.
Methods used by the Tree

If you want to take control over the appearance of your object in the tree you can reimplemnt this methods.



virtual std::vector
< App::DocumentObject * > 
claimChildren (void) const
 deliver the children belonging to this object this method is used to deliver the objects to the tree framework which should be grouped under its label.
virtual QIcon getIcon (void) const
 deliver the icon shown in the tree view
direct handling methods

This group of methods is to direct influence the appearance of the viewed content.

It's only for fast interactions! If you want to set the visual parameters you have to do it on the object viewed by this provider!



SbMatrix convert (const Base::Matrix4D &rcMatrix) const
virtual void setTransformation (const SbMatrix &rcMatrix)
virtual void setTransformation (const Base::Matrix4D &rcMatrix)
 set the viewing transformation of the provider
Display mode methods



std::string getActiveDisplayMode (void) const
virtual const char * getDefaultDisplayMode () const =0
 get the default display mode
virtual std::vector< std::string > getDisplayModes (void) const =0
 returns a list of all possible display modes
virtual void hide (void)
 Hides the view provider.
virtual bool isShow (void) const
 checks whether the view provider is visible or not
bool isVisible () const
virtual void setDisplayMode (const char *ModeName)
 set the display mode
void setVisible (bool)
virtual void show (void)
 Shows the view provider.
Selection handling

This group of methodes do the selection handling.

Here you can define how the selection for your ViewProfider works.



virtual std::string getElement (const SoPickedPoint *) const
 return a hit element to the selection path or 0
virtual std::vector
< Base::Vector3d
getSelectionShape (const char *Element) const
 return the higlight lines for a given element or the whole shape
virtual bool isSelectable (void) const
 indicates if the ViewProvider can be selected
virtual bool onDelete (const std::vector< std::string > &)
 get called if the object is about to get deleted. Here you can delete other objects to or switch visibility of others.
virtual bool useNewSelectionModel (void) const
 indicates if the ViewProvider use the new Selection model
Task panel

With this interface the ViewProvider can steer the appearance of widgets in the task view



virtual void getTaskViewContent (std::vector< Gui::TaskView::TaskContent * > &) const
 get a list of TaskBoxes associated with this object

Static Public Member Functions

static void * create (void)
static void eventCallback (void *ud, SoEventCallback *node)
static Base::Type getClassTypeId (void)
static void init (void)

Public Attributes

Signals of the view provider



boost::signal< void()> signalChangeIcon
 signal on icon change
boost::signal< void(const
QString &)> 
signalChangeStatusTip
 signal on status tip change
boost::signal< void(const
QString &)> 
signalChangeToolTip
 signal on tooltip change

Protected Member Functions

SoPickedPoint * getPointOnRay (const SbVec3f &pos, const SbVec3f &dir, const View3DInventorViewer &viewer) const
 Helper method to get picked entities while editing.
virtual const App::PropertyDatagetPropertyData (void) const
void onChanged (const App::Property *prop)
 Reimplemented from subclass.
Display mask modes

Mainly controls an SoSwitch node which selects the display mask modes.

The number of display mask modes doesn't necessarily match with the number of display modes. E.g. various display modes like Gaussian curvature, mean curvature or gray values are displayed by one display mask mode that handles color values.



void addDisplayMaskMode (SoNode *node, const char *type)
 Adds a new display mask mode.
std::vector< std::string > getDisplayMaskModes () const
 Returns a list of added display mask modes.
void setDefaultMode (int)
void setDisplayMaskMode (const char *type)
 Activates the display mask mode type.

Static Protected Member Functions

static const App::PropertyDatagetPropertyDataPtr (void)

Protected Attributes

SoSeparator * pcAnnotation
 The root separator for annotations.
SoSwitch * pcModeSwitch
 this is the mode switch, all the different viewing modes are collected here
SoSeparator * pcRoot
 The root Separator of the ViewProvider.
SoTransform * pcTransform
 this is transformation for the provider
ViewProviderPypyViewObject
const char * sPixmap

Friends

class ViewProviderPythonFeaturePy

Edit methods

if the Viewprovider goes in edit mode you can handle most of the events in the viewer by yourself



enum  EditMode { Default = 0, Transform, Cutting, Color }
void finishEditing ()
bool isEditing () const
virtual void setEditViewer (View3DInventorViewer *, int ModNum)
 adjust viewer settings when editing a view provider
bool startEditing (int ModNum=0)
virtual void unsetEditViewer (View3DInventorViewer *)
 restores viewer settings when leaving editing mode
int getEditingMode () const
 return the edit mode or -1 if nothing is being edited
virtual bool setEdit (int ModNum)
 is called by the document when the provider goes in edit mode
virtual void unsetEdit (int ModNum)
 is called when you loose the edit mode

Detailed Description

General interface for all visual stuff in FreeCAD This class is used to generate and handle all around visualizing and presenting objects from the FreeCAD App layer to the user.

This class and its descendents have to be implemented for any object type in order to show them in the 3DView and TreeView.

Definition at line 74 of file Gui/ViewProvider.h.


Member Enumeration Documentation

Enumerator:
Default 
Transform 
Cutting 
Color 

Definition at line 184 of file Gui/ViewProvider.h.


Constructor & Destructor Documentation

ViewProvider::ViewProvider (  ) 

constructor.

Reimplemented in PartDesignGui::ViewProvider.

Definition at line 63 of file Gui/ViewProvider.cpp.

ViewProvider::~ViewProvider (  )  [virtual]

Member Function Documentation

void ViewProvider::addDisplayMaskMode ( SoNode *  node,
const char *  type 
) [protected]

Adds a new display mask mode.

Definition at line 267 of file Gui/ViewProvider.cpp.

References pcModeSwitch.

Referenced by Gui::ViewProviderPythonFeaturePy::addDisplayMode(), Gui::ViewProviderVRMLObject::attach(), MeshGui::ViewProviderMeshTransformDemolding::attach(), MeshGui::ViewProviderMeshTransform::attach(), RobotGui::ViewProviderTrajectory::attach(), RobotGui::ViewProviderRobotObject::attach(), PartGui::ViewProviderPartReference::attach(), MeshGui::ViewProviderMeshNode::attach(), Gui::ViewProviderMeasureDistance::attach(), Gui::ViewProviderInventorObject::attach(), InspectionGui::ViewProviderInspection::attach(), ImageGui::ViewProviderImagePlane::attach(), FemGui::ViewProviderFemMesh::attach(), PartGui::ViewProviderPartExt::attach(), MeshGui::ViewProviderMeshFolds::attach(), MeshGui::ViewProviderMeshSelfIntersections::attach(), MeshGui::ViewProviderMeshIndices::attach(), MeshGui::ViewProviderMeshDegenerations::attach(), MeshGui::ViewProviderMeshDuplicatedPoints::attach(), MeshGui::ViewProviderMeshDuplicatedFaces::attach(), MeshGui::ViewProviderMeshNonManifolds::attach(), MeshGui::ViewProviderMeshOrientation::attach(), PartGui::ViewProviderCurveNet::attach(), MeshGui::ViewProviderMeshCurvature::attach(), Gui::ViewProviderAnnotationLabel::attach(), Gui::ViewProviderAnnotation::attach(), PointsGui::ViewProviderPoints::attach(), PartGui::ViewProviderPartBase::attach(), MeshGui::ViewProviderMesh::attach(), MeshGui::ViewProviderFace::attach(), and Gui::ViewProviderExtern::setModeBySoInput().

virtual std::vector<App::DocumentObject*> Gui::ViewProvider::claimChildren ( void   )  const [inline, virtual]

deliver the children belonging to this object this method is used to deliver the objects to the tree framework which should be grouped under its label.

Obvious is the usage in the group but it can be used for any kind of grouping needed for a special purpose.

Reimplemented in Gui::ViewProviderDocumentObjectGroup, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderExtrusion, PartGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, RobotGui::ViewProviderTrajectoryCompound, and RobotGui::ViewProviderTrajectoryDressUp.

Definition at line 131 of file Gui/ViewProvider.h.

Referenced by Gui::DocumentItem::slotChangeObject().

SbMatrix ViewProvider::convert ( const Base::Matrix4D rcMatrix  )  const

Definition at line 257 of file Gui/ViewProvider.cpp.

References Base::Matrix4D::getGLMatrix().

void * Gui::ViewProvider::create ( void   )  [static]

Reimplemented from App::PropertyContainer.

Reimplemented in Gui::ViewProviderAnnotation, Gui::ViewProviderAnnotationLabel, Gui::ViewProviderDocumentObject, Gui::ViewProviderDocumentObjectGroup, Gui::ViewProviderExtern, Gui::ViewProviderFeature, Gui::ViewProviderGeometryObject, Gui::ViewProviderInventorObject, Gui::ViewProviderPointMarker, Gui::ViewProviderMeasureDistance, Gui::ViewProviderVRMLObject, DrawingGui::ViewProviderDrawingPage, DrawingGui::ViewProviderDrawingView, FemGui::ViewProviderFemMesh, ImageGui::ViewProviderImagePlane, InspectionGui::ViewProviderInspection, InspectionGui::ViewProviderInspectionGroup, MeshGui::ViewProviderFace, MeshGui::ViewProviderExport, MeshGui::ViewProviderMesh, MeshGui::ViewProviderIndexedFaceSet, MeshGui::ViewProviderMeshObject, MeshGui::ViewProviderMeshCurvature, MeshGui::ViewProviderMeshDefects, MeshGui::ViewProviderMeshOrientation, MeshGui::ViewProviderMeshNonManifolds, MeshGui::ViewProviderMeshDuplicatedFaces, MeshGui::ViewProviderMeshDegenerations, MeshGui::ViewProviderMeshDuplicatedPoints, MeshGui::ViewProviderMeshIndices, MeshGui::ViewProviderMeshSelfIntersections, MeshGui::ViewProviderMeshFolds, MeshGui::ViewProviderMeshFaceSet, MeshGui::ViewProviderMeshNode, MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMeshTransformDemolding, PartGui::ViewProviderPartBase, PartGui::ViewProviderEllipsoid, PartGui::ViewProviderPart, PartGui::ViewProvider2DObject, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderBox, PartGui::ViewProviderCurveNet, PartGui::ViewProviderPartExt, PartGui::ViewProviderExtrusion, PartGui::ViewProviderImport, PartGui::ViewProviderMirror, PartGui::ViewProviderFillet, PartGui::ViewProviderChamfer, PartGui::ViewProviderCustom, PartGui::ViewProviderPartReference, PartDesignGui::ViewProviderChamfer, PartDesignGui::ViewProvider, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPatternRectangular, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, PointsGui::ViewProviderPoints, RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderRobotObject, RobotGui::ViewProviderTrajectory, RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectoryDressUp, SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.

Definition at line 61 of file Gui/ViewProvider.cpp.

virtual bool Gui::ViewProvider::doubleClicked ( void   )  [inline, virtual]
void ViewProvider::eventCallback ( void *  ud,
SoEventCallback *  node 
) [static]
void ViewProvider::finishEditing (  ) 
std::string ViewProvider::getActiveDisplayMode ( void   )  const
SoSeparator * ViewProvider::getAnnotation ( void   ) 

Definition at line 215 of file Gui/ViewProvider.cpp.

References pcAnnotation, and pcRoot.

Referenced by Gui::ViewProviderPy::getAnnotation().

virtual SoSeparator* Gui::ViewProvider::getBackRoot ( void   )  const [inline, virtual]
Base::Type Gui::ViewProvider::getClassTypeId ( void   )  [static]

Reimplemented from App::PropertyContainer.

Reimplemented in Gui::ViewProviderAnnotation, Gui::ViewProviderAnnotationLabel, Gui::ViewProviderDocumentObject, Gui::ViewProviderDocumentObjectGroup, Gui::ViewProviderExtern, Gui::ViewProviderFeature, Gui::ViewProviderGeometryObject, Gui::ViewProviderInventorObject, Gui::ViewProviderPointMarker, Gui::ViewProviderMeasureDistance, Gui::ViewProviderVRMLObject, DrawingGui::ViewProviderDrawingPage, DrawingGui::ViewProviderDrawingView, FemGui::ViewProviderFemMesh, ImageGui::ViewProviderImagePlane, InspectionGui::ViewProviderInspection, InspectionGui::ViewProviderInspectionGroup, MeshGui::ViewProviderFace, MeshGui::ViewProviderExport, MeshGui::ViewProviderMesh, MeshGui::ViewProviderIndexedFaceSet, MeshGui::ViewProviderMeshObject, MeshGui::ViewProviderMeshCurvature, MeshGui::ViewProviderMeshDefects, MeshGui::ViewProviderMeshOrientation, MeshGui::ViewProviderMeshNonManifolds, MeshGui::ViewProviderMeshDuplicatedFaces, MeshGui::ViewProviderMeshDegenerations, MeshGui::ViewProviderMeshDuplicatedPoints, MeshGui::ViewProviderMeshIndices, MeshGui::ViewProviderMeshSelfIntersections, MeshGui::ViewProviderMeshFolds, MeshGui::ViewProviderMeshFaceSet, MeshGui::ViewProviderMeshNode, MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMeshTransformDemolding, PartGui::ViewProviderPartBase, PartGui::ViewProviderEllipsoid, PartGui::ViewProviderPart, PartGui::ViewProvider2DObject, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderBox, PartGui::ViewProviderCurveNet, PartGui::ViewProviderPartExt, PartGui::ViewProviderExtrusion, PartGui::ViewProviderImport, PartGui::ViewProviderMirror, PartGui::ViewProviderFillet, PartGui::ViewProviderChamfer, PartGui::ViewProviderCustom, PartGui::ViewProviderPartReference, PartDesignGui::ViewProviderChamfer, PartDesignGui::ViewProvider, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPatternRectangular, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, PointsGui::ViewProviderPoints, RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderRobotObject, RobotGui::ViewProviderTrajectory, RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectoryDressUp, SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.

Definition at line 61 of file Gui/ViewProvider.cpp.

Referenced by MeshGui::DlgEvaluateMeshImp::addViewProvider(), and Gui::TreeView::mouseDoubleClickEvent().

virtual const char* Gui::ViewProvider::getDefaultDisplayMode (  )  const [pure virtual]
std::vector< std::string > ViewProvider::getDisplayMaskModes (  )  const [protected]

Returns a list of added display mask modes.

Definition at line 283 of file Gui/ViewProvider.cpp.

virtual std::vector<std::string> Gui::ViewProvider::getDisplayModes ( void   )  const [pure virtual]
int ViewProvider::getEditingMode (  )  const [protected]
virtual std::string Gui::ViewProvider::getElement ( const SoPickedPoint *   )  const [inline, virtual]

return a hit element to the selection path or 0

Reimplemented in PartGui::ViewProviderPartExt.

Definition at line 106 of file Gui/ViewProvider.h.

Referenced by Gui::View3DInventorPy::getObjectInfo(), Gui::View3DInventorPy::getObjectsInfo(), and Gui::SoFCUnifiedSelection::handleEvent().

virtual SoSeparator* Gui::ViewProvider::getFrontRoot ( void   )  const [inline, virtual]
QIcon ViewProvider::getIcon ( void   )  const [virtual]
SoPickedPoint * ViewProvider::getPointOnRay ( const SbVec3f &  pos,
const SbVec3f &  dir,
const View3DInventorViewer viewer 
) const [protected]

Helper method to get picked entities while editing.

Definition at line 355 of file Gui/ViewProvider.cpp.

References pcRoot.

const App::PropertyData & Gui::ViewProvider::getPropertyData ( void   )  const [protected, virtual]

Reimplemented from App::PropertyContainer.

Reimplemented in Gui::ViewProviderAnnotation, Gui::ViewProviderAnnotationLabel, Gui::ViewProviderDocumentObject, Gui::ViewProviderDocumentObjectGroup, Gui::ViewProviderExtern, Gui::ViewProviderFeature, Gui::ViewProviderGeometryObject, Gui::ViewProviderInventorObject, Gui::ViewProviderPointMarker, Gui::ViewProviderMeasureDistance, Gui::ViewProviderVRMLObject, DrawingGui::ViewProviderDrawingPage, DrawingGui::ViewProviderDrawingView, FemGui::ViewProviderFemMesh, ImageGui::ViewProviderImagePlane, InspectionGui::ViewProviderInspection, InspectionGui::ViewProviderInspectionGroup, MeshGui::ViewProviderFace, MeshGui::ViewProviderExport, MeshGui::ViewProviderMesh, MeshGui::ViewProviderIndexedFaceSet, MeshGui::ViewProviderMeshObject, MeshGui::ViewProviderMeshCurvature, MeshGui::ViewProviderMeshDefects, MeshGui::ViewProviderMeshOrientation, MeshGui::ViewProviderMeshNonManifolds, MeshGui::ViewProviderMeshDuplicatedFaces, MeshGui::ViewProviderMeshDegenerations, MeshGui::ViewProviderMeshDuplicatedPoints, MeshGui::ViewProviderMeshIndices, MeshGui::ViewProviderMeshSelfIntersections, MeshGui::ViewProviderMeshFolds, MeshGui::ViewProviderMeshFaceSet, MeshGui::ViewProviderMeshNode, MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMeshTransformDemolding, PartGui::ViewProviderPartBase, PartGui::ViewProviderEllipsoid, PartGui::ViewProviderPart, PartGui::ViewProvider2DObject, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderBox, PartGui::ViewProviderCurveNet, PartGui::ViewProviderPartExt, PartGui::ViewProviderExtrusion, PartGui::ViewProviderImport, PartGui::ViewProviderMirror, PartGui::ViewProviderFillet, PartGui::ViewProviderChamfer, PartGui::ViewProviderCustom, PartGui::ViewProviderPartReference, PartDesignGui::ViewProviderChamfer, PartDesignGui::ViewProvider, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPatternRectangular, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, PointsGui::ViewProviderPoints, RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderRobotObject, RobotGui::ViewProviderTrajectory, RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectoryDressUp, SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.

Definition at line 61 of file Gui/ViewProvider.cpp.

const App::PropertyData * Gui::ViewProvider::getPropertyDataPtr ( void   )  [static, protected]

Reimplemented from App::PropertyContainer.

Reimplemented in Gui::ViewProviderAnnotation, Gui::ViewProviderAnnotationLabel, Gui::ViewProviderDocumentObject, Gui::ViewProviderDocumentObjectGroup, Gui::ViewProviderExtern, Gui::ViewProviderFeature, Gui::ViewProviderGeometryObject, Gui::ViewProviderInventorObject, Gui::ViewProviderPointMarker, Gui::ViewProviderMeasureDistance, Gui::ViewProviderVRMLObject, DrawingGui::ViewProviderDrawingPage, DrawingGui::ViewProviderDrawingView, FemGui::ViewProviderFemMesh, ImageGui::ViewProviderImagePlane, InspectionGui::ViewProviderInspection, InspectionGui::ViewProviderInspectionGroup, MeshGui::ViewProviderFace, MeshGui::ViewProviderExport, MeshGui::ViewProviderMesh, MeshGui::ViewProviderIndexedFaceSet, MeshGui::ViewProviderMeshObject, MeshGui::ViewProviderMeshCurvature, MeshGui::ViewProviderMeshDefects, MeshGui::ViewProviderMeshOrientation, MeshGui::ViewProviderMeshNonManifolds, MeshGui::ViewProviderMeshDuplicatedFaces, MeshGui::ViewProviderMeshDegenerations, MeshGui::ViewProviderMeshDuplicatedPoints, MeshGui::ViewProviderMeshIndices, MeshGui::ViewProviderMeshSelfIntersections, MeshGui::ViewProviderMeshFolds, MeshGui::ViewProviderMeshFaceSet, MeshGui::ViewProviderMeshNode, MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMeshTransformDemolding, PartGui::ViewProviderPartBase, PartGui::ViewProviderEllipsoid, PartGui::ViewProviderPart, PartGui::ViewProvider2DObject, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderBox, PartGui::ViewProviderCurveNet, PartGui::ViewProviderPartExt, PartGui::ViewProviderExtrusion, PartGui::ViewProviderImport, PartGui::ViewProviderMirror, PartGui::ViewProviderFillet, PartGui::ViewProviderChamfer, PartGui::ViewProviderCustom, PartGui::ViewProviderPartReference, PartDesignGui::ViewProviderChamfer, PartDesignGui::ViewProvider, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPatternRectangular, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, PointsGui::ViewProviderPoints, RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderRobotObject, RobotGui::ViewProviderTrajectory, RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectoryDressUp, SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.

Definition at line 61 of file Gui/ViewProvider.cpp.

PyObject * ViewProvider::getPyObject ( void   )  [virtual]

This method returns the Python wrapper for a C++ object.

It's in the responsibility of the programmer to do the correct reference counting. Basically there are two ways how to implement that: Either always return a new Python object then reference counting is not a matter or return always the same Python object then the reference counter must be incremented by one. However, it's absolutely forbidden to return always the same Python object without incrementing the reference counter.

The default implementation returns 'None'.

Reimplemented from Base::BaseClass.

Reimplemented in Gui::ViewProviderDocumentObject.

Definition at line 347 of file Gui/ViewProvider.cpp.

References Base::PyObjectBase::IncRef(), and pyViewObject.

Referenced by Gui::DocumentPy::activeObject(), Gui::DocumentPy::getActiveObject(), Gui::DocumentPy::getCustomAttributes(), and Gui::DocumentPy::getObject().

virtual SoSeparator* Gui::ViewProvider::getRoot ( void   )  [inline, virtual]
virtual std::vector<Base::Vector3d> Gui::ViewProvider::getSelectionShape ( const char *  Element  )  const [inline, virtual]

return the higlight lines for a given element or the whole shape

Reimplemented in PartGui::ViewProviderPartExt.

Definition at line 108 of file Gui/ViewProvider.h.

virtual void Gui::ViewProvider::getTaskViewContent ( std::vector< Gui::TaskView::TaskContent * > &   )  const [inline, virtual]

get a list of TaskBoxes associated with this object

Reimplemented in Gui::ViewProviderDocumentObject.

Definition at line 213 of file Gui/ViewProvider.h.

Base::Type Gui::ViewProvider::getTypeId ( void   )  const [virtual]

Reimplemented from App::PropertyContainer.

Reimplemented in Gui::ViewProviderAnnotation, Gui::ViewProviderAnnotationLabel, Gui::ViewProviderDocumentObject, Gui::ViewProviderDocumentObjectGroup, Gui::ViewProviderExtern, Gui::ViewProviderFeature, Gui::ViewProviderGeometryObject, Gui::ViewProviderInventorObject, Gui::ViewProviderPointMarker, Gui::ViewProviderMeasureDistance, Gui::ViewProviderVRMLObject, DrawingGui::ViewProviderDrawingPage, DrawingGui::ViewProviderDrawingView, FemGui::ViewProviderFemMesh, ImageGui::ViewProviderImagePlane, InspectionGui::ViewProviderInspection, InspectionGui::ViewProviderInspectionGroup, MeshGui::ViewProviderFace, MeshGui::ViewProviderExport, MeshGui::ViewProviderMesh, MeshGui::ViewProviderIndexedFaceSet, MeshGui::ViewProviderMeshObject, MeshGui::ViewProviderMeshCurvature, MeshGui::ViewProviderMeshDefects, MeshGui::ViewProviderMeshOrientation, MeshGui::ViewProviderMeshNonManifolds, MeshGui::ViewProviderMeshDuplicatedFaces, MeshGui::ViewProviderMeshDegenerations, MeshGui::ViewProviderMeshDuplicatedPoints, MeshGui::ViewProviderMeshIndices, MeshGui::ViewProviderMeshSelfIntersections, MeshGui::ViewProviderMeshFolds, MeshGui::ViewProviderMeshFaceSet, MeshGui::ViewProviderMeshNode, MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMeshTransformDemolding, PartGui::ViewProviderPartBase, PartGui::ViewProviderEllipsoid, PartGui::ViewProviderPart, PartGui::ViewProvider2DObject, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderBox, PartGui::ViewProviderCurveNet, PartGui::ViewProviderPartExt, PartGui::ViewProviderExtrusion, PartGui::ViewProviderImport, PartGui::ViewProviderMirror, PartGui::ViewProviderFillet, PartGui::ViewProviderChamfer, PartGui::ViewProviderCustom, PartGui::ViewProviderPartReference, PartDesignGui::ViewProviderChamfer, PartDesignGui::ViewProvider, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPatternRectangular, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, PointsGui::ViewProviderPoints, RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderRobotObject, RobotGui::ViewProviderTrajectory, RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectoryDressUp, SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.

Definition at line 61 of file Gui/ViewProvider.cpp.

Referenced by MeshGui::ViewProviderMeshCurvature::curvatureInfoCallback(), Gui::Document::exportObjects(), MeshGui::ViewProviderMesh::faceInfoCallback(), MeshGui::ViewProviderMesh::fillHoleCallback(), Gui::ViewProviderDocumentObjectGroup::getViewProviders(), Gui::Document::importObjects(), InspectionGui::ViewProviderInspection::inspectCallback(), MeshGui::ViewProviderMesh::markPartCallback(), Gui::Document::setHide(), Gui::Document::setShow(), PartGui::ViewProviderPartBase::shapeInfoCallback(), Gui::Document::slotDeletedObject(), SketcherGui::ViewProviderCustom::updateData(), and PartGui::ViewProviderCustom::updateData().

void ViewProvider::hide ( void   )  [virtual]
void Gui::ViewProvider::init ( void   )  [static]

Reimplemented from App::PropertyContainer.

Reimplemented in Gui::ViewProviderAnnotation, Gui::ViewProviderAnnotationLabel, Gui::ViewProviderDocumentObject, Gui::ViewProviderDocumentObjectGroup, Gui::ViewProviderExtern, Gui::ViewProviderFeature, Gui::ViewProviderGeometryObject, Gui::ViewProviderInventorObject, Gui::ViewProviderPointMarker, Gui::ViewProviderMeasureDistance, Gui::ViewProviderVRMLObject, DrawingGui::ViewProviderDrawingPage, DrawingGui::ViewProviderDrawingView, FemGui::ViewProviderFemMesh, ImageGui::ViewProviderImagePlane, InspectionGui::ViewProviderInspection, InspectionGui::ViewProviderInspectionGroup, MeshGui::ViewProviderFace, MeshGui::ViewProviderExport, MeshGui::ViewProviderMesh, MeshGui::ViewProviderIndexedFaceSet, MeshGui::ViewProviderMeshObject, MeshGui::ViewProviderMeshCurvature, MeshGui::ViewProviderMeshDefects, MeshGui::ViewProviderMeshOrientation, MeshGui::ViewProviderMeshNonManifolds, MeshGui::ViewProviderMeshDuplicatedFaces, MeshGui::ViewProviderMeshDegenerations, MeshGui::ViewProviderMeshDuplicatedPoints, MeshGui::ViewProviderMeshIndices, MeshGui::ViewProviderMeshSelfIntersections, MeshGui::ViewProviderMeshFolds, MeshGui::ViewProviderMeshFaceSet, MeshGui::ViewProviderMeshNode, MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMeshTransformDemolding, PartGui::ViewProviderPartBase, PartGui::ViewProviderEllipsoid, PartGui::ViewProviderPart, PartGui::ViewProvider2DObject, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderBox, PartGui::ViewProviderCurveNet, PartGui::ViewProviderPartExt, PartGui::ViewProviderExtrusion, PartGui::ViewProviderImport, PartGui::ViewProviderMirror, PartGui::ViewProviderFillet, PartGui::ViewProviderChamfer, PartGui::ViewProviderCustom, PartGui::ViewProviderPartReference, PartDesignGui::ViewProviderChamfer, PartDesignGui::ViewProvider, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPatternRectangular, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, PointsGui::ViewProviderPoints, RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderRobotObject, RobotGui::ViewProviderTrajectory, RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectoryDressUp, SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.

Definition at line 61 of file Gui/ViewProvider.cpp.

Referenced by Gui::Application::initTypes().

bool ViewProvider::isEditing (  )  const
virtual bool Gui::ViewProvider::isSelectable ( void   )  const [inline, virtual]
bool ViewProvider::isShow ( void   )  const [virtual]

checks whether the view provider is visible or not

Reimplemented in Gui::ViewProviderDocumentObjectGroup.

Definition at line 317 of file Gui/ViewProvider.cpp.

References pcModeSwitch.

Referenced by Gui::Document::isShow(), isVisible(), Gui::DocumentObjectItem::testStatus(), update(), and Gui::ViewProviderDocumentObject::updateView().

bool ViewProvider::isUpdatesEnabled (  )  const

Definition at line 132 of file Gui/ViewProvider.cpp.

Referenced by update().

bool ViewProvider::isVisible (  )  const

Definition at line 327 of file Gui/ViewProvider.cpp.

References isShow().

Referenced by CmdMeshPolyCut::activated(), and CmdMeshPolySegm::activated().

virtual bool Gui::ViewProvider::keyPressed ( bool  pressed,
int  key 
) [inline, virtual]

is called when the provider is in edit and a key event occurs. Only ESC ends edit.

Reimplemented in SketcherGui::ViewProviderSketch.

Definition at line 217 of file Gui/ViewProvider.h.

virtual bool Gui::ViewProvider::mouseButtonPressed ( int  Button,
bool  pressed,
const SbVec3f &  pos,
const SbVec3f &  norm,
const SoPickedPoint *  pp 
) [inline, virtual]

is called when the Provider is in edit and the mouse is clicked

Reimplemented in SketcherGui::ViewProviderSketch.

Definition at line 224 of file Gui/ViewProvider.h.

virtual bool Gui::ViewProvider::mouseMove ( const SbVec3f &  pos,
const SbVec3f &  norm,
const SoPickedPoint *  pp 
) [inline, virtual]

is called when the provider is in edit and the mouse is moved

Reimplemented in SketcherGui::ViewProviderSketch.

Definition at line 221 of file Gui/ViewProvider.h.

void ViewProvider::onChanged ( const App::Property prop  )  [protected, virtual]
virtual bool Gui::ViewProvider::onDelete ( const std::vector< std::string > &   )  [inline, virtual]

get called if the object is about to get deleted. Here you can delete other objects to or switch visibility of others.

Reimplemented in Gui::ViewProviderDocumentObjectGroup, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, and SketcherGui::ViewProviderSketch.

Definition at line 111 of file Gui/ViewProvider.h.

Referenced by StdCmdDelete::activated().

void ViewProvider::setDefaultMode ( int  val  )  [protected]

Definition at line 332 of file Gui/ViewProvider.cpp.

void ViewProvider::setDisplayMaskMode ( const char *  type  )  [protected]

Activates the display mask mode type.

Definition at line 273 of file Gui/ViewProvider.cpp.

References pcModeSwitch.

Referenced by Gui::ViewProviderVRMLObject::setDisplayMode(), MeshGui::ViewProviderMeshTransformDemolding::setDisplayMode(), MeshGui::ViewProviderMeshTransform::setDisplayMode(), RobotGui::ViewProviderTrajectory::setDisplayMode(), RobotGui::ViewProviderRobotObject::setDisplayMode(), PartGui::ViewProviderPartReference::setDisplayMode(), MeshGui::ViewProviderMeshNode::setDisplayMode(), Gui::ViewProviderMeasureDistance::setDisplayMode(), Gui::ViewProviderInventorObject::setDisplayMode(), InspectionGui::ViewProviderInspection::setDisplayMode(), ImageGui::ViewProviderImagePlane::setDisplayMode(), FemGui::ViewProviderFemMesh::setDisplayMode(), PartGui::ViewProviderPartExt::setDisplayMode(), PartGui::ViewProviderCurveNet::setDisplayMode(), MeshGui::ViewProviderMeshCurvature::setDisplayMode(), Gui::ViewProviderAnnotationLabel::setDisplayMode(), Gui::ViewProviderAnnotation::setDisplayMode(), PointsGui::ViewProviderPoints::setDisplayMode(), PartGui::ViewProviderPartBase::setDisplayMode(), MeshGui::ViewProviderMesh::setDisplayMode(), MeshGui::ViewProviderFace::setDisplayMode(), Gui::ViewProviderExtern::setModeBySoInput(), MeshGui::ViewProviderMeshFolds::showDefects(), MeshGui::ViewProviderMeshSelfIntersections::showDefects(), MeshGui::ViewProviderMeshIndices::showDefects(), MeshGui::ViewProviderMeshDegenerations::showDefects(), MeshGui::ViewProviderMeshDuplicatedPoints::showDefects(), MeshGui::ViewProviderMeshDuplicatedFaces::showDefects(), MeshGui::ViewProviderMeshNonManifolds::showDefects(), and MeshGui::ViewProviderMeshOrientation::showDefects().

void ViewProvider::setDisplayMode ( const char *  ModeName  )  [virtual]
bool ViewProvider::setEdit ( int  ModNum  )  [protected, virtual]
void ViewProvider::setEditViewer ( View3DInventorViewer ,
int  ModNum 
) [virtual]

adjust viewer settings when editing a view provider

Reimplemented in Gui::ViewProviderGeometryObject, and SketcherGui::ViewProviderSketch.

Definition at line 124 of file Gui/ViewProvider.cpp.

Referenced by Gui::View3DInventorViewer::setEditingViewProvider().

void ViewProvider::setTransformation ( const SbMatrix &  rcMatrix  )  [virtual]

Definition at line 252 of file Gui/ViewProvider.cpp.

References pcTransform.

void ViewProvider::setTransformation ( const Base::Matrix4D rcMatrix  )  [virtual]
virtual void Gui::ViewProvider::setupContextMenu ( QMenu *  ,
QObject *  ,
const char *   
) [inline, virtual]
void ViewProvider::setUpdatesEnabled ( bool  enable  ) 

Definition at line 137 of file Gui/ViewProvider.cpp.

void ViewProvider::setVisible ( bool  s  ) 

Definition at line 322 of file Gui/ViewProvider.cpp.

References hide(), and show().

void ViewProvider::show ( void   )  [virtual]
bool ViewProvider::startEditing ( int  ModNum = 0  ) 
std::string ViewProvider::toString ( void   )  const

Definition at line 342 of file Gui/ViewProvider.cpp.

References pcRoot, and Gui::SoFCDB::writeNodesToString().

Referenced by Gui::ViewProviderPy::toString().

void ViewProvider::unsetEdit ( int  ModNum  )  [protected, virtual]
void ViewProvider::unsetEditViewer ( View3DInventorViewer  )  [virtual]

restores viewer settings when leaving editing mode

Reimplemented in Gui::ViewProviderGeometryObject, and SketcherGui::ViewProviderSketch.

Definition at line 128 of file Gui/ViewProvider.cpp.

Referenced by Gui::View3DInventorViewer::resetEditingViewProvider().

void ViewProvider::update ( const App::Property prop  ) 

update the content of the ViewProvider this method have to implement the recalcualtion of the ViewProvider.

There are different reasons to update. E.g. only the view attribute has changed, or the data has manipulated.

Definition at line 225 of file Gui/ViewProvider.cpp.

References hide(), isShow(), isUpdatesEnabled(), show(), and updateData().

Referenced by PartGui::ViewProviderPartExt::reload(), PartGui::ViewProviderPartBase::reload(), and Gui::Document::slotChangedObject().

virtual void Gui::ViewProvider::updateData ( const App::Property  )  [pure virtual]
virtual bool Gui::ViewProvider::useNewSelectionModel ( void   )  const [inline, virtual]

Friends And Related Function Documentation

friend class ViewProviderPythonFeaturePy [friend]

Definition at line 290 of file Gui/ViewProvider.h.


Member Data Documentation

SoSeparator* Gui::ViewProvider::pcAnnotation [protected]

The root separator for annotations.

Definition at line 279 of file Gui/ViewProvider.h.

Referenced by getAnnotation(), and ~ViewProvider().

SoSwitch* Gui::ViewProvider::pcModeSwitch [protected]
SoSeparator* Gui::ViewProvider::pcRoot [protected]
SoTransform* Gui::ViewProvider::pcTransform [protected]
boost::signal<void ()> Gui::ViewProvider::signalChangeIcon

signal on icon change

Definition at line 138 of file Gui/ViewProvider.h.

Referenced by Gui::DocumentObjectItem::DocumentObjectItem().

boost::signal<void (const QString&)> Gui::ViewProvider::signalChangeStatusTip

signal on status tip change

Definition at line 142 of file Gui/ViewProvider.h.

Referenced by Gui::DocumentObjectItem::DocumentObjectItem().

boost::signal<void (const QString&)> Gui::ViewProvider::signalChangeToolTip

signal on tooltip change

Definition at line 140 of file Gui/ViewProvider.h.

Referenced by Gui::DocumentObjectItem::DocumentObjectItem().

const char* Gui::ViewProvider::sPixmap [protected]

The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:04 2011 for FreeCAD by  doxygen 1.6.1