Example #1
0
class MarzWorkbench(Gui.Workbench):
    """"Marz Workbench"""

    Icon = ui.iconPath('MarzWorkbench.svg')
    MenuText = "Marz Guitar Designer"
    ToolTip = "Guitar Design Workbench"
    Categories = ['Musical Instruments']

    def __init__(self):
        self.showAbout = True

    def GetClassName(self):
        return "Gui::PythonWorkbench"

    def Initialize(self):
        import freecad.marz.command
        commands = [
            "MarzCmdCreateInstrument",
            "MarzCmdCreateFretboard",
            "MarzCmdCreateNeck",
            "MarzCmdCreateBody",
            "MarzCmdCreateConstructionLines",
            "MarzCmdImportBodyShape",
            "MarzCmdImportHeadstockShape",
            "MarzCmdImportFretInlays",
        ]
        self.appendToolbar("Marz", commands)
        self.appendMenu("&Guitar", commands + ['MarzCmdShowAboutWindow'])

    def Activated(self):
        if self.showAbout:
            self.showAbout = False
            from freecad.marz.feature.widget_about import MarzAboutWindow
            MarzAboutWindow.execute(False, 1000)

    def Deactivated(self):
        pass
 def getIcon(self):
     return iconPath('instrument_feature.svg')
Example #3
0
 def GetResources(self):
     return {
         "MenuText": "Create Neck",
         "ToolTip": "Create Neck",
         "Pixmap": ui.iconPath('create_neck.svg')
     }
Example #4
0
 def GetResources(self):
     return {
         "MenuText": "Import body shape svg",
         "ToolTip": "Import body shape svg",
         "Pixmap": ui.iconPath('import_body_shape.svg')
     }
Example #5
0
 def GetResources(self):
     return {
         "MenuText": "About Marz Designer Workbench",
         "ToolTip": "About Marz Designer Workbench",
         "Pixmap": ui.iconPath('MarzWorkbench.svg')
     }
Example #6
0
 def GetResources(self):
     return {
         "MenuText": "Import fret inlays svg",
         "ToolTip": "Import fret inlays svg",
         "Pixmap": ui.iconPath('import_fret_inlays.svg')
     }
Example #7
0
 def GetResources(self):
     return {
         "MenuText": "Create Body",
         "ToolTip": "Create Guitar Body",
         "Pixmap": ui.iconPath('create_body.svg')
     }
Example #8
0
 def GetResources(self):
     return {
         "MenuText": "Create Fretboard",
         "ToolTip": "Create Guitar Fretboard",
         "Pixmap": ui.iconPath('create_fretboard.svg')
     }
Example #9
0
 def GetResources(self):
     return {
         "MenuText": "Create construction lines",
         "ToolTip": "Create construction lines",
         "Pixmap": ui.iconPath('create_constructions.svg')
     }