menu cleanup

This commit is contained in:
sliptonic 2016-09-15 09:55:28 -05:00 committed by Yorik van Havre
parent 2f04ea9586
commit 05ff7e40d5
9 changed files with 29 additions and 30 deletions

View File

@ -27,6 +27,7 @@ SET(PathScripts_SRCS
PathScripts/rml_post.py
PathScripts/TooltableEditor.py
PathScripts/PathProfile.py
PathScripts/PathContour.py
PathScripts/PathPocket.py
PathScripts/PathDrilling.py
PathScripts/PathDressup.py

View File

@ -70,16 +70,15 @@ class PathWorkbench (Workbench):
from PathScripts import PathContour
# build commands list
projcmdlist = ["Path_Job", "Path_Post","Separator", "Path_Inspect", "Path_Sanity"]
projcmdlist = ["Path_Job", "Path_Post", "Path_Inspect", "Path_Sanity"]
toolcmdlist = ["Path_ToolLibraryEdit", "Path_LoadTool"]
prepcmdlist = ["Path_Plane", "Path_Fixture", "Path_ToolLenOffset", "Path_Comment",
"Path_Stop", "Path_FaceProfile", "Path_FacePocket", "Path_Custom", "Path_FromShape"]
opcmdlist = ["Path_Contour", "Path_Profile", "Path_Pocket",
"Path_Drilling", "Path_Engrave", "Path_Surfacing"]
modcmdlist = ["Path_Copy", "Path_CompoundExtended", "Path_Array",
"Path_SimpleCopy" ]
modcmdmore = ["Path_Dressup", "Path_Hop", "DragKnife_Dressup"]
remotecmdlist = ["Path_Remote"]
prepcmdlist = ["Path_Plane", "Path_Fixture", "Path_ToolLenOffset", "Path_Comment", "Path_Stop", "Path_FaceProfile", "Path_FacePocket", "Path_Custom", "Path_FromShape"]
twodopcmdlist = ["Path_Contour", "Path_Profile", "Path_Pocket", "Path_Drilling", "Path_Engrave"]
threedopcmdlist = ["Path_Surfacing"]
modcmdlist = ["Path_Copy", "Path_CompoundExtended", "Path_Array", "Path_SimpleCopy" ]
dressupcmdlist = ["DragKnife_Dressup"]
#modcmdmore = ["Path_Hop",]
#remotecmdlist = ["Path_Remote"]
# Add commands to menu and toolbar
def QT_TRANSLATE_NOOP(scope, text):
@ -90,23 +89,24 @@ class PathWorkbench (Workbench):
self.appendToolbar(translate("Path", "Project Setup"), projcmdlist)
self.appendToolbar(translate("Path", "Tool Commands"), toolcmdlist)
#self.appendToolbar(translate("Path", "Partial Commands"), prepcmdlist)
self.appendToolbar(translate("Path", "New Operations"), opcmdlist)
self.appendToolbar(translate("Path", "New Operations"), twodopcmdlist+threedopcmdlist)
self.appendToolbar(translate("Path", "Path Modification"), modcmdlist)
self.appendMenu([translate("Path", "Path"), translate(
"Path", "Project Tools")], projcmdlist)
self.appendMenu([translate("Path", "Path"), translate(
"Path", "Tools")], toolcmdlist)
self.appendMenu([translate("Path", "Path"), translate(
self.appendMenu([translate("Path", "&Path")], projcmdlist +["Separator"] + toolcmdlist +["Separator"] +twodopcmdlist +["Separator"] +threedopcmdlist +["Separator"])
#self.appendMenu([translate("Path", "Path"), translate(
# "Path", "Tools")], toolcmdlist)
self.appendMenu([translate("Path", "&Path"), translate(
"Path", "Path Dressup")], dressupcmdlist)
self.appendMenu([translate("Path", "&Path"), translate(
"Path", "Partial Commands")], prepcmdlist)
self.appendMenu([translate("Path", "Path"), translate(
"Path", "New Operations")], opcmdlist)
self.appendMenu([translate("Path", "Path"), translate(
#self.appendMenu([translate("Path", "Path"), translate(
# "Path", "New Operations")], opcmdlist)
self.appendMenu([translate("Path", "&Path"), translate(
"Path", "Path Modification")], modcmdlist)
self.appendMenu([translate("Path", "Path"), translate(
"Path", "Path Modification")], modcmdmore)
self.appendMenu([translate("Path", "Path"), translate(
"Path", "Remote Operations")], remotecmdlist)
#self.appendMenu([translate("Path", "Path"), translate(
# "Path", "Path Modification")], modcmdmore)
# self.appendMenu([translate("Path", "Path"), translate(
# "Path", "Remote Operations")], remotecmdlist)
# Add preferences pages
import os

View File

@ -472,7 +472,6 @@ class CommandDragknifeDressup:
def GetResources(self):
return {'Pixmap': 'Path-Dressup',
'MenuText': QtCore.QT_TRANSLATE_NOOP("DragKnife_Dressup", "DragKnife Dress-up"),
'Accel': "P, S",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("DragKnife_Dressup", "Modifies a path to add dragknife corner actions")}
def IsActive(self):

View File

@ -24,7 +24,6 @@
import FreeCAD
import Path
import numpy
from FreeCAD import Vector
from PathScripts import PathUtils
from PathScripts.PathUtils import depth_params
@ -366,8 +365,8 @@ class CommandPathContour:
def GetResources(self):
return {'Pixmap': 'Path-Contour',
'MenuText': QtCore.QT_TRANSLATE_NOOP("PathContour", "Contour"),
'Accel': "P, P",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathContour", "Creates a Path Contour object from selected faces")}
'Accel': "P, C",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathContour", "Creates a Contour Path for the Base Object ")}
def IsActive(self):
if FreeCAD.ActiveDocument is not None:

View File

@ -189,7 +189,7 @@ class CommandJob:
def GetResources(self):
return {'Pixmap': 'Path-Job',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Job"),
'Accel': "P, P",
'Accel': "P, J",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Creates a Path Job object")}
def IsActive(self):

View File

@ -145,7 +145,6 @@ class CommandPathLoadTool:
def GetResources(self):
return {'Pixmap': 'Path-LoadTool',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_LoadTool", "Add Tool Controller to the Job"),
'Accel': "P, T",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_LoadTool", "Add Tool Controller")}
def IsActive(self):

View File

@ -456,7 +456,7 @@ class CommandPathProfile:
def GetResources(self):
return {'Pixmap': 'Path-Profile',
'MenuText': QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile"),
'Accel': "P, P",
'Accel': "P, R",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathProfile", "Creates a Path Profile object from selected faces")}
def IsActive(self):

View File

@ -371,7 +371,7 @@ class CommandPathSurfacing:
def GetResources(self):
return {'Pixmap': 'Path-3DSurface',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Surface", "Surfacing"),
'Accel': "P, D",
'Accel': "P, S",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Surface", "Creates a Path Surfacing object")}
def IsActive(self):

View File

@ -577,6 +577,7 @@ class CommandToolLibraryEdit():
def GetResources(self):
return {'Pixmap' : 'Path-ToolTable',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_ToolTable","Edit the Tool Library"),
'Accel': "P, T",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_ToolTable","Edit the Tool Library")}
def IsActive(self):