Path: Change filenames in the rest of the Path code

Reflects changes in 
* PathOpGui.SetupOperation()
* GetResources()
* sPIxmap
* pixmap
* *.UI files

Also contains minor translation context renames (these were edits made near to original intent of this commit)
This commit is contained in:
luz paz
2020-11-30 07:53:38 -05:00
parent e19d7d2bd5
commit aeafcec125
65 changed files with 137 additions and 126 deletions

View File

@@ -57,7 +57,7 @@ CmdPathArea::CmdPathArea()
sToolTipText = QT_TR_NOOP("Creates a feature area from selected objects");
sWhatsThis = "Path_Area";
sStatusTip = sToolTipText;
sPixmap = "Path-Area";
sPixmap = "Path_Area";
}
void CmdPathArea::activated(int iMsg)
@@ -139,7 +139,7 @@ CmdPathAreaWorkplane::CmdPathAreaWorkplane()
sToolTipText = QT_TR_NOOP("Select a workplane for a FeatureArea");
sWhatsThis = "Path_Area_Workplane";
sStatusTip = sToolTipText;
sPixmap = "Path-Area-Workplane";
sPixmap = "Path_Area_Workplane";
}
void CmdPathAreaWorkplane::activated(int iMsg)
@@ -229,7 +229,7 @@ CmdPathCompound::CmdPathCompound()
sToolTipText = QT_TR_NOOP("Creates a compound from selected paths");
sWhatsThis = "Path_Compound";
sStatusTip = sToolTipText;
sPixmap = "Path-Compound";
sPixmap = "Path_Compound";
}
void CmdPathCompound::activated(int iMsg)
@@ -281,7 +281,7 @@ CmdPathShape::CmdPathShape()
sToolTipText = QT_TR_NOOP("Creates a path from a selected shape");
sWhatsThis = "Path_Shape";
sStatusTip = sToolTipText;
sPixmap = "Path-Shape";
sPixmap = "Path_Shape";
}
void CmdPathShape::activated(int iMsg)

View File

@@ -21,7 +21,7 @@
</property>
<property name="windowIcon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-BaseGeometry.svg</normaloff>:/icons/Path-BaseGeometry.svg</iconset>
<normaloff>:/icons/Path_BaseGeometry.svg</normaloff>:/icons/Path_BaseGeometry.svg</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View File

@@ -18,7 +18,7 @@
</property>
<property name="windowIcon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-Depths.svg</normaloff>:/icons/Path-Depths.svg</iconset>
<normaloff>:/icons/Path_Depths.svg</normaloff>:/icons/Path_Depths.svg</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">

View File

@@ -15,7 +15,7 @@
</property>
<property name="windowIcon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-Heights.svg</normaloff>:/icons/Path-Heights.svg</iconset>
<normaloff>:/icons/Path_Heights.svg</normaloff>:/icons/Path_Heights.svg</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">

View File

@@ -39,7 +39,7 @@
</property>
<attribute name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-BaseGeometry.svg</normaloff>:/icons/Path-BaseGeometry.svg</iconset>
<normaloff>:/icons/Path_BaseGeometry.svg</normaloff>:/icons/Path_BaseGeometry.svg</iconset>
</attribute>
<attribute name="label">
<string>Base Geometry</string>
@@ -117,7 +117,7 @@
</property>
<attribute name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-Depths.svg</normaloff>:/icons/Path-Depths.svg</iconset>
<normaloff>:/icons/Path_Depths.svg</normaloff>:/icons/Path_Depths.svg</iconset>
</attribute>
<attribute name="label">
<string>Depths</string>
@@ -192,7 +192,7 @@
</property>
<attribute name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-Heights.svg</normaloff>:/icons/Path-Heights.svg</iconset>
<normaloff>:/icons/Path_Heights.svg</normaloff>:/icons/Path_Heights.svg</iconset>
</attribute>
<attribute name="label">
<string>Heights</string>
@@ -242,7 +242,7 @@
</property>
<attribute name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-OperationB.svg</normaloff>:/icons/Path-OperationB.svg</iconset>
<normaloff>:/icons/Path_OperationB.svg</normaloff>:/icons/Path_OperationB.svg</iconset>
</attribute>
<attribute name="label">
<string>Operation</string>

View File

