draftviewproviders.view_facebinder.ViewProviderFacebinder Class Reference

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 onChanged (self, vobj, prop)
 
def setDisplayMode (self, mode)
 
def updateData (self, obj, prop)
 

Additional Inherited Members

- Public Attributes inherited from draftviewproviders.view_base.ViewProviderDraft
 Object
 
 texcoords
 
 texture
 

Member Function Documentation

◆ getIcon()

def draftviewproviders.view_facebinder.ViewProviderFacebinder.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 ArchAxis.AxisSystemTaskPanel.update(), ArchComponent.ComponentTaskPanel.update(), and ArchSectionPlane.SectionPlaneTaskPanel.update().

◆ setEdit()

def draftviewproviders.view_facebinder.ViewProviderFacebinder.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
    It is `True` if `mode` is 0, and `Draft_Edit` ran successfully.
    It is `False` otherwise.

Reimplemented from draftviewproviders.view_base.ViewProviderDraft.

Referenced by ArchAxis.ViewProviderArchGrid.doubleClicked(), ArchReference.ViewProviderArchReference.doubleClicked(), draftviewproviders.view_dimension.ViewProviderDimensionBase.doubleClicked(), PathScripts.PathPropertyBagGui.ViewProvider.doubleClicked(), PathScripts.PathSetupSheetGui.ViewProvider.doubleClicked(), PathScripts.PathToolBitGui.ViewProvider.doubleClicked(), Spreadsheet_legacy.ViewProviderSpreadsheet.doubleClicked(), ArchAxis.CommandArchGrid.IsActive(), ArchSchedule.CommandArchSchedule.IsActive(), PathScripts.PathIconViewProvider.ViewProvider.setupContextMenu(), PathScripts.PathJobGui.ViewProvider.setupContextMenu(), PathScripts.PathOpGui.ViewProvider.setupContextMenu(), and PathScripts.PathToolControllerGui.ViewProvider.setupContextMenu().

◆ unsetEdit()

def draftviewproviders.view_facebinder.ViewProviderFacebinder.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 is not used.
    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.

Referenced by PathScripts.PathJobGui.ViewProvider.uneditObject().


The documentation for this class was generated from the following file:
  • Sources/FreeCAD/src/Mod/Draft/draftviewproviders/view_facebinder.py