framework/InitGui.py

42 lines
1.4 KiB
Python
Raw Normal View History

2018-01-15 14:35:59 +01:00
class ARBench(Workbench):
MenuText = "ARBench"
ToolTip = "Annotation for Robotics workbench"
Icon = """"""
def __init__(self):
import os
2018-01-16 14:37:24 +01:00
self.Icon = os.path.join(FreeCAD.getUserAppDataDir(), "Mod",
"ARBench", "UI", "icons", "frame.svg")
2018-01-15 14:35:59 +01:00
def Initialize(self):
"""This function is executed when FreeCAD starts"""
import ARFrames
self.framecommands = ["FrameCommand",
"AllPartFramesCommand",
"FeatureFrameCommand"]
2022-02-07 20:54:17 +00:00
self.toolcommands = ["ExportPartInfoAndFeaturesDialogueCommand",
"ExportGazeboModels",
"InsertGraspPose"]
2018-01-15 14:35:59 +01:00
self.appendToolbar("AR Frames", self.framecommands)
2018-01-16 14:37:24 +01:00
self.appendToolbar("AR Tools", self.toolcommands)
2018-01-15 14:35:59 +01:00
def Activated(self):
"""This function is executed when the workbench is activated."""
#
return
def Deactivated(self):
"""This function is executed when the workbench is deactivated."""
#
return
def ContextMenu(self, recipient):
"""This is execcuted whenever the user right-clicks on screen."""
pass
def GetClassName(self):
2018-01-16 14:37:24 +01:00
# This function is mandatory if this is a full python workbench
2018-01-15 14:35:59 +01:00
return "Gui::PythonWorkbench"
Gui.addWorkbench(ARBench())