Restored icons for profile ops; cleaned up accel keys.

This commit is contained in:
Markus Lampert
2017-08-10 12:43:40 -07:00
committed by Yorik van Havre
parent bc53677dca
commit 1664e65135
24 changed files with 18 additions and 28 deletions

View File

@@ -99,7 +99,6 @@ class CommandPathComment:
def GetResources(self):
return {'Pixmap': 'Path-Comment',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Comment", "Comment"),
'Accel': "P, C",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Comment", "Add a Comment to your CNC program")}
def IsActive(self):

View File

@@ -95,7 +95,6 @@ class CommandCompoundExtended:
def GetResources(self):
return {'Pixmap': 'Path-Compound',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_CompoundExtended", "Compound"),
'Accel': "P, C",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_CompoundExtended", "Creates a Path Compound object")}
def IsActive(self):

View File

@@ -78,7 +78,6 @@ class CommandPathCopy:
def GetResources(self):
return {'Pixmap': 'Path-Copy',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Copy", "Copy"),
'Accel': "P, Y",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Copy", "Creates a linked copy of another path")}
def IsActive(self):

View File

@@ -103,7 +103,6 @@ class CommandPathDressup:
def GetResources(self):
return {'Pixmap': 'Path-Dressup',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Dressup", "Dress-up"),
'Accel': "P, S",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Dressup", "Creates a Path Dress-up object from a selected path")}
def IsActive(self):

View File

@@ -97,7 +97,6 @@ PathOpGui.SetupOperation('Drilling',
TaskPanelOpPage,
'Path-Drilling',
QtCore.QT_TRANSLATE_NOOP("PathDrilling", "Drilling"),
"P, O",
QtCore.QT_TRANSLATE_NOOP("PathDrilling", "Creates a Path Drilling object from a features of a base object"))
FreeCAD.Console.PrintLog("Loading PathDrillingGui... done\n")

View File

@@ -112,7 +112,6 @@ class CommandPathFixture:
def GetResources(self):
return {'Pixmap': 'Path-Datums',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Fixture", "Fixture"),
'Accel': "P, F",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Fixture", "Creates a Fixture Offset object")}
def IsActive(self):

View File

@@ -75,7 +75,6 @@ PathOpGui.SetupOperation('Helix',
TaskPanelOpPage,
'Path-Helix',
QtCore.QT_TRANSLATE_NOOP("PathHelix", "Helix"),
"P, O",
QtCore.QT_TRANSLATE_NOOP("PathHelix", "Creates a Path Helix object from a features of a base object"))
FreeCAD.Console.PrintLog("Loading PathHelixGui... done\n")

View File

@@ -94,7 +94,6 @@ class CommandPathHop:
def GetResources(self):
return {'Pixmap': 'Path-Hop',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Hop", "Hop"),
'Accel': "P, H",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Hop", "Creates a Path Hop object")}
def IsActive(self):

View File

@@ -216,6 +216,7 @@ class CommandPathInspect:
def GetResources(self):
return {'Pixmap': 'Path-Inspect',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Inspect", "Inspect G-code"),
'Accel': "P, I",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Inspect", "Inspects the G-code contents of a path")}
def IsActive(self):

View File

@@ -429,7 +429,7 @@ class CommandJobCreate:
def GetResources(self):
return {'Pixmap': 'Path-Job',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Job"),
#'Accel': "P, J",
'Accel': "P, J",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Creates a Path Job object")}
def IsActive(self):
@@ -468,7 +468,6 @@ class CommandJobExportTemplate:
def GetResources(self):
return {'Pixmap': 'Path-Job',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Export Template"),
#'Accel': "P, T",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Exports Path Job as a template to be used for other jobs")}
def IsActive(self):

View File

@@ -40,7 +40,6 @@ PathOpGui.SetupOperation('MillFace',
TaskPanelOpPage,
'Path-Face',
QtCore.QT_TRANSLATE_NOOP("PathFace", "Face"),
"P, O",
QtCore.QT_TRANSLATE_NOOP("PathFace", "Create a Facing Operation from a model or face"))
FreeCAD.Console.PrintLog("Loading PathMillFaceGui... done\n")

View File

@@ -562,10 +562,12 @@ class CommandPathOp:
self.res = resources
def GetResources(self):
return {'Pixmap': self.res.pixmap,
ress = {'Pixmap': self.res.pixmap,
'MenuText': self.res.menuText,
'Accel': self.res.accelKey,
'ToolTip': self.res.toolTip}
if self.res.accelKey:
ress['Accel'] = self.res.accelKey
return ress
def IsActive(self):
if FreeCAD.ActiveDocument is not None:
@@ -592,8 +594,8 @@ def SetupOperation(name,
opPageClass,
pixmap,
menuText,
accelKey,
toolTip):
toolTip,
accelKey = None):
res = CommandResources(name, objFactory, opPageClass, pixmap, menuText, accelKey, toolTip)
FreeCADGui.addCommand("Path_%s" % name.replace(' ', '_'), CommandPathOp(res))

View File

@@ -108,7 +108,6 @@ class CommandPathPlane:
def GetResources(self):
return {'Pixmap': 'Path-Plane',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Plane", "Selection Plane"),
'Accel': "P, P",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Plane", "Create a Selection Plane object")}
def IsActive(self):

View File

@@ -39,7 +39,6 @@ PathOpGui.SetupOperation('Pocket',
TaskPanelOpPage,
'Path-Pocket',
QtCore.QT_TRANSLATE_NOOP("PathPocket", "Pocket"),
"P, O",
QtCore.QT_TRANSLATE_NOOP("PathPocket", "Creates a Path Pocket object from a face or faces"))
FreeCAD.Console.PrintLog("Loading PathPocketGui... done\n")

View File

@@ -40,7 +40,6 @@ PathOpGui.SetupOperation('Contour',
TaskPanelOpPage,
'Path-Contour',
QtCore.QT_TRANSLATE_NOOP("PathProfileContour", "Contour"),
"P, C",
QtCore.QT_TRANSLATE_NOOP("PathProfileContour", "Creates a Contour Path for the Base Object "))
FreeCAD.Console.PrintLog("Loading PathProfileContourGui... done\n")

View File

@@ -37,9 +37,8 @@ class TaskPanelOpPage(PathProfileBaseGui.TaskPanelOpPage):
PathOpGui.SetupOperation('Profile Edges',
PathProfileEdges.Create,
TaskPanelOpPage,
'Path-Profile',
'Path-Profile-Edges',
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Edge Profile"),
"P, F",
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile based on face or faces"))
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile based on edges"))
FreeCAD.Console.PrintLog("Loading PathProfileEdgesGui... done\n")

View File

@@ -37,9 +37,8 @@ class TaskPanelOpPage(PathProfileBaseGui.TaskPanelOpPage):
PathOpGui.SetupOperation('Profile Faces',
PathProfileFaces.Create,
TaskPanelOpPage,
'Path-Profile',
'Path-Profile-Face',
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Face Profile"),
"P, F",
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile based on face or faces"))
FreeCAD.Console.PrintLog("Loading PathProfileFacesGui... done\n")

View File

@@ -47,6 +47,7 @@ class CommandPathSanity:
def GetResources(self):
return {'Pixmap' : 'Path-Sanity',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Sanity","Check the Path project for common errors"),
'Accel': "P, S",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Sanity","Check the Path Project for common errors")}
def IsActive(self):

View File

@@ -36,7 +36,6 @@ class CommandPathSimpleCopy:
def GetResources(self):
return {'Pixmap': 'Path-SimpleCopy',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_SimpleCopy", "Simple Copy"),
'Accel': "P, Y",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_SimpleCopy", "Creates a non-parametric copy of another path")}
def IsActive(self):

View File

@@ -93,7 +93,6 @@ class CommandPathStock:
def GetResources(self):
return {'Pixmap': 'Path-Stock',
'MenuText': QtCore.QT_TRANSLATE_NOOP("PathStock", "Stock"),
'Accel': "P, S",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathStock", "Creates a 3D object to represent raw stock to mill the part out of")}
def IsActive(self):

View File

@@ -104,7 +104,6 @@ class CommandPathStop:
def GetResources(self):
return {'Pixmap': 'Path-Stop',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Stop", "Stop"),
'Accel': "P, C",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Stop", "Add Optional or Mandatory Stop to the program")}
def IsActive(self):

View File

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

View File

@@ -121,7 +121,6 @@ class CommandPathToolLenOffset:
def GetResources(self):
return {'Pixmap': 'Path-LengthOffset',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_ToolLenOffset", "Tool Length Offset"),
'Accel': "P, T",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_ToolLenOffset", "Create a Tool Length Offset object")}
def IsActive(self):

View File

@@ -0,0 +1,6 @@
Assigned Accel Keys:
* P,I ... Launch Path Inspector
* P,J ... Create Job
* P,P ... Launch Post Processing
* P,S ... Launch Path Sanity
* P,T ... Launch Tool Library Manager