Merge pull request #7786 from Roy-043/Draft-housekeeping-rename-snap-icons
Draft: housekeeping: rename snap icons
@@ -1,5 +1,5 @@
|
||||
<RCC>
|
||||
<qresource>
|
||||
<qresource>
|
||||
<file>icons/Draft_2DShapeView.svg</file>
|
||||
<file>icons/Draft_AddConstruction.svg</file>
|
||||
<file>icons/Draft_AddPoint.svg</file>
|
||||
@@ -44,6 +44,7 @@
|
||||
<file>icons/Draft_Finish.svg</file>
|
||||
<file>icons/Draft_FlipDimension.svg</file>
|
||||
<file>icons/Draft_Grid.svg</file>
|
||||
<file>icons/Draft_Hatch.svg</file>
|
||||
<file>icons/Draft_Heal.svg</file>
|
||||
<file>icons/Draft_Join.svg</file>
|
||||
<file>icons/Draft_Label.svg</file>
|
||||
@@ -57,6 +58,7 @@
|
||||
<file>icons/Draft_N-Curve.svg</file>
|
||||
<file>icons/Draft_N-Linear.svg</file>
|
||||
<file>icons/Draft_N-Polygon.svg</file>
|
||||
<file>icons/Draft_NewLayer.svg</file>
|
||||
<file>icons/Draft_Offset.svg</file>
|
||||
<file>icons/Draft_PathArray.svg</file>
|
||||
<file>icons/Draft_PathLinkArray.svg</file>
|
||||
@@ -78,6 +80,21 @@
|
||||
<file>icons/Draft_ShapeString_tree.svg</file>
|
||||
<file>icons/Draft_Slope.svg</file>
|
||||
<file>icons/Draft_Snap.svg</file>
|
||||
<file>icons/Draft_Snap_Angle.svg</file>
|
||||
<file>icons/Draft_Snap_Center.svg</file>
|
||||
<file>icons/Draft_Snap_Dimensions.svg</file>
|
||||
<file>icons/Draft_Snap_Endpoint.svg</file>
|
||||
<file>icons/Draft_Snap_Extension.svg</file>
|
||||
<file>icons/Draft_Snap_Grid.svg</file>
|
||||
<file>icons/Draft_Snap_Intersection.svg</file>
|
||||
<file>icons/Draft_Snap_Lock.svg</file>
|
||||
<file>icons/Draft_Snap_Midpoint.svg</file>
|
||||
<file>icons/Draft_Snap_Near.svg</file>
|
||||
<file>icons/Draft_Snap_Ortho.svg</file>
|
||||
<file>icons/Draft_Snap_Parallel.svg</file>
|
||||
<file>icons/Draft_Snap_Perpendicular.svg</file>
|
||||
<file>icons/Draft_Snap_Special.svg</file>
|
||||
<file>icons/Draft_Snap_WorkingPlane.svg</file>
|
||||
<file>icons/Draft_Split.svg</file>
|
||||
<file>icons/Draft_Stretch.svg</file>
|
||||
<file>icons/Draft_SubelementHighlight.svg</file>
|
||||
@@ -91,23 +108,6 @@
|
||||
<file>icons/Draft_WireToBSpline.svg</file>
|
||||
<file>icons/DraftWorkbench.svg</file>
|
||||
<file>icons/preferences-draft.svg</file>
|
||||
<file>icons/Snap_Angle.svg</file>
|
||||
<file>icons/Snap_Center.svg</file>
|
||||
<file>icons/Snap_Dimensions.svg</file>
|
||||
<file>icons/Snap_Endpoint.svg</file>
|
||||
<file>icons/Snap_Extension.svg</file>
|
||||
<file>icons/Snap_Grid.svg</file>
|
||||
<file>icons/Snap_Intersection.svg</file>
|
||||
<file>icons/Snap_Lock.svg</file>
|
||||
<file>icons/Snap_Midpoint.svg</file>
|
||||
<file>icons/Snap_Near.svg</file>
|
||||
<file>icons/Snap_Ortho.svg</file>
|
||||
<file>icons/Snap_Parallel.svg</file>
|
||||
<file>icons/Snap_Perpendicular.svg</file>
|
||||
<file>icons/Snap_Special.svg</file>
|
||||
<file>icons/Snap_WorkingPlane.svg</file>
|
||||
<file>icons/Draft_NewLayer.svg</file>
|
||||
<file>icons/Draft_Hatch.svg</file>
|
||||
<file>patterns/aluminium.svg</file>
|
||||
<file>patterns/brick01.svg</file>
|
||||
<file>patterns/concrete.svg</file>
|
||||
@@ -190,4 +190,4 @@
|
||||
<file>ui/TaskPanel_SetStyle.ui</file>
|
||||
<file>ui/dialogHatch.ui</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
</RCC>
|
||||
|
||||
@@ -528,7 +528,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Angle.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Angle.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -161,7 +161,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Center.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Center.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
@@ -329,7 +329,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Dimensions.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Dimensions.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -115,7 +115,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Endpoint.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Endpoint.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
@@ -399,7 +399,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Extension.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Extension.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -170,7 +170,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Grid.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Grid.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
@@ -127,7 +127,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Intersection.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Intersection.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
@@ -171,7 +171,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Lock.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Lock.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
@@ -126,7 +126,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Midpoint.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Midpoint.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
@@ -126,7 +126,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Near.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Near.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.7 KiB |
@@ -222,7 +222,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Ortho.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Ortho.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
@@ -150,7 +150,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Parallel.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Parallel.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
@@ -95,7 +95,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Perpendicular.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Perpendicular.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -160,7 +160,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_Special.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_Special.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
@@ -153,7 +153,7 @@
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Snap_WorkingPlane.svg</dc:identifier>
|
||||
<dc:identifier>FreeCAD/src/Mod/Draft/Resources/icons/Draft_Snap_WorkingPlane.svg</dc:identifier>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
@@ -175,18 +175,18 @@ class Snapper:
|
||||
('special', 'dot')])
|
||||
|
||||
self.cursors = \
|
||||
coll.OrderedDict([('passive', ':/icons/Snap_Near.svg'),
|
||||
('extension', ':/icons/Snap_Extension.svg'),
|
||||
('parallel', ':/icons/Snap_Parallel.svg'),
|
||||
('grid', ':/icons/Snap_Grid.svg'),
|
||||
('endpoint', ':/icons/Snap_Endpoint.svg'),
|
||||
('midpoint', ':/icons/Snap_Midpoint.svg'),
|
||||
('perpendicular', ':/icons/Snap_Perpendicular.svg'),
|
||||
('angle', ':/icons/Snap_Angle.svg'),
|
||||
('center', ':/icons/Snap_Center.svg'),
|
||||
('ortho', ':/icons/Snap_Ortho.svg'),
|
||||
('intersection', ':/icons/Snap_Intersection.svg'),
|
||||
('special', ':/icons/Snap_Special.svg')])
|
||||
coll.OrderedDict([('passive', ':/icons/Draft_Snap_Near.svg'),
|
||||
('extension', ':/icons/Draft_Snap_Extension.svg'),
|
||||
('parallel', ':/icons/Draft_Snap_Parallel.svg'),
|
||||
('grid', ':/icons/Draft_Snap_Grid.svg'),
|
||||
('endpoint', ':/icons/Draft_Snap_Endpoint.svg'),
|
||||
('midpoint', ':/icons/Draft_Snap_Midpoint.svg'),
|
||||
('perpendicular', ':/icons/Draft_Snap_Perpendicular.svg'),
|
||||
('angle', ':/icons/Draft_Snap_Angle.svg'),
|
||||
('center', ':/icons/Draft_Snap_Center.svg'),
|
||||
('ortho', ':/icons/Draft_Snap_Ortho.svg'),
|
||||
('intersection', ':/icons/Draft_Snap_Intersection.svg'),
|
||||
('special', ':/icons/Draft_Snap_Special.svg')])
|
||||
|
||||
|
||||
def init_active_snaps(self):
|
||||
|
||||
@@ -43,30 +43,25 @@ from draftutils.translate import translate
|
||||
class Draft_Snap_Base():
|
||||
"""Base Class inherited by all Draft Snap commands."""
|
||||
|
||||
def __init__(self, command_name="None"):
|
||||
self.command_name = command_name
|
||||
|
||||
def Activated(self, status=0):
|
||||
# _log("GuiCommand: {}".format(self.command_name))
|
||||
# _log("GuiCommand: {}".format(self.__class__.__name__))
|
||||
|
||||
if hasattr(Gui, "Snapper"):
|
||||
Gui.Snapper.toggle_snap(self.command_name[11:], bool(status))
|
||||
Gui.Snapper.toggle_snap(self.__class__.__name__[11:], bool(status))
|
||||
|
||||
def IsActive(self):
|
||||
return hasattr(Gui, "Snapper") and Gui.Snapper.isEnabled("Lock")
|
||||
|
||||
def isChecked(self):
|
||||
"""Return true if the given snap is active in Snapper."""
|
||||
return hasattr(Gui, "Snapper") and self.command_name[11:] in Gui.Snapper.active_snaps
|
||||
return hasattr(Gui, "Snapper") and self.__class__.__name__[11:] in Gui.Snapper.active_snaps
|
||||
|
||||
|
||||
class Draft_Snap_Lock(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Lock tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Lock")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Lock",
|
||||
return {"Pixmap": "Draft_Snap_Lock",
|
||||
"Accel": "Shift+S",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Lock", "Snap Lock"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Lock", "Enables or disables snapping globally."),
|
||||
@@ -82,11 +77,8 @@ Gui.addCommand("Draft_Snap_Lock", Draft_Snap_Lock())
|
||||
class Draft_Snap_Midpoint(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Midpoint tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Midpoint")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Midpoint",
|
||||
return {"Pixmap": "Draft_Snap_Midpoint",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Midpoint", "Snap Midpoint"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Midpoint", "Snaps to the midpoint of edges."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -99,11 +91,8 @@ Gui.addCommand("Draft_Snap_Midpoint", Draft_Snap_Midpoint())
|
||||
class Draft_Snap_Perpendicular(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Perpendicular tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Perpendicular")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Perpendicular",
|
||||
return {"Pixmap": "Draft_Snap_Perpendicular",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Perpendicular", "Snap Perpendicular"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Perpendicular", "Snaps to the perpendicular points on faces and edges."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -116,11 +105,8 @@ Gui.addCommand("Draft_Snap_Perpendicular", Draft_Snap_Perpendicular())
|
||||
class Draft_Snap_Grid(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Grid tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Grid")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Grid",
|
||||
return {"Pixmap": "Draft_Snap_Grid",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Grid", "Snap Grid"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Grid", "Snaps to the intersections of grid lines."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -133,11 +119,8 @@ Gui.addCommand("Draft_Snap_Grid", Draft_Snap_Grid())
|
||||
class Draft_Snap_Intersection(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Intersection tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Intersection")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Intersection",
|
||||
return {"Pixmap": "Draft_Snap_Intersection",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Intersection", "Snap Intersection"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Intersection", "Snaps to the intersection of two edges."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -150,11 +133,8 @@ Gui.addCommand("Draft_Snap_Intersection", Draft_Snap_Intersection())
|
||||
class Draft_Snap_Parallel(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Parallel tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Parallel")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Parallel",
|
||||
return {"Pixmap": "Draft_Snap_Parallel",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Parallel", "Snap Parallel"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Parallel", "Snaps to an imaginary line parallel to straight edges."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -167,11 +147,8 @@ Gui.addCommand("Draft_Snap_Parallel", Draft_Snap_Parallel())
|
||||
class Draft_Snap_Endpoint(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Endpoint tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Endpoint")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Endpoint",
|
||||
return {"Pixmap": "Draft_Snap_Endpoint",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Endpoint", "Snap Endpoint"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Endpoint", "Snaps to the endpoints of edges."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -184,11 +161,8 @@ Gui.addCommand("Draft_Snap_Endpoint", Draft_Snap_Endpoint())
|
||||
class Draft_Snap_Angle(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Angle tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Angle")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Angle",
|
||||
return {"Pixmap": "Draft_Snap_Angle",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Angle", "Snap Angle"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Angle", "Snaps to the special cardinal points on circular edges, at multiples of 30° and 45°."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -201,11 +175,8 @@ Gui.addCommand("Draft_Snap_Angle", Draft_Snap_Angle())
|
||||
class Draft_Snap_Center(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Center tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Center")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Center",
|
||||
return {"Pixmap": "Draft_Snap_Center",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Center", "Snap Center"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Center", "Snaps to the center point of faces and circular edges, and to the Placement point of Working Plane Proxies and Building Parts."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -218,11 +189,8 @@ Gui.addCommand("Draft_Snap_Center", Draft_Snap_Center())
|
||||
class Draft_Snap_Extension(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Extension tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Extension")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Extension",
|
||||
return {"Pixmap": "Draft_Snap_Extension",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Extension", "Snap Extension"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Extension", "Snaps to an imaginary line that extends beyond the endpoints of straight edges."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -235,11 +203,8 @@ Gui.addCommand("Draft_Snap_Extension", Draft_Snap_Extension())
|
||||
class Draft_Snap_Near(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Near tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Near")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Near",
|
||||
return {"Pixmap": "Draft_Snap_Near",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Near", "Snap Near"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Near", "Snaps to the nearest point on faces and edges."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -252,11 +217,8 @@ Gui.addCommand("Draft_Snap_Near", Draft_Snap_Near())
|
||||
class Draft_Snap_Ortho(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Ortho tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Ortho")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Ortho",
|
||||
return {"Pixmap": "Draft_Snap_Ortho",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Ortho", "Snap Ortho"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Ortho", "Snaps to imaginary lines that cross the previous point at multiples of 45°."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -269,11 +231,8 @@ Gui.addCommand("Draft_Snap_Ortho", Draft_Snap_Ortho())
|
||||
class Draft_Snap_Special(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Special tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Special")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Special",
|
||||
return {"Pixmap": "Draft_Snap_Special",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Special", "Snap Special"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Special", "Snaps to special points defined by the object."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -286,11 +245,8 @@ Gui.addCommand("Draft_Snap_Special", Draft_Snap_Special())
|
||||
class Draft_Snap_Dimensions(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_Dimensions tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_Dimensions")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_Dimensions",
|
||||
return {"Pixmap": "Draft_Snap_Dimensions",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Dimensions", "Snap Dimensions"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Dimensions", "Shows temporary X and Y dimensions."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -303,11 +259,8 @@ Gui.addCommand("Draft_Snap_Dimensions", Draft_Snap_Dimensions())
|
||||
class Draft_Snap_WorkingPlane(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_Snap_WorkingPlane tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_Snap_WorkingPlane")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Snap_WorkingPlane",
|
||||
return {"Pixmap": "Draft_Snap_WorkingPlane",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_WorkingPlane", "Snap Working Plane"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_WorkingPlane", "Projects snap points onto the current working plane."),
|
||||
"CmdType": "NoTransaction",
|
||||
@@ -320,9 +273,6 @@ Gui.addCommand("Draft_Snap_WorkingPlane", Draft_Snap_WorkingPlane())
|
||||
class ShowSnapBar(Draft_Snap_Base):
|
||||
"""GuiCommand for the Draft_ShowSnapBar tool."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(command_name="Draft_ShowSnapBar")
|
||||
|
||||
def GetResources(self):
|
||||
return {"Pixmap": "Draft_Snap",
|
||||
"MenuText": QT_TRANSLATE_NOOP("Draft_ShowSnapBar", "Show snap toolbar"),
|
||||
|
||||