RobRotation.RobRotationCommand Class Reference

Class specifying Animate workbench's RobRotation button/command. More...

Inheritance diagram for RobRotation.RobRotationCommand:

Public Member Functions

def GetResources (self)
 Method used by FreeCAD to retrieve resources to use for this command. More...
 
def Activated (self)
 Method used as a callback when the toolbar button or the menu item is clicked. More...
 
def IsActive (self)
 Method to specify when the toolbar button and the menu item are enabled. More...
 

Detailed Description

Class specifying Animate workbench's RobRotation button/command.

This class provides resources for a toolbar button and a menu button. It controls their behaivor(Active/Inactive) and responds to callbacks after either of them was clicked(Activated).

Definition at line 1131 of file RobRotation.py.

Member Function Documentation

◆ Activated()

def RobRotation.RobRotationCommand.Activated (   self)

Method used as a callback when the toolbar button or the menu item is clicked.

This method creates a RobRotation instance in currently active document. Afterwards it adds a RobRotationProxy as a Proxy to this instance as well as ViewProviderRobRotationProxy to its ViewObject.Proxy, if FreeCAD runs in the Graphic mode.

Definition at line 1154 of file RobRotation.py.

1154  def Activated(self):
1155  doc = FreeCAD.ActiveDocument
1156  a = doc.addObject("App::DocumentObjectGroupPython", "RobRotation")
1157  RobRotationProxy(a)
1158  if FreeCAD.GuiUp:
1159  ViewProviderRobRotationProxy(a.ViewObject)
1160  doc.recompute()
1161  return
1162 
def Activated(self)
Method used as a callback when the toolbar button or the menu item is clicked.
Definition: Trajectory.py:1575

◆ GetResources()

def RobRotation.RobRotationCommand.GetResources (   self)

Method used by FreeCAD to retrieve resources to use for this command.

Returns
A dict with items PixMap, MenuText and ToolTip which contain a path to a command icon, a text to be shown in a menu and a tooltip message.

Definition at line 1141 of file RobRotation.py.

1141  def GetResources(self):
1142  return {'Pixmap': path.join(PATH_TO_ICONS, "RobRotationCmd.png"),
1143  'MenuText': "RobRotation",
1144  'ToolTip': "Create RobRotation instance."}
1145 
def GetResources(self)
Method used by FreeCAD to retrieve resources to use for this command.
Definition: Trajectory.py:1562

◆ IsActive()

def RobRotation.RobRotationCommand.IsActive (   self)

Method to specify when the toolbar button and the menu item are enabled.

The toolbar button RobRotation and menu item RobRotation are set to be active only when there is an active document in which a RobRotation instance can be created.

Returns
True if buttons shall be enabled and False otherwise.

Definition at line 1173 of file RobRotation.py.

1173  def IsActive(self):
1174  if FreeCAD.ActiveDocument is None:
1175  return False
1176  else:
1177  return True
1178 
1179 
def IsActive(self)
Method to specify when the toolbar button and the menu item are enabled.
Definition: Trajectory.py:1594

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