Public Member Functions | |
| def | getIcon (self) |
| def | setEdit (self, vobj, mode) |
| def | unsetEdit (self, vobj, mode) |
Public Member Functions inherited from draftviewproviders.view_base.ViewProviderDraft | |
| def | attach (self, vobj) |
| def | claimChildren (self) |
| def | execute (self, vobj) |
| def | getDefaultDisplayMode (self) |
| def | getDisplayModes (self, vobj) |
| def | getIcon (self) |
| def | onChanged (self, vobj, prop) |
| def | setDisplayMode (self, mode) |
| def | setEdit (self, vobj, mode=0) |
| def | unsetEdit (self, vobj, mode=0) |
| def | updateData (self, obj, prop) |
Public Attributes | |
| task | |
| wb_before_edit | |
Public Attributes inherited from draftviewproviders.view_base.ViewProviderDraft | |
| Object | |
| texcoords | |
| texture | |
| def draftviewproviders.view_shapestring.ViewProviderShapeString.getIcon | ( | self | ) |
Return the path to the icon used by the view provider.
The path can be a full path in the system, or a relative path
inside the compiled resource file.
It can also be a string that defines the icon in XPM format.
Override this method to provide a specific icon
for the object in the tree view.
By default it returns the path to the `Draft_Draft.svg` icon.
Returns
-------
str
`':/icons/Draft_Draft.svg'`
Reimplemented from draftviewproviders.view_base.ViewProviderDraft.
Referenced by ArchAxisSystem.AxisSystemTaskPanel.update(), ArchComponent.ComponentTaskPanel.update(), and ArchSectionPlane.SectionPlaneTaskPanel.update().
| def draftviewproviders.view_shapestring.ViewProviderShapeString.setEdit | ( | self, | |
| vobj, | |||
| mode | |||
| ) |
Enter edit mode of the object.
Override this method to define a custom command to run when entering
the edit mode of the object in the tree view.
It must return `True` to successfully enter edit mode.
If the conditions to edit are not met, it should return `False`,
in which case the edit mode is not started.
By default it runs the `Draft_Edit` GuiCommand.
::
Gui.runCommand('Draft_Edit')
Parameters
----------
vobj : the view provider of the scripted object.
This is `obj.ViewObject`.
mode : int, optional
It defaults to 0, in which case
it runs the `Draft_Edit` GuiCommand.
It indicates the type of edit in the underlying C++ code.
Returns
-------
bool or None
It is `True` if `mode` is 0, and `Draft_Edit` ran successfully.
None if mode is not zero.
It is `False` otherwise.
Reimplemented from draftviewproviders.view_base.ViewProviderDraft.
Referenced by ArchGrid.ViewProviderArchGrid.doubleClicked(), ArchReference.ViewProviderArchReference.doubleClicked(), draftviewproviders.view_dimension.ViewProviderDimensionBase.doubleClicked(), draftviewproviders.view_hatch.ViewProviderDraftHatch.doubleClicked(), draftviewproviders.view_text.ViewProviderText.doubleClicked(), PathScripts.PathPropertyBagGui.ViewProvider.doubleClicked(), PathScripts.PathSetupSheetGui.ViewProvider.doubleClicked(), PathScripts.PathToolBitGui.ViewProvider.doubleClicked(), Spreadsheet_legacy.ViewProviderSpreadsheet.doubleClicked(), ArchSchedule.CommandArchSchedule.IsActive(), PathScripts.PathIconViewProvider.ViewProvider.setupContextMenu(), PathScripts.PathJobGui.ViewProvider.setupContextMenu(), PathScripts.PathOpGui.ViewProvider.setupContextMenu(), and PathScripts.PathToolControllerGui.ViewProvider.setupContextMenu().
| def draftviewproviders.view_shapestring.ViewProviderShapeString.unsetEdit | ( | self, | |
| vobj, | |||
| mode | |||
| ) |
Terminate the edit mode of the object.
Override this method to define a custom command to run when
terminating the edit mode of the object in the tree view.
It should return `True` to indicate that the method already
cleaned up everything and there is no need to call
the `usetEdit` method of the base class.
It should return `False` to indicate that cleanup
is still required, so the `unsetEdit` method of the base class
is invoked to do the rest.
By default it runs the `finish` method of the active
Draft GuiCommand, and closes the task panel.
::
App.activeDraftCommand.finish()
Gui.Control.closeDialog()
Parameters
----------
vobj : the view provider of the scripted object.
This is `obj.ViewObject`.
mode : int, optional
It defaults to 0.
It indicates the type of edit in the underlying C++ code.
Returns
-------
bool
This method always returns `False` so it passes
control to the base class to finish the edit mode.
Reimplemented from draftviewproviders.view_base.ViewProviderDraft.
References draftguitools.gui_scale.Scale.task, draftguitools.gui_shapestrings.ShapeString.task, draftviewproviders.view_shapestring.ViewProviderShapeString.task, and draftviewproviders.view_shapestring.ViewProviderShapeString.wb_before_edit.
Referenced by PathScripts.PathJobGui.ViewProvider.uneditObject().
| draftviewproviders.view_shapestring.ViewProviderShapeString.task |
| draftviewproviders.view_shapestring.ViewProviderShapeString.wb_before_edit |