+ implement class PythonGroupCommand
This commit is contained in:
@@ -193,6 +193,44 @@ class TemplatePyMod_Cmd6:
|
||||
def GetResources(self):
|
||||
return {'Pixmap' : 'python', 'MenuText': 'Create a box', 'ToolTip': 'Use Box feature class which is completely written in Python'}
|
||||
|
||||
class TemplatePyGrp_1:
|
||||
def Activated(self):
|
||||
import FreeCAD
|
||||
FreeCAD.Console.PrintMessage("TemplatePyGrp_1\n")
|
||||
|
||||
def GetResources(self):
|
||||
return {'Pixmap' : 'Part_JoinConnect', 'MenuText': 'TemplatePyGrp_1', 'ToolTip': 'Print a message'}
|
||||
|
||||
class TemplatePyGrp_2:
|
||||
def Activated(self):
|
||||
import FreeCAD
|
||||
FreeCAD.Console.PrintMessage("TemplatePyGrp_2\n")
|
||||
|
||||
def GetResources(self):
|
||||
return {'Pixmap' : 'Part_JoinEmbed', 'MenuText': 'TemplatePyGrp_2', 'ToolTip': 'Print a message'}
|
||||
|
||||
class TemplatePyGrp_3:
|
||||
def Activated(self):
|
||||
import FreeCAD
|
||||
FreeCAD.Console.PrintMessage("TemplatePyGrp_3\n")
|
||||
|
||||
def GetResources(self):
|
||||
return {'Pixmap' : 'Part_JoinCutout', 'MenuText': 'TemplatePyGrp_3', 'ToolTip': 'Print a message'}
|
||||
|
||||
class TemplatePyGroup:
|
||||
"Example group command class"
|
||||
#def Activated(self, index):
|
||||
# print "TemplatePyGroup activated ;-) "
|
||||
|
||||
def GetCommands(self):
|
||||
return ("TemplatePyGrp_1", "TemplatePyGrp_2", "TemplatePyGrp_3", "Std_New")
|
||||
|
||||
def GetDefaultCommand(self):
|
||||
return 2
|
||||
|
||||
def GetResources(self):
|
||||
return {'Pixmap' : 'python', 'MenuText': 'Group command', 'ToolTip': 'Example group command'}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Adds the commands to the FreeCAD command manager
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -202,4 +240,7 @@ addCommand('TemplatePyMod_Cmd3',TemplatePyMod_Cmd3())
|
||||
FreeCADGui.addCommand('TemplatePyMod_Cmd4',TemplatePyMod_Cmd4())
|
||||
FreeCADGui.addCommand('TemplatePyMod_Cmd5',TemplatePyMod_Cmd5())
|
||||
FreeCADGui.addCommand('TemplatePyMod_Cmd6',TemplatePyMod_Cmd6())
|
||||
|
||||
FreeCADGui.addCommand('TemplatePyGrp_1',TemplatePyGrp_1())
|
||||
FreeCADGui.addCommand('TemplatePyGrp_2',TemplatePyGrp_2())
|
||||
FreeCADGui.addCommand('TemplatePyGrp_3',TemplatePyGrp_3())
|
||||
FreeCADGui.addCommand('TemplatePyGroup',TemplatePyGroup())
|
||||
|
||||
Reference in New Issue
Block a user