Part: move icons to booleans subdirectory

The path to the icons is added to `AppPartGui.cpp`
using `Gui::BitmapFactory().addPath()`, so the icons are found
automatically in their new directories.
This commit is contained in:
vocx-fc
2020-10-05 19:06:44 -05:00
committed by wwmayer
parent db91c6f424
commit 3b671bf4a5
26 changed files with 28 additions and 24 deletions

View File

@@ -100,7 +100,7 @@ def cmdCreateJoinFeature(name, mode):
FreeCAD.ActiveDocument.commitTransaction()
def getIconPath(icon_dot_svg):
return ":/icons/" + icon_dot_svg
return icon_dot_svg
# -------------------------- /common stuff --------------------------------------------------

View File

@@ -51,7 +51,7 @@ if FreeCAD.GuiUp:
#--------------------------/translation-related code ----------------------------------------
def getIconPath(icon_dot_svg):
return ":/icons/" + icon_dot_svg
return icon_dot_svg
# -------------------------- /common stuff --------------------------------------------------

View File

@@ -185,7 +185,7 @@ class _ViewProviderCompoundFilter:
vobj.setEditorMode("DontUnhideOnDelete", 2) # set hidden
def getIcon(self):
return ":/icons/Part_CompoundFilter.svg"
return "Part_CompoundFilter"
def attach(self, vobj):
self.ViewObject = vobj
@@ -240,3 +240,4 @@ def getNullShapeShape(scale=1.0):
if scale != 1.0:
ret = _nullShapeShape.copy()
ret.scale(scale)

View File

@@ -53,7 +53,7 @@ if FreeCAD.GuiUp:
class _CommandCompoundFilter:
"Command to create CompoundFilter feature"
def GetResources(self):
return {'Pixmap': ":/icons/Part_CompoundFilter.svg",
return {'Pixmap': "Part_CompoundFilter",
'MenuText': QtCore.QT_TRANSLATE_NOOP("Part_CompoundFilter", "Compound Filter"),
'Accel': "",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Part_CompoundFilter", "Compound Filter: remove some childs from a compound")}

View File

@@ -52,7 +52,7 @@ if FreeCAD.GuiUp:
class _CommandExplodeCompound:
"Command to explode a compound"
def GetResources(self):
return {'Pixmap': ":/icons/Part_ExplodeCompound.svg",
return {'Pixmap': "Part_ExplodeCompound",
'MenuText': QtCore.QT_TRANSLATE_NOOP("Part_ExplodeCompound", "Explode compound"),
'Accel': "",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Part_ExplodeCompound", "Explode compound: split up a list of shapes into separate objects")}

View File

@@ -125,6 +125,7 @@ PyMOD_INIT_FUNC(PartGui)
Base::Console().Log("Loading GUI of Part module... done\n");
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/booleans"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/create"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/tools"));

View File

@@ -1,4 +1,25 @@
<RCC>
<qresource>
<file>icons/booleans/Part_BooleanFragments.svg</file>
<file>icons/booleans/Part_Booleans.svg</file>
<file>icons/booleans/Part_CheckGeometry.svg</file>
<file>icons/booleans/Part_Common.svg</file>
<file>icons/booleans/Part_Compound.svg</file>
<file>icons/booleans/Part_CompoundFilter.svg</file>
<file>icons/booleans/Part_CrossSections.svg</file>
<file>icons/booleans/Part_Cut.svg</file>
<file>icons/booleans/Part_Defeaturing.svg</file>
<file>icons/booleans/Part_ExplodeCompound.svg</file>
<file>icons/booleans/Part_Fuse.svg</file>
<file>icons/booleans/Part_JoinBypass.svg</file>
<file>icons/booleans/Part_JoinConnect.svg</file>
<file>icons/booleans/Part_JoinCutout.svg</file>
<file>icons/booleans/Part_JoinEmbed.svg</file>
<file>icons/booleans/Part_Section.svg</file>
<file>icons/booleans/Part_Slice.svg</file>
<file>icons/booleans/Part_SliceApart.svg</file>
<file>icons/booleans/Part_XOR.svg</file>
</qresource>
<qresource>
<file>icons/create/Part_Box.svg</file>
<file>icons/create/Part_Cone.svg</file>
@@ -25,30 +46,15 @@
</qresource>
<qresource>
<file>icons/Part_Attachment.svg</file>
<file>icons/Part_BooleanFragments.svg</file>
<file>icons/Part_Booleans.svg</file>
<file>icons/Part_BoxSelection.svg</file>
<file>icons/Part_CheckGeometry.svg</file>
<file>icons/Part_Circle_Parametric.svg</file>
<file>icons/Part_Common.svg</file>
<file>icons/Part_Compound.svg</file>
<file>icons/Part_CompoundFilter.svg</file>
<file>icons/Part_CrossSections.svg</file>
<file>icons/Part_Cut.svg</file>
<file>icons/Part_Defeaturing.svg</file>
<file>icons/Part_Element_Copy.svg</file>
<file>icons/Part_Ellipse_Parametric.svg</file>
<file>icons/Part_ExplodeCompound.svg</file>
<file>icons/Part_Export.svg</file>
<file>icons/Part_Feature.svg</file>
<file>icons/Part_FeatureImport.svg</file>
<file>icons/Part_Fuse.svg</file>
<file>icons/Part_Helix_Parametric.svg</file>
<file>icons/Part_Import.svg</file>
<file>icons/Part_JoinBypass.svg</file>
<file>icons/Part_JoinConnect.svg</file>
<file>icons/Part_JoinCutout.svg</file>
<file>icons/Part_JoinEmbed.svg</file>
<file>icons/Part_Line_Parametric.svg</file>
<file>icons/Part_Measure_Angular.svg</file>
<file>icons/Part_Measure_Linear.svg</file>
@@ -62,16 +68,12 @@
<file>icons/Part_Polygon_Parametric.svg</file>
<file>icons/Part_Refine_Shape.svg</file>
<file>icons/Part_Reverse_Shape.svg</file>
<file>icons/Part_Section.svg</file>
<file>icons/Part_Shape_from_Mesh.svg</file>
<file>icons/Part_ShapeInfo.svg</file>
<file>icons/Part_Slice.svg</file>
<file>icons/Part_SliceApart.svg</file>
<file>icons/Part_Spiral_Parametric.svg</file>
<file>icons/Part_Spline_Parametric.svg</file>
<file>icons/Part_Transformed_Copy.svg</file>
<file>icons/PartWorkbench.svg</file>
<file>icons/Part_XOR.svg</file>
<file>icons/preferences-part_design.svg</file>
<file>icons/Tree_Part.svg</file>
<file>icons/Tree_Part2D.svg</file>

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB