Proxy class for Gui.ViewProviderDocumentObject
CollisionDetector.ViewObject.
More...
Public Member Functions | |
def | __init__ (self, vp) |
Initialization method for ViewProviderCollisionDetectorProxy. More... | |
def | onDelete (self, vp, subelements) |
Method called when CollisionDetector is about to be deleted. More... | |
def | getIcon (self) |
Method used to get a path to an icon which will appear in the tree view. More... | |
def | setProperties (self, vp) |
Method to hide properties and attach CollisionDetectorProxy. More... | |
def | doubleClicked (self, vp) |
Method called when CollisionDetector is double-clicked in the Tree View. More... | |
def | setupContextMenu (self, vp, menu) |
Method editing a context menu for right click on a CollisionDetector. More... | |
def | __getstate__ (self) |
Necessary method to avoid errors when trying to save unserializable objects. More... | |
def | __setstate__ (self, state) |
Necessary method to avoid errors when trying to restore unserializable objects. More... | |
def | claimChildren (self) |
Method necessary for maintaining a tree structure. More... | |
def | canDropObject (self, obj) |
Method deciding which objects can be added to a CollisionDetector group. More... | |
Public Attributes | |
fp | |
A CollisionDetector object. More... | |
Proxy class for Gui.ViewProviderDocumentObject
CollisionDetector.ViewObject.
A ViewProviderCollisionDetectorProxy instance provides a CollisionDetector's icon, double-click response and context menu with "Check collisions" and "Reset collision display".
To connect this Proxy
object to a Gui.ViewProviderDocumentObject
CollisionDetector.ViewObject do:
Definition at line 782 of file CollisionDetector.py.
def CollisionDetector.ViewProviderCollisionDetectorProxy.__init__ | ( | self, | |
vp | |||
) |
Initialization method for ViewProviderCollisionDetectorProxy.
A class instance is created and made a Proxy
for a generic Gui.ViewProviderDocumentObject
CollisionDetector.ViewObject. During initialization number of properties are specified and preset.
vp | A barebone CollisionDetector.ViewObject. |
Definition at line 797 of file CollisionDetector.py.
def CollisionDetector.ViewProviderCollisionDetectorProxy.__getstate__ | ( | self | ) |
Necessary method to avoid errors when trying to save unserializable objects.
This method is used by JSON to serialize unserializable objects during autosave. Without this an Error would rise when JSON would try to do that itself.
We need this for unserializable fp
attribute, but we don't serialize it, because it's enough to reset it when object is restored.
Definition at line 893 of file CollisionDetector.py.
def CollisionDetector.ViewProviderCollisionDetectorProxy.__setstate__ | ( | self, | |
state | |||
) |
Necessary method to avoid errors when trying to restore unserializable objects.
This method is used during a document restoration. We need this for unserializable fp
attribute, but we do not restore it, because it's enough to reset it.
Definition at line 906 of file CollisionDetector.py.
def CollisionDetector.ViewProviderCollisionDetectorProxy.canDropObject | ( | self, | |
obj | |||
) |
Method deciding which objects can be added to a CollisionDetector group.
Returns always False so that no foreign objects are added.
obj | An object to be added inside the group. |
obj
can't be added to a CollisionDetector group. Definition at line 932 of file CollisionDetector.py.
def CollisionDetector.ViewProviderCollisionDetectorProxy.claimChildren | ( | self | ) |
Method necessary for maintaining a tree structure.
Definition at line 915 of file CollisionDetector.py.
def CollisionDetector.ViewProviderCollisionDetectorProxy.doubleClicked | ( | self, | |
vp | |||
) |
Method called when CollisionDetector is double-clicked in the Tree View.
It tries to check collisions.
vp | A double-clicked CollisionDetector.ViewObject. |
Definition at line 854 of file CollisionDetector.py.
def CollisionDetector.ViewProviderCollisionDetectorProxy.getIcon | ( | self | ) |
Method used to get a path to an icon which will appear in the tree view.
Definition at line 823 of file CollisionDetector.py.
def CollisionDetector.ViewProviderCollisionDetectorProxy.onDelete | ( | self, | |
vp, | |||
subelements | |||
) |
Method called when CollisionDetector is about to be deleted.
This method is used to return observed objects to their original style.
vp | A Gui.ViewProviderDocumentObject CollisionDEtector.ViewObject. |
subelements | An unused argument from C++ binding. |
Definition at line 813 of file CollisionDetector.py.
def CollisionDetector.ViewProviderCollisionDetectorProxy.setProperties | ( | self, | |
vp | |||
) |
Method to hide properties and attach CollisionDetectorProxy.
This method is called during initialization or document restoration. All unused unnecessary view properties are hidden.
vp | A Gui.ViewProviderDocumentObject CollisionDetector.ViewObject. |
Definition at line 835 of file CollisionDetector.py.
def CollisionDetector.ViewProviderCollisionDetectorProxy.setupContextMenu | ( | self, | |
vp, | |||
menu | |||
) |
Method editing a context menu for right click on a CollisionDetector.
The Transform and Set colors... items are removed from the context menu shown upon right click on CollisionDetector in the Tree View. The option to Check collisions, or Reset collision display is added instead.
vp | A right-clicked CollisionDetector.ViewObject. |
menu | A Qt's QMenu to be edited. |
Definition at line 872 of file CollisionDetector.py.
CollisionDetector.ViewProviderCollisionDetectorProxy.fp |
A CollisionDetector object.
Definition at line 841 of file CollisionDetector.py.