@@ -39,7 +39,7 @@
</property>
<property name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-BStop.svg</normaloff>:/icons/Path-BStop.svg</iconset>
<normaloff>:/icons/Path_BStop.svg</normaloff>:/icons/Path_BStop.svg</iconset>
</property>
<property name="iconSize">
<size>
@@ -59,7 +59,7 @@
</property>
<property name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-BPlay.svg</normaloff>:/icons/Path-BPlay.svg</iconset>
<normaloff>:/icons/Path_BPlay.svg</normaloff>:/icons/Path_BPlay.svg</iconset>
</property>
<property name="iconSize">
<size>
@@ -79,7 +79,7 @@
</property>
<property name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-BPause.svg</normaloff>:/icons/Path-BPause.svg</iconset>
<normaloff>:/icons/Path_BPause.svg</normaloff>:/icons/Path_BPause.svg</iconset>
</property>
<property name="iconSize">
<size>
@@ -99,7 +99,7 @@
</property>
<property name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-BStep.svg</normaloff>:/icons/Path-BStep.svg</iconset>
<normaloff>:/icons/Path_BStep.svg</normaloff>:/icons/Path_BStep.svg</iconset>
</property>
<property name="iconSize">
<size>
@@ -119,7 +119,7 @@
</property>
<property name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-BFastForward.svg</normaloff>:/icons/Path-BFastForward.svg</iconset>
<normaloff>:/icons/Path_BFastForward.svg</normaloff>:/icons/Path_BFastForward.svg</iconset>
</property>
<property name="iconSize">
<size>

View File

@@ -36,7 +36,7 @@
</property>
<property name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-ToolBit.svg</normaloff>:/icons/Path-ToolBit.svg</iconset>
<normaloff>:/icons/Path_ToolBit.svg</normaloff>:/icons/Path_ToolBit.svg</iconset>
</property>
</widget>
</item>
@@ -56,7 +56,7 @@
</property>
<property name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-ToolDuplicate.svg</normaloff>:/icons/Path-ToolDuplicate.svg</iconset>
<normaloff>:/icons/Path_ToolDuplicate.svg</normaloff>:/icons/Path_ToolDuplicate.svg</iconset>
</property>
</widget>
</item>

View File

@@ -57,7 +57,7 @@
</property>
<property name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-ToolTable.svg</normaloff>:/icons/Path-ToolTable.svg</iconset>
<normaloff>:/icons/Path_ToolTable.svg</normaloff>:/icons/Path_ToolTable.svg</iconset>
</property>
<property name="iconSize">
<size>

View File

@@ -235,7 +235,7 @@
</property>
<property name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-ToolController.svg</normaloff>:/icons/Path-ToolController.svg</iconset>
<normaloff>:/icons/Path_ToolController.svg</normaloff>:/icons/Path_ToolController.svg</iconset>
</property>
</widget>
</item>
@@ -292,7 +292,7 @@
</property>
<property name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-ToolDuplicate.svg</normaloff>:/icons/Path-ToolDuplicate.svg</iconset>
<normaloff>:/icons/Path_ToolDuplicate.svg</normaloff>:/icons/Path_ToolDuplicate.svg</iconset>
</property>
</widget>
</item>
@@ -372,7 +372,7 @@
</property>
<property name="icon">
<iconset resource="../Path.qrc">
<normaloff>:/icons/Path-LengthOffset.svg</normaloff>:/icons/Path-LengthOffset.svg</iconset>
<normaloff>:/icons/Path_LengthOffset.svg</normaloff>:/icons/Path_LengthOffset.svg</iconset>
</property>
</widget>
</item>

View File

@@ -53,7 +53,7 @@ using namespace Gui;
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TaskWidgetPathCompound::TaskWidgetPathCompound(ViewProviderPathCompound *CompoundView,QWidget *parent)
: TaskBox(Gui::BitmapFactory().pixmap("Path-Compound"),tr("Compound paths"),true, parent)
: TaskBox(Gui::BitmapFactory().pixmap("Path_Compound"),tr("Compound paths"),true, parent)
{
// we need a separate container widget to add all controls to
proxy = new QWidget(this);

View File

@@ -35,7 +35,7 @@ PROPERTY_SOURCE(PathGui::ViewProviderArea, PartGui::ViewProviderPlaneParametric)
ViewProviderArea::ViewProviderArea()
{
sPixmap = "Path-Area.svg";
sPixmap = "Path_Area.svg";
}
ViewProviderArea::~ViewProviderArea()
@@ -119,7 +119,7 @@ PROPERTY_SOURCE(PathGui::ViewProviderAreaView, PartGui::ViewProviderPlaneParamet
ViewProviderAreaView::ViewProviderAreaView()
{
sPixmap = "Path-Area-View.svg";
sPixmap = "Path_Area_View.svg";
}
ViewProviderAreaView::~ViewProviderAreaView()

View File

@@ -717,7 +717,7 @@ void ViewProviderPath::recomputeBoundingBox()
QIcon ViewProviderPath::getIcon() const
{
return Gui::BitmapFactory().pixmap("Path-Toolpath");
return Gui::BitmapFactory().pixmap("Path_Toolpath");
}
// Python object -----------------------------------------------------------------------

View File

@@ -82,7 +82,7 @@ void ViewProviderPathCompound::dropObject(App::DocumentObject* obj)
QIcon ViewProviderPathCompound::getIcon() const
{
return Gui::BitmapFactory().pixmap("Path-Compound");
return Gui::BitmapFactory().pixmap("Path_Compound");
}
// Python object -----------------------------------------------------------------------

View File

@@ -39,7 +39,7 @@ PROPERTY_SOURCE(PathGui::ViewProviderPathShape, PathGui::ViewProviderPath)
QIcon ViewProviderPathShape::getIcon() const
{
return Gui::BitmapFactory().pixmap("Path-Shape");
return Gui::BitmapFactory().pixmap("Path_Shape");
}
std::vector<App::DocumentObject*> ViewProviderPathShape::claimChildren(void) const

View File

@@ -52,7 +52,7 @@ class _CommandSelectLoop:
self.active = False
def GetResources(self):
return {'Pixmap': 'Path-SelectLoop',
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"),
@@ -130,7 +130,7 @@ if FreeCAD.GuiUp:
class _ToggleOperation:
"command definition to toggle Operation Active state"
def GetResources(self):
return {'Pixmap': 'Path-OpActive',
return {'Pixmap': 'Path_OpActive',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_OpActiveToggle", "Toggle the Active State of the Operation"),
'Accel': "P, X",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_OpActiveToggle", "Toggle the Active State of the Operation"),
@@ -163,7 +163,7 @@ if FreeCAD.GuiUp:
class _CopyOperation:
"the Path Copy Operation command definition"
def GetResources(self):
return {'Pixmap': 'Path-OpCopy',
return {'Pixmap': 'Path_OpCopy',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_OperationCopy", "Copy the operation in the job"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_OperationCopy", "Copy the operation in the job"),
'CmdType': "ForEdit"}

View File

@@ -214,6 +214,10 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
obj.setEditorMode('Stopped', 2) # hide this property
Command = PathOpGui.SetupOperation('Adaptive', PathAdaptive.Create, TaskPanelOpPage,
'Path-Adaptive', QtCore.QT_TRANSLATE_NOOP("PathAdaptive", "Adaptive"),
QtCore.QT_TRANSLATE_NOOP("PathPocket", "Adaptive clearing and profiling"))
Command = PathOpGui.SetupOperation('Adaptive',
PathAdaptive.Create,
TaskPanelOpPage,
'Path_Adaptive',
QtCore.QT_TRANSLATE_NOOP("Path_Adaptive", "Adaptive"),
QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "Adaptive clearing and profiling")
)

View File

@@ -235,7 +235,7 @@ class ViewProviderArray:
class CommandPathArray:
def GetResources(self):
return {'Pixmap': 'Path-Array',
return {'Pixmap': 'Path_Array',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Array", "Array"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Array", "Creates an array from a selected path")}

View File

@@ -66,7 +66,7 @@ class _ViewProviderCollisionSim:
return True
def getIcon(self):
return ":/icons/Path-Contour.svg"
return ":/icons/Path_Contour.svg"
def __getstate__(self):
return None

View File

@@ -78,7 +78,7 @@ class _ViewProviderComment:
return None
def getIcon(self): # optional
return ":/icons/Path-Comment.svg"
return ":/icons/Path_Comment.svg"
def onChanged(self, vobj, prop): # optional
# pylint: disable=unused-argument
@@ -97,7 +97,7 @@ class _ViewProviderComment:
class CommandPathComment:
def GetResources(self):
return {'Pixmap': 'Path-Comment',
return {'Pixmap': 'Path_Comment',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Comment", "Comment"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Comment", "Add a Comment to your CNC program")}

View File

@@ -63,7 +63,7 @@ class ViewProviderPathCopy:
return
def getIcon(self):
return ":/icons/Path-Copy.svg"
return ":/icons/Path_Copy.svg"
def __getstate__(self):
return None
@@ -75,7 +75,7 @@ class ViewProviderPathCopy:
class CommandPathCopy:
def GetResources(self):
return {'Pixmap': 'Path-Copy',
return {'Pixmap': 'Path_Copy',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Copy", "Copy"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Copy", "Creates a linked copy of another path")}

View File

@@ -135,7 +135,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
Command = PathOpGui.SetupOperation('Deburr',
PathDeburr.Create,
TaskPanelOpPage,
'Path-Deburr',
'Path_Deburr',
QtCore.QT_TRANSLATE_NOOP("PathDeburr", "Deburr"),
QtCore.QT_TRANSLATE_NOOP("PathDeburr", "Creates a Deburr Path along Edges or around Faces"),
PathDeburr.SetupProperties)

View File

@@ -241,7 +241,7 @@ class CommandPathDressup:
# pylint: disable=no-init
def GetResources(self):
return {'Pixmap': 'Path-Dressup',
return {'Pixmap': 'Path_Dressup',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_DressupAxisMap", "Axis Map Dress-up"),
'Accel': "",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_DressupAxisMap", "Remap one axis to another.")}

View File

@@ -1078,7 +1078,7 @@ class CommandDressupDogbone:
# pylint: disable=no-init
def GetResources(self):
return {'Pixmap': 'Path-Dressup',
return {'Pixmap': 'Path_Dressup',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_DressupDogbone", "Dogbone Dress-up"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_DressupDogbone", "Creates a Dogbone Dress-up object from a selected path")}

View File

@@ -537,7 +537,7 @@ class CommandDressupDragknife:
# pylint: disable=no-init
def GetResources(self):
return {'Pixmap': 'Path-Dressup',
return {'Pixmap': 'Path_Dressup',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_DressupDragKnife", "DragKnife Dress-up"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_DressupDragKnife", "Modifies a path to add dragknife corner actions")}

View File

@@ -508,7 +508,7 @@ class CommandPathDressupLeadInOut:
# pylint: disable=no-init
def GetResources(self):
return {'Pixmap': 'Path-Dressup',
return {'Pixmap': 'Path_Dressup',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_DressupLeadInOut", "LeadInOut Dressup"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_DressupLeadInOut", "Creates a Cutter Radius Compensation G41/G42 Entry Dressup object from a selected path")}

View File

@@ -238,7 +238,7 @@ class CommandPathDressupPathBoundary:
# pylint: disable=no-init
def GetResources(self):
return {'Pixmap': 'Path-Dressup',
return {'Pixmap': 'Path_Dressup',
'MenuText': QtCore.QT_TRANSLATE_NOOP('Path_DressupPathBoundary', 'Boundary Dress-up'),
'ToolTip': QtCore.QT_TRANSLATE_NOOP('Path_DressupPathBoundary', 'Creates a Path Boundary Dress-up object from a selected path')}

View File

@@ -679,7 +679,7 @@ class CommandPathDressupRampEntry:
# pylint: disable=no-init
def GetResources(self):
return {'Pixmap': 'Path-Dressup',
return {'Pixmap': 'Path_Dressup',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_DressupRampEntry", "RampEntry Dress-up"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_DressupRampEntry", "Creates a Ramp Entry Dress-up object from a selected path")}

View File

@@ -535,7 +535,7 @@ class CommandPathDressupTag:
# pylint: disable=no-init
def GetResources(self):
return {'Pixmap': 'Path-Dressup',
return {'Pixmap': 'Path_Dressup',
'MenuText': QtCore.QT_TRANSLATE_NOOP('Path_DressupTag', 'Tag Dress-up'),
'ToolTip': QtCore.QT_TRANSLATE_NOOP('Path_DressupTag', 'Creates a Tag Dress-up object from a selected path')}

View File

@@ -300,7 +300,7 @@ class ViewProviderDressup:
class CommandPathDressup:
def GetResources(self):
return {'Pixmap': 'Path-Dressup',
return {'Pixmap': 'Path_Dressup',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_DressupZCorrect", "Z Depth Correction Dress-up"),
'Accel': "",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_DressupZCorrect", "Use Probe Map to correct Z depth")}

View File

@@ -148,9 +148,9 @@ class TaskPanelOpPage(PathCircularHoleBaseGui.TaskPanelOpPage):
Command = PathOpGui.SetupOperation('Drilling',
PathDrilling.Create,
TaskPanelOpPage,
'Path-Drilling',
QtCore.QT_TRANSLATE_NOOP("PathDrilling", "Drilling"),
QtCore.QT_TRANSLATE_NOOP("PathDrilling", "Creates a Path Drilling object from a features of a base object"),
'Path_Drilling',
QtCore.QT_TRANSLATE_NOOP("Path_Drilling", "Drilling"),
QtCore.QT_TRANSLATE_NOOP("Path_Drilling", "Creates a Path Drilling object from a features of a base object"),
PathDrilling.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathDrillingGui... done\n")

View File

@@ -144,7 +144,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
Command = PathOpGui.SetupOperation('Engrave',
PathEngrave.Create,
TaskPanelOpPage,
'Path-Engrave',
'Path_Engrave',
QtCore.QT_TRANSLATE_NOOP("PathEngrave", "Engrave"),
QtCore.QT_TRANSLATE_NOOP("PathEngrave", "Creates an Engraving Path around a Draft ShapeString"),
PathEngrave.SetupProperties)

View File

@@ -80,7 +80,7 @@ class _ViewProviderFixture:
return None
def getIcon(self): # optional
return ":/icons/Path-Datums.svg"
return ":/icons/Path_Datums.svg"
def onChanged(self, vobj, prop): # optional
# pylint: disable=unused-argument
@@ -111,7 +111,7 @@ class _ViewProviderFixture:
class CommandPathFixture:
def GetResources(self):
return {'Pixmap': 'Path-Datums',
return {'Pixmap': 'Path_Datums',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Fixture", "Fixture"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Fixture", "Creates a Fixture Offset object")}

View File

@@ -86,9 +86,9 @@ class TaskPanelOpPage(PathCircularHoleBaseGui.TaskPanelOpPage):
Command = PathOpGui.SetupOperation('Helix',
PathHelix.Create,
TaskPanelOpPage,
'Path-Helix',
QtCore.QT_TRANSLATE_NOOP("PathHelix", "Helix"),
QtCore.QT_TRANSLATE_NOOP("PathHelix", "Creates a Path Helix object from a features of a base object"),
'Path_Helix',
QtCore.QT_TRANSLATE_NOOP("Path_Helix", "Helix"),
QtCore.QT_TRANSLATE_NOOP("Path_Helix", "Creates a Path Helix object from a features of a base object"),
PathHelix.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathHelixGui... done\n")

View File

@@ -78,7 +78,7 @@ class ViewProviderPathHop:
self.Object = vobj.Object
def getIcon(self):
return ":/icons/Path-Hop.svg"
return ":/icons/Path_Hop.svg"
def __getstate__(self):
return None
@@ -90,7 +90,7 @@ class ViewProviderPathHop:
class CommandPathHop:
def GetResources(self):
return {'Pixmap': 'Path-Hop',
return {'Pixmap': 'Path_Hop',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Hop", "Hop"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Hop", "Creates a Path Hop object")}

View File

@@ -62,7 +62,7 @@ class ViewProvider(object):
self.editCallback = state['editCallback']
def getIcon(self):
return ":/icons/Path-{}.svg".format(self.icon)
return ":/icons/Path_{}.svg".format(self.icon)
def onEdit(self, callback):
self.editModule = callback.__module__

View File

@@ -225,7 +225,7 @@ def show(obj):
class CommandPathInspect:
def GetResources(self):
return {'Pixmap': 'Path-Inspect',
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")}

View File

@@ -50,7 +50,7 @@ class CommandJobCreate:
pass
def GetResources(self):
return {'Pixmap': 'Path-Job',
return {'Pixmap': 'Path_Job',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Job"),
'Accel': "P, J",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Creates a Path Job object")}
@@ -91,7 +91,7 @@ class CommandJobTemplateExport:
pass
def GetResources(self):
return {'Pixmap': 'Path-ExportTemplate',
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")}

View File

@@ -207,7 +207,7 @@ class ViewProvider:
self.unsetEdit(None, None)
def getIcon(self):
return ":/icons/Path-Job.svg"
return ":/icons/Path_Job.svg"
def claimChildren(self):
children = self.obj.ToolController

View File

@@ -42,9 +42,9 @@ class TaskPanelOpPage(PathPocketBaseGui.TaskPanelOpPage):
Command = PathOpGui.SetupOperation('MillFace',
PathMillFace.Create,
TaskPanelOpPage,
'Path-Face',
QtCore.QT_TRANSLATE_NOOP("PathFace", "Face"),
QtCore.QT_TRANSLATE_NOOP("PathFace", "Create a Facing Operation from a model or face"),
'Path_Face',
QtCore.QT_TRANSLATE_NOOP("Path_Face", "Face"),
QtCore.QT_TRANSLATE_NOOP("Path_Face", "Create a Facing Operation from a model or face"),
PathMillFace.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathMillFaceGui... done\n")

View File

@@ -159,7 +159,7 @@ class ViewProvider(object):
if self.Object.Active:
return self.OpIcon
else:
return ":/icons/Path-OpActive.svg"
return ":/icons/Path_OpActive.svg"
def getTaskPanelOpPage(self, obj):
'''getTaskPanelOpPage(obj) ... use the stored information to instantiate the receiver op's page controller.'''
@@ -440,7 +440,7 @@ class TaskPanelBaseGeometryPage(TaskPanelPage):
super(TaskPanelBaseGeometryPage, self).__init__(obj, features)
self.panelTitle = 'Base Geometry'
self.OpIcon = ":/icons/Path-BaseGeometry.svg"
self.OpIcon = ":/icons/Path_BaseGeometry.svg"
self.setIcon(self.OpIcon)
def getForm(self):
@@ -764,7 +764,7 @@ class TaskPanelHeightsPage(TaskPanelPage):
self.clearanceHeight = None
self.safeHeight = None
self.panelTitle = 'Heights'
self.OpIcon = ":/icons/Path-Heights.svg"
self.OpIcon = ":/icons/Path_Heights.svg"
self.setIcon(self.OpIcon)
def getForm(self):
@@ -808,7 +808,7 @@ class TaskPanelDepthsPage(TaskPanelPage):
self.finishDepth = None
self.stepDown = None
self.panelTitle = 'Depths'
self.OpIcon = ":/icons/Path-Depths.svg"
self.OpIcon = ":/icons/Path_Depths.svg"
self.setIcon(self.OpIcon)
def getForm(self):
@@ -1234,7 +1234,7 @@ class CommandSetStartPoint:
# pylint: disable=no-init
def GetResources(self):
return {'Pixmap': 'Path-StartPoint',
return {'Pixmap': 'Path_StartPoint',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path", "Pick Start Point"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path", "Pick Start Point")}

View File

@@ -75,7 +75,7 @@ class _ViewProviderPlane:
return None
def getIcon(self): # optional
return ":/icons/Path-Plane.svg"
return ":/icons/Path_Plane.svg"
def onChanged(self, vobj, prop): # optional
# pylint: disable=unused-argument
@@ -106,7 +106,7 @@ class _ViewProviderPlane:
class CommandPathPlane:
def GetResources(self):
return {'Pixmap': 'Path-Plane',
return {'Pixmap': 'Path_Plane',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Plane", "Selection Plane"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Plane", "Create a Selection Plane object")}

View File

@@ -42,9 +42,9 @@ class TaskPanelOpPage(PathPocketBaseGui.TaskPanelOpPage):
Command = PathOpGui.SetupOperation('Pocket 3D',
PathPocket.Create,
TaskPanelOpPage,
'Path-3DPocket',
QtCore.QT_TRANSLATE_NOOP("PathPocket", "3D Pocket"),
QtCore.QT_TRANSLATE_NOOP("PathPocket", "Creates a Path 3D Pocket object from a face or faces"),
'Path_3DPocket',
QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "3D Pocket"),
QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "Creates a Path 3D Pocket object from a face or faces"),
PathPocket.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathPocketGui... done\n")

View File

@@ -479,9 +479,9 @@ class TaskPanelOpPage(PathPocketBaseGui.TaskPanelOpPage):
Command = PathOpGui.SetupOperation('Pocket Shape',
PathPocketShape.Create,
TaskPanelOpPage,
'Path-Pocket',
QtCore.QT_TRANSLATE_NOOP("PathPocket", "Pocket Shape"),
QtCore.QT_TRANSLATE_NOOP("PathPocket", "Creates a Path Pocket object from a face or faces"),
'Path_Pocket',
QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "Pocket Shape"),
QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "Creates a Path Pocket object from a face or faces"),
PathPocketShape.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathPocketShapeGui... done\n")

View File

@@ -176,7 +176,7 @@ class CommandPathPost:
return dlg.exec_()
def GetResources(self):
return {'Pixmap': 'Path-Post',
return {'Pixmap': 'Path_Post',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Post", "Post Process"),
'Accel': "P, P",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Post", "Post Process the selected Job")}

View File

@@ -84,7 +84,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
Command = PathOpGui.SetupOperation('Probe', PathProbe.Create, TaskPanelOpPage,
'Path-Probe',
'Path_Probe',
QtCore.QT_TRANSLATE_NOOP("Probe", "Probe"),
QtCore.QT_TRANSLATE_NOOP("Probe", "Create a Probing Grid from a job stock"),
PathProbe.SetupProperties)

View File

@@ -44,9 +44,9 @@ class TaskPanelOpPage(PathProfileGui.TaskPanelOpPage):
Command = PathOpGui.SetupOperation('Profile',
PathProfile.Create,
TaskPanelOpPage,
'Path-Contour',
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile"),
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile entire model, selected face(s) or selected edge(s)"),
'Path_Contour',
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile"),
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile entire model, selected face(s) or selected edge(s)"),
PathProfile.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathProfileContourGui... done\n")

View File

@@ -44,9 +44,9 @@ class TaskPanelOpPage(PathProfileGui.TaskPanelOpPage):
Command = PathOpGui.SetupOperation('Profile',
PathProfile.Create,
TaskPanelOpPage,
'Path-Contour',
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile"),
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile entire model, selected face(s) or selected edge(s)"),
'Path_Contour',
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile"),
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile entire model, selected face(s) or selected edge(s)"),
PathProfile.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathProfileEdgesGui... done\n")

View File

@@ -44,9 +44,9 @@ class TaskPanelOpPage(PathProfileGui.TaskPanelOpPage):
Command = PathOpGui.SetupOperation('Profile',
PathProfile.Create,
TaskPanelOpPage,
'Path-Contour',
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile"),
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile entire model, selected face(s) or selected edge(s)"),
'Path_Contour',
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile"),
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile entire model, selected face(s) or selected edge(s)"),
PathProfile.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathProfileFacesGui... done\n")

View File

@@ -157,9 +157,9 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
Command = PathOpGui.SetupOperation('Profile',
PathProfile.Create,
TaskPanelOpPage,
'Path-Contour',
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile"),
QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile entire model, selected face(s) or selected edge(s)"),
'Path_Contour',
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile"),
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile entire model, selected face(s) or selected edge(s)"),
PathProfile.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathProfileFacesGui... done\n")

View File

@@ -97,7 +97,7 @@ class CommandPathSanity:
return filepath + os.sep
def GetResources(self):
return {'Pixmap': 'Path-Sanity',
return {'Pixmap': 'Path_Sanity',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Sanity",
"Check the path job for common errors"),
'Accel': "P, S",

View File

@@ -67,7 +67,7 @@ class ViewProvider:
self.obj = vobj.Object
def getIcon(self):
return ":/icons/Path-SetupSheet.svg"
return ":/icons/Path_SetupSheet.svg"
def __getstate__(self):
return None

View File

@@ -36,7 +36,7 @@ def translate(context, text, disambig=None):
class CommandPathSimpleCopy:
def GetResources(self):
return {'Pixmap': 'Path-SimpleCopy',
return {'Pixmap': 'Path_SimpleCopy',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_SimpleCopy", "Simple Copy"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_SimpleCopy", "Creates a non-parametric copy of another path")}

View File

@@ -539,7 +539,7 @@ class PathSimulation:
class CommandPathSimulate:
def GetResources(self):
return {'Pixmap': 'Path-Simulator',
return {'Pixmap': 'Path_Simulator',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Simulator", "CAM Simulator"),
'Accel': "P, M",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Simulator", "Simulate Path G-Code on stock")}

View File

@@ -238,9 +238,9 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
Command = PathOpGui.SetupOperation('Slot',
PathSlot.Create,
TaskPanelOpPage,
'Path-Slot',
QtCore.QT_TRANSLATE_NOOP("Slot", "Slot"),
QtCore.QT_TRANSLATE_NOOP("Slot", "Create a Slot operation from selected geometry or custom points."),
'Path_Slot',
QtCore.QT_TRANSLATE_NOOP("Path_Slot", "Slot"),
QtCore.QT_TRANSLATE_NOOP("Path_Slot", "Create a Slot operation from selected geometry or custom points."),
PathSlot.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathSlotGui... done\n")

View File

@@ -82,7 +82,7 @@ class _ViewProviderStop:
return None
def getIcon(self): # optional
return ":/icons/Path-Stop.svg"
return ":/icons/Path_Stop.svg"
def onChanged(self, vobj, prop): # optional
# pylint: disable=unused-argument
@@ -101,7 +101,7 @@ class _ViewProviderStop:
class CommandPathStop:
def GetResources(self):
return {'Pixmap': 'Path-Stop',
return {'Pixmap': 'Path_Stop',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Stop", "Stop"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Stop", "Add Optional or Mandatory Stop to the program")}

View File

@@ -226,9 +226,9 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
Command = PathOpGui.SetupOperation('Surface',
PathSurface.Create,
TaskPanelOpPage,
'Path-3DSurface',
QtCore.QT_TRANSLATE_NOOP("Surface", "3D Surface"),
QtCore.QT_TRANSLATE_NOOP("Surface", "Create a 3D Surface Operation from a model"),
'Path_3DSurface',
QtCore.QT_TRANSLATE_NOOP("Path_Surface", "3D Surface"),
QtCore.QT_TRANSLATE_NOOP("Path_Surface", "Create a 3D Surface Operation from a model"),
PathSurface.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathSurfaceGui... done\n")

View File

@@ -36,7 +36,7 @@ class CommandToolBitCreate:
pass
def GetResources(self):
return {'Pixmap': 'Path-ToolBit',
return {'Pixmap': 'Path_ToolBit',
'MenuText': QtCore.QT_TRANSLATE_NOOP("PathToolBit", "Create Tool"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathToolBit", "Creates a new ToolBit object")}
@@ -60,7 +60,7 @@ class CommandToolBitSave:
menuTxt = QtCore.QT_TRANSLATE_NOOP("PathToolBit", "Save Tool as...")
else:
menuTxt = QtCore.QT_TRANSLATE_NOOP("PathToolBit", "Save Tool")
return {'Pixmap': 'Path-ToolBit',
return {'Pixmap': 'Path_ToolBit',
'MenuText': menuTxt,
'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathToolBit", "Save an existing ToolBit object to a file")}
@@ -109,7 +109,7 @@ class CommandToolBitLoad:
pass
def GetResources(self):
return {'Pixmap': 'Path-ToolBit',
return {'Pixmap': 'Path_ToolBit',
'MenuText': QtCore.QT_TRANSLATE_NOOP("PathToolBit", "Load Tool"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathToolBit", "Load an existing ToolBit object from a file")}

View File

@@ -69,7 +69,7 @@ class ViewProvider(object):
pixmap = QtGui.QPixmap()
pixmap.loadFromData(png, 'PNG')
return QtGui.QIcon(pixmap)
return ':/icons/Path-ToolBit.svg'
return ':/icons/Path_ToolBit.svg'
def __getstate__(self):
return None

View File

@@ -35,7 +35,7 @@ class CommandToolBitSelectorOpen:
pass
def GetResources(self):
return {'Pixmap': 'Path-ToolTable',
return {'Pixmap': 'Path_ToolTable',
'MenuText': QtCore.QT_TRANSLATE_NOOP("PathToolBitLibrary", "ToolBit Dock"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathToolBitLibrary", "Toggle the Toolbit Dock"),
'Accel': "P, T",
@@ -65,7 +65,7 @@ class CommandToolBitLibraryOpen:
pass
def GetResources(self):
return {'Pixmap': 'Path-ToolTable',
return {'Pixmap': 'Path_ToolTable',
'MenuText': QtCore.QT_TRANSLATE_NOOP("PathToolBitLibrary", "ToolBit Library editor"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathToolBitLibrary", "Open an editor to manage ToolBit libraries"),
'CmdType': "ForEdit"}
@@ -93,7 +93,7 @@ class CommandToolBitLibraryOpen:
# pass
# def GetResources(self):
# return {'Pixmap': 'Path-ToolTable',
# return {'Pixmap': 'Path_ToolTable',
# 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathToolBitLibrary", "Load ToolBit Library"),
# 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathToolBitLibrary", "Load an entire ToolBit library or part of it into a job")}

View File

@@ -210,7 +210,7 @@ class ModelFactory(object):
libItem = QtGui.QStandardItem(fn)
libItem.setToolTip(loc)
libItem.setData(libFile, _PathRole)
libItem.setIcon(QtGui.QPixmap(':/icons/Path-ToolTable.svg'))
libItem.setIcon(QtGui.QPixmap(':/icons/Path_ToolTable.svg'))
model.appendRow(libItem)
PathLog.debug('model rows: {}'.format(model.rowCount()))

View File

@@ -67,7 +67,7 @@ class ViewProvider:
return None
def getIcon(self):
return ":/icons/Path-ToolController.svg"
return ":/icons/Path_ToolController.svg"
def onChanged(self, vobj, prop):
# pylint: disable=unused-argument
@@ -141,7 +141,7 @@ class CommandPathToolController(object):
# pylint: disable=no-init
def GetResources(self):
return {'Pixmap': 'Path-LengthOffset',
return {'Pixmap': 'Path_LengthOffset',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_ToolController", "Add Tool Controller to the Job"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_ToolController", "Add Tool Controller")}

View File

@@ -314,7 +314,7 @@ class EditorPanel():
listWidgetItem = QtGui.QListWidgetItem()
listItem = ToolTableListWidgetItem(self.TLM)
listItem.setTableName(table.Name)
listItem.setIcon(QtGui.QPixmap(':/icons/Path-ToolTable.svg'))
listItem.setIcon(QtGui.QPixmap(':/icons/Path_ToolTable.svg'))
listItem.toolMoved.connect(self.reloadReset)
listWidgetItem.setSizeHint(QtCore.QSize(0,40))
self.form.TableList.addItem(listWidgetItem)
@@ -449,7 +449,7 @@ class CommandToolLibraryEdit():
cb()
def GetResources(self):
return {'Pixmap' : 'Path-ToolTable',
return {'Pixmap' : 'Path_ToolTable',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_ToolTable","Tool Manager"),
'Accel': "P, T",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_ToolTable","Tool Manager")}

View File

@@ -146,9 +146,12 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
return TaskPanelBaseGeometryPage(obj, features)
Command = PathOpGui.SetupOperation('Vcarve', PathVcarve.Create, TaskPanelOpPage,
'Path-Vcarve', QtCore.QT_TRANSLATE_NOOP("PathVcarve", "Vcarve"),
QtCore.QT_TRANSLATE_NOOP("PathVcarve", "Creates a medial line engraving path"),
Command = PathOpGui.SetupOperation('Vcarve',
PathVcarve.Create,
TaskPanelOpPage,
'Path_Vcarve',
QtCore.QT_TRANSLATE_NOOP("Path_Vcarve", "Vcarve"),
QtCore.QT_TRANSLATE_NOOP("Path_Vcarve", "Creates a medial line engraving path"),
PathVcarve.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathVcarveGui... done\n")

View File

@@ -145,9 +145,9 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
Command = PathOpGui.SetupOperation('Waterline',
PathWaterline.Create,
TaskPanelOpPage,
'Path-Waterline',
QtCore.QT_TRANSLATE_NOOP("Waterline", "Waterline"),
QtCore.QT_TRANSLATE_NOOP("Waterline", "Create a Waterline Operation from a model"),
'Path_Waterline',
QtCore.QT_TRANSLATE_NOOP("Path_Waterline", "Waterline"),
QtCore.QT_TRANSLATE_NOOP("Path_Waterline", "Create a Waterline Operation from a model"),
PathWaterline.SetupProperties)
FreeCAD.Console.PrintLog("Loading PathWaterlineGui... done\n")

View File

@@ -112,7 +112,11 @@ def insert(filename, docname):
# Create a custom and viewobject
obj = PathCustom.Create("Custom")
res = PathOpGui.CommandResources('Custom', PathCustom.Create, PathCustomGui.TaskPanelOpPage, 'Path-Custom', 'Path-Custom', '', '')
res = PathOpGui.CommandResources('Custom',
PathCustom.Create, PathCustomGui.TaskPanelOpPage,
'Path_Custom',
'Path_Custom', '', ''
)
obj.ViewObject.Proxy = PathOpGui.ViewProvider(obj.ViewObject, res)
obj.ViewObject.Proxy.setDeleteObjectsOnReject(False)