#include <ViewProviderLink.h>
Classes | |
struct DraggerContext | |
Public Member Functions | |
virtual bool allowOverride (const App::DocumentObject &) const override | |
Allow this class to be used as an override for the original view provider of the given object. More... | |
void attach (App::DocumentObject *pcObj) override | |
bool canDelete (App::DocumentObject *obj) const override | |
Asks the view provider if the given object can be deleted. More... | |
bool canDragAndDropObject (App::DocumentObject *) const override | |
Return false to force drop only operation for a given object. More... | |
bool canDragObject (App::DocumentObject *) const override | |
Check whether the object can be removed from the view provider by drag and drop. More... | |
bool canDragObjects () const override | |
Check whether children can be removed from the view provider by drag and drop. More... | |
bool canDropObjectEx (App::DocumentObject *obj, App::DocumentObject *owner, const char *subname, const std::vector< std::string > &subElements) const override | |
Query object dropping with full quanlified name. More... | |
bool canDropObjects () const override | |
Check whether objects can be added to the view provider by drag and drop or drop only. More... | |
std::vector< App::DocumentObject * > claimChildren (void) const override | |
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. More... | |
Base::Placement currentDraggingPlacement () const | |
bool doubleClicked () override | |
is called by the tree if the user double click on the object More... | |
void dragObject (App::DocumentObject *) override | |
Remove a child from the view provider by drag and drop. More... | |
std::string dropObjectEx (App::DocumentObject *, App::DocumentObject *, const char *subname, const std::vector< std::string > &subElements) override | |
Add an object with full quanlified name to the view provider by drag and drop. More... | |
void enableCenterballDragger (bool enable) | |
void finishRestoring () override | |
ViewProviderDocumentObject * getChildViewProvider () const | |
bool getDetailPath (const char *, SoFullPath *, bool, SoDetail *&) const override | |
return the coin node detail and path to the node of the subname More... | |
std::vector< std::string > getDisplayModes (void) const override | |
returns a list of all possible display modes More... | |
std::map< std::string, App::Color > getElementColors (const char *subname=0) const override | |
bool getElementPicked (const SoPickedPoint *, std::string &) const override | |
return a hit element given the picked point which contains the full node path More... | |
QIcon getIcon (void) const override | |
deliver the icon shown in the tree view More... | |
virtual ViewProviderDocumentObject * getLinkedViewProvider (std::string *subname=0, bool recursive=false) const override | |
Return the linked view object. More... | |
virtual QPixmap getOverlayPixmap () const | |
virtual App::Property * getPropertyByName (const char *name) const override | |
find a property by its name More... | |
virtual void getPropertyList (std::vector< App::Property * > &List) const override | |
get all properties of the class (including properties of the parent) More... | |
virtual void getPropertyMap (std::map< std::string, App::Property * > &Map) const override | |
get all properties of the class (including properties of the parent) More... | |
PyObject * getPyLinkView () | |
PyObject * getPyObject () override | |
Get the python wrapper for that ViewProvider. More... | |
bool isSelectable (void) const override | |
bool isUsingCenterballDragger () const | |
virtual void onBeforeChange (const App::Property *) override | |
get called before the value is changed More... | |
void onChanged (const App::Property *prop) override | |
Gets called by the container whenever a property has been changed. More... | |
bool onDelete (const std::vector< std::string > &) override | |
Get called if the object is about to get deleted. More... | |
void reattach (App::DocumentObject *pcObj) override | |
void setElementColors (const std::map< std::string, App::Color > &colors) override | |
void setOverrideMode (const std::string &mode) override | |
Overrides the display mode with mode. More... | |
void setupContextMenu (QMenu *, QObject *, const char *) override | |
set up the context-menu with the supported edit modes More... | |
ViewProvider * startEditing (int ModNum) override | |
void updateData (const App::Property *) override | |
void updateDraggingPlacement (const Base::Placement &pla, bool force=false) | |
bool useNewSelectionModel (void) const override | |
indicates if the ViewProvider use the new Selection model More... | |
ViewProviderLink () | |
virtual ~ViewProviderLink () | |
![]() | |
virtual void forceUpdate (bool enable=true) | |
Gui::Document * getDocument () const | |
Get the GUI document to this ViewProvider object. More... | |
App::DocumentObject * getObject (void) const | |
Get the object of this ViewProvider object. More... | |
virtual void getTaskViewContent (std::vector< Gui::TaskView::TaskContent * > &) const override | |
Get a list of TaskBoxes associated with this object. More... | |
virtual void hide (void) override | |
Hide the object in the view. More... | |
virtual bool isUpdateForced () const | |
virtual int replaceObject (App::DocumentObject *, App::DocumentObject *) override | |
Replace an object to the view provider by drag and drop. More... | |
void setActiveMode () | |
Set the active mode, i.e. the first item of the 'Display' property. More... | |
virtual void show (void) override | |
Show the object in the view. More... | |
virtual bool showInTree () const override | |
Tell the tree view if this object should appear there. More... | |
virtual void update (const App::Property *) override | |
update the content of the ViewProvider this method have to implement the recalculation of the ViewProvider. More... | |
void updateView () | |
Run a redraw. More... | |
ViewProviderDocumentObject () | |
constructor. More... | |
virtual ~ViewProviderDocumentObject () | |
destructor. More... | |
virtual void startRestoring () | |
virtual bool removeDynamicProperty (const char *prop) override | |
virtual App::Property * addDynamicProperty (const char *type, const char *name=0, const char *group=0, const char *doc=0, short attr=0, bool ro=false, bool hidden=false) override | |
virtual std::string getFullName () const override | |
![]() | |
virtual bool canAddToSceneGraph () const | |
Indicate whether to be added to scene graph or not. More... | |
virtual std::vector< App::DocumentObject * > claimChildren3D (void) const | |
deliver the children belonging to this object this method is used to deliver the objects to the 3DView which should be grouped under its scene graph. More... | |
SoSeparator * getAnnotation (void) | |
virtual SoSeparator * getBackRoot (void) const | |
virtual SoGroup * getChildRoot (void) const | |
virtual SoSeparator * getFrontRoot (void) const | |
SoSwitch * getModeSwitch (void) const | |
virtual SoSeparator * getRoot (void) const | |
SoTransform * getTransformNode () const | |
ViewProvider () | |
constructor. More... | |
virtual ~ViewProvider () | |
destructor. More... | |
virtual std::string getElement (const SoDetail *) const | |
return a hit element to the selection path or 0 More... | |
virtual SoDetail * getDetail (const char *) const | |
return the coin node detail of the subelement More... | |
int partialRender (const std::vector< std::string > &subelements, bool clear) | |
partial rendering setup More... | |
virtual std::vector< Base::Vector3d > getModelPoints (const SoPickedPoint *) const | |
virtual std::vector< Base::Vector3d > getSelectionShape (const char *Element) const | |
return the highlight lines for a given element or the whole shape More... | |
Base::BoundBox3d getBoundingBox (const char *subname=0, bool transform=true, MDIView *view=0) const | |
Return the bound box of this view object. More... | |
virtual void beforeDelete () | |
Called before deletion. More... | |
virtual bool canDropObject (App::DocumentObject *) const | |
Check whether the object can be dropped to the view provider by drag and drop or drop only. More... | |
virtual void dropObject (App::DocumentObject *) | |
Add an object to the view provider by drag and drop. More... | |
virtual std::string getDropPrefix () const | |
return a subname referencing the sub-object holding the dropped objects More... | |
virtual bool canRemoveChildrenFromRoot () const | |
Tell the tree view to remove children items from the tree root. More... | |
std::string getActiveDisplayMode (void) const | |
virtual void setDisplayMode (const char *ModeName) | |
set the display mode More... | |
virtual const char * getDefaultDisplayMode () const | |
get the default display mode More... | |
virtual bool isShow (void) const | |
checks whether the view provider is visible or not More... | |
void setVisible (bool) | |
bool isVisible () const | |
void setLinkVisible (bool) | |
bool isLinkVisible () const | |
const std::string getOverrideMode () | |
virtual bool keyPressed (bool pressed, int key) | |
is called when the provider is in edit and a key event occurs. Only ESC ends edit. More... | |
virtual bool mouseMove (const SbVec2s &cursorPos, View3DInventorViewer *viewer) | |
is called when the provider is in edit and the mouse is moved More... | |
virtual bool mouseButtonPressed (int button, bool pressed, const SbVec2s &cursorPos, const View3DInventorViewer *viewer) | |
is called when the Provider is in edit and the mouse is clicked More... | |
bool isUpdatesEnabled () const | |
void setUpdatesEnabled (bool enable) | |
unsigned long getStatus () const | |
return the status bits More... | |
bool testStatus (ViewStatus pos) const | |
void setStatus (ViewStatus pos, bool on) | |
std::string toString () const | |
bool isEditing () const | |
void finishEditing () | |
virtual void setTransformation (const Base::Matrix4D &rcMatrix) | |
set the viewing transformation of the provider More... | |
virtual void setTransformation (const SbMatrix &rcMatrix) | |
virtual MDIView * getMDIView () const | |
virtual void Restore (Base::XMLReader &reader) | |
This method is used to restore properties from an XML document. More... | |
bool isRestoring () | |
void addDisplayMaskMode (SoNode *node, const char *type) | |
Adds a new display mask mode. More... | |
void setDisplayMaskMode (const char *type) | |
Activates the display mask mode type. More... | |
SoNode * getDisplayMaskMode (const char *type) const | |
Get the node to the display mask mode type. More... | |
std::vector< std::string > getDisplayMaskModes () const | |
Returns a list of added display mask modes. More... | |
void setDefaultMode (int) | |
int getDefaultMode () const | |
virtual void setRenderCacheMode (int) | |
![]() | |
TransactionalObject (void) | |
Constructor. More... | |
virtual ~TransactionalObject () | |
![]() | |
ExtensionIterator extensionBegin () | |
ExtensionContainer () | |
ExtensionIterator extensionEnd () | |
App::Extension * getExtension (Base::Type, bool derived=true, bool no_except=false) const | |
App::Extension * getExtension (const std::string &name) const | |
template<typename ExtensionT > | |
ExtensionT * getExtensionByType (bool no_except=false, bool derived=true) const | |
std::vector< Extension * > getExtensionsDerivedFrom (Base::Type type) const | |
template<typename ExtensionT > | |
std::vector< ExtensionT * > getExtensionsDerivedFromType () const | |
bool hasExtension (Base::Type, bool derived=true) const | |
bool hasExtension (const std::string &name) const | |
bool hasExtensions () const | |
void registerExtension (Base::Type extension, App::Extension *ext) | |
virtual ~ExtensionContainer () | |
virtual const char * getPropertyName (const Property *prop) const override | |
get the name of a property More... | |
virtual short getPropertyType (const Property *prop) const override | |
get the Type of a Property More... | |
virtual short getPropertyType (const char *name) const override | |
get the Type of a named Property More... | |
virtual const char * getPropertyGroup (const Property *prop) const override | |
get the Group of a Property More... | |
virtual const char * getPropertyGroup (const char *name) const override | |
get the Group of a named Property More... | |
virtual const char * getPropertyDocumentation (const Property *prop) const override | |
get the Group of a Property More... | |
virtual const char * getPropertyDocumentation (const char *name) const override | |
get the Group of a named Property More... | |
virtual void Save (Base::Writer &writer) const override | |
This method is used to save properties to an XML document. More... | |
void saveExtensions (Base::Writer &writer) const | |
void restoreExtensions (Base::XMLReader &reader) | |
![]() | |
virtual App::Property * getDynamicPropertyByName (const char *name) const | |
DynamicProperty::PropData getDynamicPropertyData (const Property *prop) const | |
virtual std::vector< std::string > getDynamicPropertyNames () const | |
virtual unsigned int getMemSize (void) const | |
This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? More... | |
const char * getPropertyPrefix () const | |
bool isHidden (const char *name) const | |
check if the named property is hidden More... | |
bool isHidden (const Property *prop) const | |
check if the property is hidden More... | |
bool isReadOnly (const char *name) const | |
check if the named property is read-only More... | |
bool isReadOnly (const Property *prop) const | |
check if the property is read-only More... | |
PropertyContainer () | |
A constructor. More... | |
void setPropertyPrefix (const char *prefix) | |
void setPropertyStatus (unsigned char bit, bool value) | |
set the Status bit of all properties at once More... | |
virtual ~PropertyContainer () | |
A destructor. More... | |
![]() | |
void dumpToStream (std::ostream &stream, int compression) | |
virtual Base::Type getTypeId (void) const | |
virtual void RestoreDocFile (Reader &) | |
This method is used to restore large amounts of data from a file In this method you simply stream in your SaveDocFile() saved data. More... | |
void restoreFromStream (std::istream &stream) | |
virtual void SaveDocFile (Writer &) const | |
This method is used to save large amounts of data to a binary file. More... | |
![]() | |
BaseClass () | |
Construction. More... | |
bool isDerivedFrom (const Type type) const | |
virtual void setPyObject (PyObject *) | |
virtual ~BaseClass () | |
Destruction. More... | |
Static Public Member Functions | |
static void updateLinks (ViewProvider *vp) | |
![]() | |
static const std::string & hiddenMarker () | |
static const char * hasHiddenMarker (const char *subname) | |
static SbMatrix convert (const Base::Matrix4D &rcMatrix) | |
static Base::Matrix4D convert (const SbMatrix &sbMat) | |
static void eventCallback (void *ud, SoEventCallback *node) | |
![]() | |
static void * create (void) | |
static std::string encodeAttribute (const std::string &) | |
Encodes an attribute upon saving. More... | |
static Base::Type getClassTypeId (void) | |
static void init (void) | |
![]() | |
static void * create (void) | |
static Type getClassTypeId (void) | |
static void init (void) | |
Public Attributes | |
App::PropertyPersistentObject ChildViewProvider | |
App::PropertyEnumeration DrawStyle | |
App::PropertyFloatConstraint LineWidth | |
App::PropertyMaterialList MaterialList | |
App::PropertyColorList OverrideColorList | |
App::PropertyBool OverrideMaterial | |
App::PropertyBoolList OverrideMaterialList | |
App::PropertyFloatConstraint PointSize | |
App::PropertyBool Selectable | |
App::PropertyMaterial ShapeMaterial | |
![]() | |
App::PropertyEnumeration DisplayMode | |
App::PropertyEnumeration OnTopWhenSelected | |
App::PropertyEnumeration SelectionStyle | |
App::PropertyBool ShowInTree | |
App::PropertyBool Visibility | |
![]() | |
boost::signals2::signal< void()> signalChangeIcon | |
signal on icon change More... | |
boost::signals2::signal< void(const QString &)> signalChangeToolTip | |
signal on tooltip change More... | |
boost::signals2::signal< void(const QString &)> signalChangeStatusTip | |
signal on status tip change More... | |
Protected Types | |
enum LinkType { LinkTypeNone, LinkTypeNormal, LinkTypeSubs } | |
Protected Member Functions | |
void applyColors () | |
void applyMaterial () | |
bool callDraggerProxy (const char *fname, bool update) | |
void checkIcon (const App::LinkBaseExtension *ext=0) | |
std::vector< App::DocumentObject * > claimChildrenPrivate () const | |
ViewProvider * getLinkedView (bool real, const App::LinkBaseExtension *ext=0) const | |
App::LinkBaseExtension * getLinkExtension () | |
const App::LinkBaseExtension * getLinkExtension () const | |
bool hasElements (const App::LinkBaseExtension *ext=0) const | |
bool initDraggingPlacement () | |
bool isGroup (const App::LinkBaseExtension *ext=0, bool plainGroup=false) const | |
bool linkEdit (const App::LinkBaseExtension *ext=0) const | |
void onChangeIcon () const | |
bool setEdit (int ModNum) override | |
is called by the document when the provider goes in edit mode More... | |
void setEditViewer (View3DInventorViewer *, int ModNum) override | |
adjust viewer settings when editing a view provider More... | |
bool setLinkType (App::LinkBaseExtension *ext) | |
void unsetEditViewer (View3DInventorViewer *) override | |
restores viewer settings when leaving editing mode More... | |
void updateDataPrivate (App::LinkBaseExtension *ext, const App::Property *) | |
void updateElementList (App::LinkBaseExtension *ext) | |
![]() | |
Gui::MDIView * getActiveView () const | |
Gui::MDIView * getEditingView () const | |
Gui::MDIView * getInventorView () const | |
Gui::MDIView * getViewOfNode (SoNode *node) const | |
SoNode * findFrontRootOfType (const SoType &type) const | |
Searches in all view providers that are attached to an object that is part of the same document as the object this view provider is attached to for an front root of type. More... | |
virtual bool isAttachedToDocument () const override | |
virtual const char * detachFromDocument () override | |
virtual void onPropertyStatusChanged (const App::Property &prop, unsigned long oldStatus) override | |
get called when a property status has changed More... | |
![]() | |
virtual QIcon mergeOverlayIcons (const QIcon &orig) const | |
virtual void unsetEdit (int ModNum) | |
is called when you lose the edit mode More... | |
int getEditingMode () const | |
return the edit mode or -1 if nothing is being edited More... | |
bool checkRecursion (SoNode *) | |
Helper method to check that the node is valid, i.e. More... | |
SoPickedPoint * getPointOnRay (const SbVec2s &pos, const View3DInventorViewer *viewer) const | |
Helper method to get picked entities while editing. More... | |
SoPickedPoint * getPointOnRay (const SbVec3f &pos, const SbVec3f &dir, const View3DInventorViewer *viewer) const | |
Helper method to get picked entities while editing. More... | |
![]() | |
void onBeforeChangeProperty (Document *doc, const Property *prop) | |
![]() | |
virtual const PropertyData & getPropertyData (void) const | |
virtual void handleChangedPropertyName (Base::XMLReader &reader, const char *TypeName, const char *PropName) | |
PropertyContainer::handleChangedPropertyName is called during restore to possibly fix reading of older versions of this property container. More... | |
virtual void handleChangedPropertyType (Base::XMLReader &reader, const char *TypeName, Property *prop) | |
PropertyContainer::handleChangedPropertyType is called during restore to possibly fix reading of older versions of the property container. More... | |
Protected Attributes | |
ViewProviderDocumentObject * childVp | |
LinkInfoPtr childVpLink | |
std::unique_ptr< DraggerContext > dragCtx | |
bool hasSubElement | |
bool hasSubName | |
LinkType linkType | |
LinkView * linkView | |
qint64 overlayCacheKey | |
CoinPtr< SoDragger > pcDragger | |
bool useCenterballDragger | |
![]() | |
App::DocumentObject * pcObject | |
Gui::Document * pcDocument | |
![]() | |
SoSeparator * pcRoot | |
The root Separator of the ViewProvider. More... | |
SoTransform * pcTransform | |
this is transformation for the provider More... | |
const char * sPixmap | |
SoSwitch * pcModeSwitch | |
this is the mode switch, all the different viewing modes are collected here More... | |
SoSeparator * pcAnnotation | |
The root separator for annotations. More... | |
ViewProviderPy * pyViewObject | |
std::string overrideMode | |
std::bitset< 32 > StatusBits | |
![]() | |
DynamicProperty dynamicProps | |
Additional Inherited Members | |
![]() | |
enum EditMode { Default = 0, Transform, Cutting, Color } | |
![]() | |
typedef std::map< Base::Type, App::Extension * >::iterator ExtensionIterator | |
![]() | |
static const PropertyData * getPropertyDataPtr (void) | |
![]() | |
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) | |
Member Enumeration Documentation
◆ LinkType
|
protected |
Constructor & Destructor Documentation
◆ ViewProviderLink()
ViewProviderLink::ViewProviderLink | ( | ) |
References ChildViewProvider, App::Material::DEFAULT, App::Material::diffuseColor, Gui::ViewProviderDocumentObject::DisplayMode, DrawStyle, App::Property::Hidden, Gui::ViewParams::instance(), LineWidth, linkView, App::Property::MaterialEdit, MaterialList, App::Property::NoMaterialListEdit, OverrideColorList, OverrideMaterial, OverrideMaterialList, PointSize, App::Prop_None, Selectable, App::PropertyFloatConstraint::setConstraints(), App::PropertyEnumeration::setEnums(), App::Color::setPackedValue(), App::Property::setStatus(), ShapeMaterial, and Gui::ViewProvider::sPixmap.
◆ ~ViewProviderLink()
|
virtual |
References linkView, and Gui::LinkView::setInvalid().
Member Function Documentation
◆ allowOverride()
|
overridevirtual |
Allow this class to be used as an override for the original view provider of the given object.
Reimplemented from Gui::ViewProviderDocumentObject.
◆ applyColors()
|
protected |
References Gui::SoSelectionElementAction::Color, getDetailPath(), getElementColors(), getLinkExtension(), Gui::LinkView::getLinkRoot(), Gui::ViewProviderDocumentObject::getObject(), Gui::ViewProvider::hiddenMarker(), Gui::SoSelectionElementAction::Hide, linkView, and App::DocumentObject::resolve().
Referenced by finishRestoring(), onChanged(), updateDataPrivate(), and updateElementList().
◆ applyMaterial()
|
protected |
References Gui::LinkView::getSize(), App::PropertyListsBase::getSize(), App::PropertyListsT< T, ListT, ParentT >::getSize(), App::PropertyBool::getValue(), App::PropertyMaterial::getValue(), linkView, MaterialList, OverrideMaterial, OverrideMaterialList, Gui::LinkView::setMaterial(), and ShapeMaterial.
Referenced by finishRestoring(), onChanged(), and updateDataPrivate().
◆ attach()
|
overridevirtual |
Reimplemented from Gui::ViewProviderDocumentObject.
References Gui::ViewProvider::addDisplayMaskMode(), Gui::ViewProviderDocumentObject::attach(), checkIcon(), childVp, childVpLink, Gui::LinkInfo::get(), Base::Persistence::getClassTypeId(), App::DocumentObject::getFullName(), Gui::LinkView::getLinkRoot(), Gui::ViewProviderDocumentObject::hide(), Base::BaseClass::isDerivedFrom(), linkView, Gui::ViewProvider::setDisplayMaskMode(), Gui::LinkView::setOwner(), and Gui::LinkView::SnapshotTransform.
◆ callDraggerProxy()
◆ canDelete()
|
overridevirtual |
Asks the view provider if the given object can be deleted.
Reimplemented from Gui::ViewProviderDocumentObject.
References getLinkedView(), getLinkExtension(), hasElements(), hasSubElement, and isGroup().
◆ canDragAndDropObject()
|
overridevirtual |
Return false to force drop only operation for a given object.
Reimplemented from Gui::ViewProvider.
References App::DocumentObject::getDocument(), getLinkedView(), getLinkExtension(), Gui::ViewProviderDocumentObject::getObject(), hasElements(), hasSubName, isGroup(), and App::LinkBaseExtension::LinkModeAutoLink.
◆ canDragObject()
|
overridevirtual |
Check whether the object can be removed from the view provider by drag and drop.
Reimplemented from Gui::ViewProvider.
References getLinkedView(), getLinkExtension(), hasElements(), and isGroup().
◆ canDragObjects()
|
overridevirtual |
Check whether children can be removed from the view provider by drag and drop.
Reimplemented from Gui::ViewProvider.
References getLinkedView(), getLinkExtension(), hasElements(), and isGroup().
◆ canDropObjectEx()
|
overridevirtual |
Query object dropping with full quanlified name.
Tree view now calls this function instead of canDropObject(), and may query for objects from other document. The default implementation (actually in ViewProviderDocumentObject) inhibites cross document dropping, and calls canDropObject(obj) for the rest. Override this function to enable cross document linking.
- Parameters
-
obj the object being dropped owner the (grand)parent object of the dropping object. Maybe null. This may not be the top parent object, as tree view will try to find a parent of the dropping object relative to this object to avoid cyclic dependency subname subname reference to the dropping object elements non-object sub-elements, e.g. Faces, Edges, selected when the object is being dropped
- Returns
- Return whether the dropping action is allowed.
Reimplemented from Gui::ViewProviderDocumentObject.
References Gui::ViewProviderDocumentObject::getDocument(), getLinkedView(), getLinkExtension(), Gui::ViewProviderDocumentObject::getObject(), hasElements(), hasSubName, isGroup(), Gui::LinkView::isLinked(), linkView, and Gui::ViewProviderDocumentObject::pcObject.
◆ canDropObjects()
|
overridevirtual |
Check whether objects can be added to the view provider by drag and drop or drop only.
Reimplemented from Gui::ViewProvider.
References getLinkedView(), getLinkExtension(), hasElements(), hasSubElement, hasSubName, and isGroup().
◆ checkIcon()
|
protected |
References getLinkExtension(), Gui::ViewProviderDocumentObject::getObject(), getOverlayPixmap(), overlayCacheKey, Gui::ViewProvider::signalChangeIcon, and Gui::ViewProvider::sPixmap.
Referenced by attach(), and updateDataPrivate().
◆ claimChildren()
|
overridevirtual |
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 from Gui::ViewProvider.
References getLinkedView(), getLinkExtension(), hasElements(), hasSubName, and isGroup().
Referenced by 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().
◆ claimChildrenPrivate()
|
protected |
◆ currentDraggingPlacement()
Base::Placement ViewProviderLink::currentDraggingPlacement | ( | ) | const |
References pcDragger, Gui::SoFCCSysDragger::rotation, Gui::SoFCCSysDragger::translation, and useCenterballDragger.
Referenced by callDraggerProxy(), and updateDraggingPlacement().
◆ doubleClicked()
|
overridevirtual |
is called by the tree if the user double click on the object
Reimplemented from Gui::ViewProvider.
References Gui::ViewProvider::doubleClicked(), Gui::ViewProviderDocumentObject::getDocument(), Gui::LinkView::getLinkedView(), linkEdit(), linkView, Gui::Document::setEdit(), and Gui::ViewProvider::Transform.
◆ dragObject()
|
overridevirtual |
Remove a child from the view provider by drag and drop.
Reimplemented from Gui::ViewProvider.
References getLinkedView(), getLinkExtension(), hasElements(), and isGroup().
◆ dropObjectEx()
|
overridevirtual |
Add an object with full quanlified name to the view provider by drag and drop.
- Parameters
-
obj the object being dropped owner the (grand)parent object of the dropping object. Maybe null. This may not be the top parent object, as tree view will try to find a parent of the dropping object relative to this object to avoid cyclic dependency subname subname reference to the dropping object elements non-object sub-elements, e.g. Faces, Edges, selected when the object is being dropped
- Returns
- Optionally returns a subname reference locating the dropped object, which may or may not be the actual dropped object, e.g. it may be a link.
Reimplemented from Gui::ViewProvider.
References getLinkedView(), getLinkExtension(), hasElements(), hasSubName, and isGroup().
◆ enableCenterballDragger()
void ViewProviderLink::enableCenterballDragger | ( | bool | enable | ) |
References pcDragger, and useCenterballDragger.
Referenced by Gui::ViewProviderLinkPy::setUseCenterballDragger().
◆ finishRestoring()
|
overridevirtual |
Reimplemented from Gui::ViewProviderDocumentObject.
References applyColors(), applyMaterial(), childVp, DrawStyle, Gui::ViewProviderDocumentObject::finishRestoring(), Gui::ViewProviderDocumentObject::getDocument(), getLinkExtension(), App::PropertyEnumeration::getValue(), App::PropertyFloat::getValue(), LineWidth, linkView, PointSize, Gui::LinkView::setDrawStyle(), Gui::Document::signalChangedObject, and updateDataPrivate().
◆ getChildViewProvider()
ViewProviderDocumentObject* Gui::ViewProviderLink::getChildViewProvider | ( | ) | const |
◆ getDetailPath()
|
overridevirtual |
return the coin node detail and path to the node of the subname
Reimplemented from Gui::ViewProviderDocumentObject.
References childVpLink, Gui::ViewProvider::getDefaultMode(), getLinkExtension(), hasElements(), isGroup(), Gui::LinkView::linkGetDetailPath(), linkView, Gui::ViewProvider::pcModeSwitch, Gui::ViewProvider::pcRoot, and Gui::LinkView::SnapshotTransform.
Referenced by applyColors().
◆ getDisplayModes()
|
overridevirtual |
returns a list of all possible display modes
Reimplemented from Gui::ViewProvider.
References Gui::ViewProvider::getDisplayModes().
◆ getElementColors()
|
overridevirtual |
Reimplemented from Gui::ViewProvider.
References App::Color::a, App::Material::diffuseColor, App::DocumentObject::getLinkedObject(), getLinkExtension(), Gui::ViewProviderDocumentObject::getObject(), App::PropertyListsT< T, ListT, ParentT >::getSize(), App::PropertyBool::getValue(), App::PropertyMaterial::getValue(), Gui::Application::getViewProvider(), Gui::ViewProvider::hiddenMarker(), Gui::Application::Instance, OverrideColorList, OverrideMaterial, App::DocumentObject::resolve(), ShapeMaterial, and App::Material::transparency.
Referenced by applyColors().
◆ getElementPicked()
|
overridevirtual |
return a hit element given the picked point which contains the full node path
Reimplemented from Gui::ViewProviderDocumentObject.
References childVp, childVpLink, App::LinkBaseExtension::getArrayIndex(), Gui::ViewProviderDocumentObject::getElementPicked(), getLinkExtension(), isGroup(), isSelectable(), Gui::LinkView::linkGetElementPicked(), linkView, and Gui::LinkView::SnapshotTransform.
◆ getIcon()
|
overridevirtual |
deliver the icon shown in the tree view
Reimplemented from Gui::ViewProvider.
References Gui::BitmapFactory(), Gui::LinkView::getLinkedIcon(), getLinkExtension(), Gui::ViewProviderDocumentObject::getObject(), getOverlayPixmap(), linkView, overlayCacheKey, Gui::BitmapFactoryInst::pixmap(), and Gui::ViewProvider::sPixmap.
Referenced by ArchAxis.AxisSystemTaskPanel::update(), ArchSectionPlane.SectionPlaneTaskPanel::update(), and ArchComponent.ComponentTaskPanel::update().
◆ getLinkedView()
|
protected |
References App::DocumentObject::getLinkedObject(), getLinkExtension(), Gui::ViewProviderDocumentObject::getObject(), Gui::Application::getViewProvider(), and Gui::Application::Instance.
Referenced by canDelete(), canDragAndDropObject(), canDragObject(), canDragObjects(), canDropObjectEx(), canDropObjects(), claimChildren(), dragObject(), dropObjectEx(), and updateDataPrivate().
◆ getLinkedViewProvider()
|
overridevirtual |
Return the linked view object.
This function is mainly used for GUI navigation (e.g. StdCmdLinkSelectLinked).
- Parameters
-
subname output as the subname referencing the linked object recursive whether to follow the link recursively
- Returns
- Returns the linked view provider. If none, it shall return itself.
Reimplemented from Gui::ViewProviderDocumentObject.
References getLinkExtension(), and Gui::Application::Instance.
Referenced by getPropertyByName().
◆ getLinkExtension() [1/2]
|
protected |
◆ getLinkExtension() [2/2]
|
protected |
References App::ExtensionContainer::getExtensionByType(), App::DocumentObject::getNameInDocument(), and Gui::ViewProviderDocumentObject::pcObject.
Referenced by applyColors(), callDraggerProxy(), canDelete(), canDragAndDropObject(), canDragObject(), canDragObjects(), canDropObjectEx(), canDropObjects(), checkIcon(), claimChildren(), dragObject(), dropObjectEx(), finishRestoring(), getDetailPath(), getElementColors(), getElementPicked(), getIcon(), getLinkedView(), getLinkedViewProvider(), getOverlayPixmap(), hasElements(), initDraggingPlacement(), isGroup(), linkEdit(), setEdit(), setElementColors(), setOverrideMode(), setupContextMenu(), startEditing(), and updateData().
◆ getOverlayPixmap()
|
virtual |
References Gui::BitmapFactory(), getLinkExtension(), hasSubElement, hasSubName, and Gui::BitmapFactoryInst::pixmap().
Referenced by checkIcon(), and getIcon().
◆ getPropertyByName()
|
overridevirtual |
find a property by its name
Reimplemented from App::ExtensionContainer.
References App::DocumentObject::canLinkProperties(), childVp, getLinkedViewProvider(), App::ExtensionContainer::getPropertyByName(), App::Property::Hidden, and Gui::ViewProviderDocumentObject::pcObject.
Referenced by callDraggerProxy(), and initDraggingPlacement().
◆ getPropertyList()
|
overridevirtual |
get all properties of the class (including properties of the parent)
Reimplemented from App::ExtensionContainer.
References getPropertyMap().
◆ getPropertyMap()
|
overridevirtual |
get all properties of the class (including properties of the parent)
Reimplemented from App::ExtensionContainer.
References childVp, App::ExtensionContainer::getPropertyMap(), and App::Property::Hidden.
Referenced by getPropertyList().
◆ getPyLinkView()
PyObject * ViewProviderLink::getPyLinkView | ( | ) |
References Gui::LinkView::getPyObject(), and linkView.
◆ getPyObject()
|
overridevirtual |
Get the python wrapper for that ViewProvider.
Reimplemented from Gui::ViewProviderDocumentObject.
References Base::PyObjectBase::IncRef(), and Gui::ViewProvider::pyViewObject.
◆ hasElements()
|
protected |
References getLinkExtension().
Referenced by canDelete(), canDragAndDropObject(), canDragObject(), canDragObjects(), canDropObjectEx(), canDropObjects(), claimChildren(), dragObject(), dropObjectEx(), getDetailPath(), and linkEdit().
◆ initDraggingPlacement()
|
protected |
References dragCtx, Gui::Application::editDocument(), Gui::ViewProvider::getBoundingBox(), Base::Persistence::getClassTypeId(), getLinkExtension(), getPropertyByName(), App::PropertyPlacement::getValue(), Gui::LinkView::hasSubs(), Gui::Application::Instance, Base::Placement::inverse(), linkView, Base::Placement::toMatrix(), Base::PlacementPy::Type, Base::BoundBoxPy::Type, and Base::MatrixPy::Type.
Referenced by startEditing().
◆ isGroup()
|
protected |
References getLinkExtension().
Referenced by canDelete(), canDragAndDropObject(), canDragObject(), canDragObjects(), canDropObjectEx(), canDropObjects(), claimChildren(), dragObject(), dropObjectEx(), getDetailPath(), getElementPicked(), and linkEdit().
◆ isSelectable()
|
overridevirtual |
Reimplemented from Gui::ViewProvider.
References App::PropertyBool::getValue(), pcDragger, and Selectable.
Referenced by getElementPicked().
◆ isUsingCenterballDragger()
bool Gui::ViewProviderLink::isUsingCenterballDragger | ( | ) | const |
◆ linkEdit()
|
protected |
References getLinkExtension(), hasElements(), hasSubName, isGroup(), Gui::LinkView::isLinked(), and linkView.
Referenced by doubleClicked(), setupContextMenu(), and startEditing().
◆ onBeforeChange()
|
overridevirtual |
get called before the value is changed
Reimplemented from Gui::ViewProviderDocumentObject.
References Gui::ViewProvider::beforeDelete(), ChildViewProvider, childVp, childVpLink, Gui::LinkView::getLinkRoot(), linkView, Gui::ViewProviderDocumentObject::onBeforeChange(), and Gui::ViewProvider::pcModeSwitch.
◆ onChanged()
|
overridevirtual |
Gets called by the container whenever a property has been changed.
Reimplemented from Gui::ViewProviderDocumentObject.
References Gui::ViewProviderDocumentObject::allowOverride(), applyColors(), applyMaterial(), Gui::ViewProviderDocumentObject::attach(), ChildViewProvider, childVp, childVpLink, DrawStyle, Gui::LinkInfo::get(), Gui::ViewProviderDocumentObject::getFullName(), Base::Type::getName(), Gui::ViewProviderDocumentObject::getObject(), App::PropertyPersistentObject::getObject(), Base::Persistence::getTypeId(), App::PropertyEnumeration::getValue(), App::PropertyFloat::getValue(), App::PropertyBool::getValue(), Gui::ViewProvider::isRestoring(), LineWidth, linkView, MaterialList, Gui::ViewProviderDocumentObject::onChanged(), OverrideColorList, OverrideMaterial, OverrideMaterialList, Gui::ViewProvider::pcModeSwitch, PointSize, Gui::ViewProviderDocumentObject::setActiveMode(), Gui::LinkView::setDrawStyle(), App::PropertyContainer::setPropertyPrefix(), App::PropertyBool::setValue(), ShapeMaterial, Gui::LinkView::SnapshotTransform, Gui::ViewProviderDocumentObject::updateView(), and Gui::ViewProviderDocumentObject::Visibility.
Referenced by draftviewproviders.view_base.ViewProviderDraft::attach(), ArchSite.Compass::buildCoordinates(), draftobjects.wire.Wire::execute(), ArchAxis.CommandArchGrid::IsActive(), draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy::updateData(), draftviewproviders.view_label.ViewProviderLabel::updateData(), DraftLayer.ViewProviderLayer::updateData(), ArchBuildingPart.ViewProviderBuildingPart::updateData(), ArchPanel.ViewProviderPanelCut::updateData(), and ArchPanel.ViewProviderPanelSheet::updateData().
◆ onChangeIcon()
|
protected |
◆ onDelete()
|
overridevirtual |
Get called if the object is about to get deleted.
Here you can delete other objects, switch their visibility or prevent the deletion of the object.
- Parameters
-
subNames list of selected subelements
- Returns
- true if the deletion is approved by the view provider.
Reimplemented from Gui::ViewProvider.
References Gui::ViewProviderDocumentObject::getObject().
◆ reattach()
|
overridevirtual |
Reimplemented from Gui::ViewProviderDocumentObject.
References childVp, linkView, Gui::ViewProviderDocumentObject::reattach(), and Gui::LinkView::setOwner().
◆ setEdit()
|
overrideprotectedvirtual |
is called by the document when the provider goes in edit mode
Reimplemented from Gui::ViewProvider.
References Gui::ControlSingleton::activeDialog(), Gui::SelectionSingleton::clearSelection(), Gui::ViewProvider::Color, Gui::Control(), getLinkExtension(), Gui::Selection(), Gui::ViewProvider::setEdit(), and Gui::ControlSingleton::showDialog().
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(), PathScripts.PathIconViewProvider.ViewProvider::setupContextMenu(), PathScripts.PathToolControllerGui.ViewProvider::setupContextMenu(), PathScripts.PathOpGui.ViewProvider::setupContextMenu(), and PathScripts.PathJobGui.ViewProvider::setupContextMenu().
◆ setEditViewer()
|
overrideprotectedvirtual |
adjust viewer settings when editing a view provider
Reimplemented from Gui::ViewProvider.
References Gui::ViewProvider::Color, Gui::Control(), dragCtx, Gui::SoFCCSysDragger::draggerSize, pcDragger, Gui::SoFCCSysDragger::setUpAutoScale(), Gui::ControlSingleton::showDialog(), useCenterballDragger, and OfflineRenderingUtils::viewer().
◆ setElementColors()
|
overridevirtual |
Reimplemented from Gui::ViewProvider.
References App::Color::a, App::Material::diffuseColor, getLinkExtension(), Gui::ViewProviderDocumentObject::getObject(), App::PropertyMaterial::getValue(), App::PropertyListsT< T, ListT, ParentT >::getValues(), OverrideColorList, OverrideMaterial, App::Property::setStatus(), App::PropertyBool::setValue(), App::PropertyMaterial::setValue(), App::PropertyListsT< T, ListT, ParentT >::setValues(), ShapeMaterial, and App::Property::User3.
◆ setLinkType()
|
protected |
◆ setOverrideMode()
|
overridevirtual |
Overrides the display mode with mode.
Reimplemented from Gui::ViewProvider.
References childVp, getLinkExtension(), Gui::ViewProviderDocumentObject::getObject(), Gui::Application::getViewProvider(), Gui::Application::Instance, and Gui::ViewProvider::setOverrideMode().
◆ setupContextMenu()
set up the context-menu with the supported edit modes
Reimplemented from Gui::ViewProvider.
References Gui::ViewProvider::Color, Gui::LinkView::getLinkedView(), getLinkExtension(), linkEdit(), linkView, Gui::ViewProvider::setupContextMenu(), and Gui::ViewProvider::Transform.
◆ startEditing()
|
overridevirtual |
Reimplemented from Gui::ViewProvider.
References Gui::ViewProvider::Color, dragCtx, Gui::Application::editDocument(), App::DocumentObject::getLinkedObject(), Gui::LinkView::getLinkedView(), getLinkExtension(), Gui::ViewProviderDocumentObject::getObject(), initDraggingPlacement(), Gui::Application::Instance, linkEdit(), linkView, pcDragger, Gui::ViewProvider::startEditing(), Gui::ViewProvider::Transform, updateDraggingPlacement(), and useCenterballDragger.
Referenced by draftguitools.gui_edit.Edit::evaluate_menu_action(), and draftguitools.gui_edit.Edit::mousePressed().
◆ unsetEditViewer()
|
overrideprotectedvirtual |
restores viewer settings when leaving editing mode
Reimplemented from Gui::ViewProvider.
References Gui::ControlSingleton::closeDialog(), Gui::Control(), dragCtx, pcDragger, and OfflineRenderingUtils::viewer().
◆ updateData()
|
overridevirtual |
Reimplemented from Gui::ViewProvider.
References childVp, getLinkExtension(), App::DocumentObject::isRestoring(), Gui::ViewProvider::isRestoring(), Gui::ViewProviderDocumentObject::pcObject, Gui::ViewProvider::updateData(), and updateDataPrivate().
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(), and PathScripts.PathSetupSheetGui.OpTaskPanel::setupUi().
◆ updateDataPrivate()
|
protected |
References applyColors(), applyMaterial(), checkIcon(), Gui::ViewProviderDocumentObject::getDocument(), getLinkedView(), Gui::LinkView::getSize(), App::PropertyMaterial::getValue(), hasSubElement, hasSubName, Gui::LinkView::hasSubs(), Gui::Application::Instance, linkView, MaterialList, OverrideMaterialList, Gui::ViewProvider::pcTransform, Gui::LinkView::renderDoubleSide(), Base::Matrix4D::scale(), Gui::LinkView::setElementVisible(), Gui::LinkView::setLink(), setLinkType(), Gui::LinkView::setSize(), App::Property::setStatus(), Gui::LinkView::setTransform(), App::PropertyListsT< T, ListT, ParentT >::setValue(), ShapeMaterial, Gui::ViewProvider::signalChangeIcon, App::Property::testStatus(), updateElementList(), Gui::LinkView::updateLink(), Gui::ViewProviderDragger::updateTransform(), and App::Property::User3.
Referenced by finishRestoring(), and updateData().
◆ updateDraggingPlacement()
void ViewProviderLink::updateDraggingPlacement | ( | const Base::Placement & | pla, |
bool | force = false |
||
) |
References Gui::ViewProvider::convert(), currentDraggingPlacement(), Base::Placement::getPosition(), Base::Placement::getRotation(), pcDragger, Gui::SoFCCSysDragger::rotation, Base::Placement::toMatrix(), Gui::SoFCCSysDragger::translation, and useCenterballDragger.
Referenced by callDraggerProxy(), Gui::ViewProviderLinkPy::setDraggingPlacement(), and startEditing().
◆ updateElementList()
|
protected |
References applyColors(), App::PropertyListsBase::getSize(), App::PropertyListsT< T, ListT, ParentT >::getSize(), Gui::Application::Instance, linkView, MaterialList, OverrideMaterialList, Gui::LinkView::setChildren(), App::PropertyListsBase::setSize(), and App::PropertyListsT< T, ListT, ParentT >::setSize().
Referenced by updateDataPrivate().
◆ updateLinks()
|
static |
References App::ExtensionContainer::getExtensionByType().
Referenced by Gui::View3DInventorViewer::resetEditingRoot(), and Gui::View3DInventorViewer::setupEditingRoot().
◆ useNewSelectionModel()
|
overridevirtual |
indicates if the ViewProvider use the new Selection model
Reimplemented from Gui::ViewProvider.
Member Data Documentation
◆ ChildViewProvider
App::PropertyPersistentObject Gui::ViewProviderLink::ChildViewProvider |
Referenced by onBeforeChange(), onChanged(), and ViewProviderLink().
◆ childVp
|
protected |
Referenced by attach(), finishRestoring(), getElementPicked(), getPropertyByName(), getPropertyMap(), onBeforeChange(), onChanged(), reattach(), setOverrideMode(), and updateData().
◆ childVpLink
|
protected |
Referenced by attach(), getDetailPath(), getElementPicked(), onBeforeChange(), and onChanged().
◆ dragCtx
|
protected |
Referenced by callDraggerProxy(), initDraggingPlacement(), setEditViewer(), startEditing(), and unsetEditViewer().
◆ DrawStyle
App::PropertyEnumeration Gui::ViewProviderLink::DrawStyle |
Referenced by finishRestoring(), onChanged(), and ViewProviderLink().
◆ hasSubElement
|
protected |
Referenced by canDelete(), canDropObjects(), getOverlayPixmap(), and updateDataPrivate().
◆ hasSubName
|
protected |
◆ LineWidth
App::PropertyFloatConstraint Gui::ViewProviderLink::LineWidth |
Referenced by finishRestoring(), onChanged(), and ViewProviderLink().
◆ linkType
|
protected |
Referenced by setLinkType().
◆ linkView
|
protected |
Referenced by applyColors(), applyMaterial(), attach(), canDropObjectEx(), doubleClicked(), finishRestoring(), getDetailPath(), getElementPicked(), getIcon(), getPyLinkView(), initDraggingPlacement(), linkEdit(), onBeforeChange(), onChanged(), reattach(), setLinkType(), setupContextMenu(), startEditing(), updateDataPrivate(), updateElementList(), ViewProviderLink(), and ~ViewProviderLink().
◆ MaterialList
App::PropertyMaterialList Gui::ViewProviderLink::MaterialList |
Referenced by applyMaterial(), onChanged(), updateDataPrivate(), updateElementList(), and ViewProviderLink().
◆ overlayCacheKey
|
mutableprotected |
Referenced by checkIcon(), and getIcon().
◆ OverrideColorList
App::PropertyColorList Gui::ViewProviderLink::OverrideColorList |
Referenced by getElementColors(), onChanged(), setElementColors(), and ViewProviderLink().
◆ OverrideMaterial
App::PropertyBool Gui::ViewProviderLink::OverrideMaterial |
Referenced by applyMaterial(), getElementColors(), onChanged(), setElementColors(), and ViewProviderLink().
◆ OverrideMaterialList
App::PropertyBoolList Gui::ViewProviderLink::OverrideMaterialList |
Referenced by applyMaterial(), onChanged(), updateDataPrivate(), updateElementList(), and ViewProviderLink().
◆ pcDragger
◆ PointSize
App::PropertyFloatConstraint Gui::ViewProviderLink::PointSize |
Referenced by finishRestoring(), onChanged(), and ViewProviderLink().
◆ Selectable
App::PropertyBool Gui::ViewProviderLink::Selectable |
Referenced by isSelectable(), and ViewProviderLink().
◆ ShapeMaterial
App::PropertyMaterial Gui::ViewProviderLink::ShapeMaterial |
Referenced by applyMaterial(), getElementColors(), onChanged(), setElementColors(), updateDataPrivate(), and ViewProviderLink().
◆ useCenterballDragger
|
protected |
Referenced by currentDraggingPlacement(), enableCenterballDragger(), setEditViewer(), startEditing(), and updateDraggingPlacement().
The documentation for this class was generated from the following files:
- src/Gui/ViewProviderLink.h
- src/Gui/ViewProviderLink.cpp