From 5ff9f0fa26595d9237ac395edc9d0c4d995440de Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Tue, 28 Nov 2017 15:55:55 -0800 Subject: [PATCH] Added template export to Path menu, rearranged layout a bit for better consistency. --- src/Mod/Path/Gui/Resources/Path.qrc | 1 + .../Resources/icons/Path-ExportTemplate.svg | 1192 +++++++++++++++++ src/Mod/Path/InitGui.py | 14 +- src/Mod/Path/PathCommands.py | 1 + src/Mod/Path/PathScripts/PathJobCmd.py | 2 +- 5 files changed, 1203 insertions(+), 7 deletions(-) create mode 100644 src/Mod/Path/Gui/Resources/icons/Path-ExportTemplate.svg diff --git a/src/Mod/Path/Gui/Resources/Path.qrc b/src/Mod/Path/Gui/Resources/Path.qrc index 6f8a10d0eb..5e7a3829cc 100644 --- a/src/Mod/Path/Gui/Resources/Path.qrc +++ b/src/Mod/Path/Gui/Resources/Path.qrc @@ -15,6 +15,7 @@ icons/Path-Dressup.svg icons/Path-Drilling.svg icons/Path-Engrave.svg + icons/Path-ExportTemplate.svg icons/Path-FacePocket.svg icons/Path-FaceProfile.svg icons/Path-Face.svg diff --git a/src/Mod/Path/Gui/Resources/icons/Path-ExportTemplate.svg b/src/Mod/Path/Gui/Resources/icons/Path-ExportTemplate.svg new file mode 100644 index 0000000000..9536887f16 --- /dev/null +++ b/src/Mod/Path/Gui/Resources/icons/Path-ExportTemplate.svg @@ -0,0 +1,1192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + Path-Job + 2016-06-27 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Path/Gui/Resources/icons/Path-Job.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Path/InitGui.py b/src/Mod/Path/InitGui.py index 7452d2386e..e522d87d6d 100644 --- a/src/Mod/Path/InitGui.py +++ b/src/Mod/Path/InitGui.py @@ -80,14 +80,14 @@ class PathWorkbench (Workbench): import PathCommands # build commands list - projcmdlist = ["Path_Job", "Path_Post", "Path_Inspect", "Path_Simulator"] - toolcmdlist = ["Path_ToolLibraryEdit"] + projcmdlist = ["Path_Job", "Path_Post"] + toolcmdlist = ["Path_Inspect", "Path_Simulator", "Path_ToolLibraryEdit", "Path_SelectLoop"] prepcmdlist = ["Path_Plane", "Path_Fixture", "Path_ToolLenOffset", "Path_Comment", "Path_Stop", "Path_Custom", "Path_Shape"] twodopcmdlist = ["Path_Contour", "Path_Profile_Faces", "Path_Profile_Edges", "Path_Pocket_Shape", "Path_Drilling", "Path_Engrave", "Path_MillFace", "Path_Helix"] threedopcmdlist = ["Path_Pocket_3D"] modcmdlist = ["Path_OperationCopy", "Path_Array", "Path_SimpleCopy" ] dressupcmdlist = ["PathDressup_Dogbone", "PathDressup_DragKnife", "PathDressup_Tag", "PathDressup_RampEntry"] - extracmdlist = ["Path_SelectLoop"] + extracmdlist = [] #modcmdmore = ["Path_Hop",] #remotecmdlist = ["Path_Remote"] @@ -124,9 +124,10 @@ class PathWorkbench (Workbench): #self.appendToolbar(QT_TRANSLATE_NOOP("Path", "Partial Commands"), prepcmdlist) self.appendToolbar(QT_TRANSLATE_NOOP("Path", "New Operations"), twodopcmdlist+threedcmdgroup) self.appendToolbar(QT_TRANSLATE_NOOP("Path", "Path Modification"), modcmdlist) - self.appendToolbar(QT_TRANSLATE_NOOP("Path", "Helpful Tools"), extracmdlist) + if extracmdlist: + self.appendToolbar(QT_TRANSLATE_NOOP("Path", "Helpful Tools"), extracmdlist) - self.appendMenu([QT_TRANSLATE_NOOP("Path", "&Path")], projcmdlist +["Separator"] + toolcmdlist +["Separator"] +twodopcmdlist +["Separator"] +threedopcmdlist +["Separator"]) + self.appendMenu([QT_TRANSLATE_NOOP("Path", "&Path")], projcmdlist +["Path_ExportTemplate", "Separator"] + toolcmdlist +["Separator"] +twodopcmdlist +["Separator"] +threedopcmdlist +["Separator"]) #self.appendMenu([QT_TRANSLATE_NOOP("Path", "Path"), QT_TRANSLATE_NOOP( # "Path", "Tools")], toolcmdlist) self.appendMenu([QT_TRANSLATE_NOOP("Path", "&Path"), QT_TRANSLATE_NOOP( @@ -141,7 +142,8 @@ class PathWorkbench (Workbench): # "Path", "Path Modification")], modcmdmore) # self.appendMenu([QT_TRANSLATE_NOOP("Path", "Path"), QT_TRANSLATE_NOOP( # "Path", "Remote Operations")], remotecmdlist) - self.appendMenu([QT_TRANSLATE_NOOP("Path", "&Path")], extracmdlist) + if extracmdlist: + self.appendMenu([QT_TRANSLATE_NOOP("Path", "&Path")], extracmdlist) self.dressupcmds = dressupcmdlist diff --git a/src/Mod/Path/PathCommands.py b/src/Mod/Path/PathCommands.py index 184344047c..9425ca8c82 100644 --- a/src/Mod/Path/PathCommands.py +++ b/src/Mod/Path/PathCommands.py @@ -56,6 +56,7 @@ class _CommandSelectLoop: def GetResources(self): return {'Pixmap': 'Path-SelectLoop', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_SelectLoop", "Finish Selecting Loop"), + 'Accel': "P, L", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_SelectLoop", "Complete loop selection from two edges"), 'CmdType': "ForEdit"} diff --git a/src/Mod/Path/PathScripts/PathJobCmd.py b/src/Mod/Path/PathScripts/PathJobCmd.py index 462af6b534..a9bc7e4c4b 100644 --- a/src/Mod/Path/PathScripts/PathJobCmd.py +++ b/src/Mod/Path/PathScripts/PathJobCmd.py @@ -220,7 +220,7 @@ class CommandJobTemplateExport: ''' def GetResources(self): - return {'Pixmap': 'Path-Job', + return {'Pixmap': 'Path-ExportTemplate', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Export Template"), 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Exports Path Job as a template to be used for other jobs")}