]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #3236: Provide icons for extrusions
authorvsv <vsv@opencascade.com>
Fri, 26 Jun 2020 09:26:32 +0000 (12:26 +0300)
committervsv <vsv@opencascade.com>
Fri, 26 Jun 2020 09:26:45 +0000 (12:26 +0300)
src/FeaturesPlugin/extrusion_widget.xml
src/FeaturesPlugin/extrusionfuse_widget.xml
src/FeaturesPlugin/revolution_widget.xml
src/FeaturesPlugin/revolutionfuse_widget.xml
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/PartSet/PartSet_WidgetSketchCreator.cpp
src/PartSet/PartSet_icons.qrc
src/PartSet/icons/extrusion_edge32.png [new file with mode: 0644]
src/PartSet/icons/extrusion_face32.png [new file with mode: 0644]
src/PartSet/icons/extrusion_vertex32.png [new file with mode: 0644]

index 138b4dca31b2888970213de180c97c74eb3f4b52..97e02b9c35ecf126ef2710d4657f6b18507607c0 100644 (file)
@@ -6,6 +6,7 @@
 2. An existing sketch face or contour. Extrusion will be filled by it.&lt;br /&gt;
 3. An existing result shape of kind: wires/edge/vertices. Extrusion will be filled by it."
                   shape_types="Vertices Edges Faces"
+                  type_icons=":/icons/extrusion_vertex32.png :/icons/extrusion_edge32.png :/icons/extrusion_face32.png"
                   default_type = "2"
                   use_choice="true">
     <validator id="FeaturesPlugin_ValidatorCompositeLauncher" parameters="base,Sketch"/>
@@ -14,6 +15,7 @@
                   label="Base objects:"
                   tooltip="Select a base objects"
                   shape_types="Vertices Edges Faces"
+                  type_icons=":/icons/extrusion_vertex32.png :/icons/extrusion_edge32.png :/icons/extrusion_face32.png"
                   default_type = "2"
                   use_choice="true"
                   concealment="true">
index 7596c09e7d47f996e3c733c46580040ccc1902be..78b9eb1313ff4d00cbe0099bf2c15035b1d7f9d8 100644 (file)
@@ -7,6 +7,7 @@
 2. An existing sketch face or contour. Extrusion will be filled by it.&lt;br /&gt;
 3. An existing result shape of kind: wires/edge/vertices. Extrusion will be filled by it."
       shape_types="Vertices Edges Faces"
+      type_icons=":/icons/extrusion_vertex32.png :/icons/extrusion_edge32.png :/icons/extrusion_face32.png"
       default_type = "2"
       use_choice="true">
       <validator id="FeaturesPlugin_ValidatorCompositeLauncher" parameters="base,Sketch"/>
@@ -16,6 +17,7 @@
       icon="icons/Features/sketch.png"
       tooltip="Select a sketch face"
       shape_types="Vertices Edges Faces"
+      type_icons=":/icons/extrusion_vertex32.png :/icons/extrusion_edge32.png :/icons/extrusion_face32.png"
       default_type = "2"
       use_choice="true"
       concealment="true">
index d8ec39801daad3961ccb9da4962cce0291c9892c..dd06cb43328c7da1e67af9a61b4e0048cc29e446 100644 (file)
@@ -6,6 +6,7 @@
 2. An existing sketch face or contour. Extrusion will be filled by it.&lt;br /&gt;
 3. An existing result shape of kind: wires/edge/vertices. Extrusion will be filled by it."
                   shape_types="Vertices Edges Faces"
+                  type_icons=":/icons/extrusion_vertex32.png :/icons/extrusion_edge32.png :/icons/extrusion_face32.png"
                   default_type = "2"
                   use_choice="true">
     <validator id="FeaturesPlugin_ValidatorCompositeLauncher" parameters="base,Sketch"/>
@@ -14,6 +15,7 @@
                   label="Base objects:"
                   tooltip="Select a base objects"
                   shape_types="Vertices Edges Faces"
+                  type_icons=":/icons/extrusion_vertex32.png :/icons/extrusion_edge32.png :/icons/extrusion_face32.png"
                   default_type = "2"
                   use_choice="true"
                   concealment="true">
index bcde5490fd0dd9535dc4402e4439d1294755b04f..aaca18add6d576fca1e0273b381bdba79455520d 100644 (file)
@@ -7,6 +7,7 @@
 2. An existing sketch face or contour. Extrusion will be filled by it.&lt;br /&gt;
 3. An existing result shape of kind: wires/edge/vertices. Extrusion will be filled by it."
       shape_types="Vertices Edges Faces"
+      type_icons=":/icons/extrusion_vertex32.png :/icons/extrusion_edge32.png :/icons/extrusion_face32.png"
       default_type = "2"
       use_choice="true">
       <validator id="FeaturesPlugin_ValidatorCompositeLauncher" parameters="base,Sketch"/>
@@ -16,6 +17,7 @@
       icon="icons/Features/sketch.png"
       tooltip="Select a sketch face"
       shape_types="Vertices Edges Faces"
+      type_icons=":/icons/extrusion_vertex32.png :/icons/extrusion_edge32.png :/icons/extrusion_face32.png"
       default_type = "2"
       use_choice="true"
       concealment="true">
index 9c4f6f9efe294bd5b5cb535f1c0cb5aff44dd792..5404dcf02c419dab6efe996200f37caed8b9d36f 100644 (file)
@@ -128,7 +128,15 @@ ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParen
   myMainLayout = new QVBoxLayout(this);
   ModuleBase_Tools::adjustMargins(myMainLayout);
 
-  QStringList aIconsList = getIconsList(myShapeTypes);
+
+  QStringList aIconsList;
+  std::string aIcons = theData->getProperty("type_icons");
+  if (aIcons.size() > 0)
+    aIconsList = QString(aIcons.c_str()).split(' ', QString::SkipEmptyParts);
+
+  if (aIconsList.size() != myShapeTypes.size())
+    aIconsList = getIconsList(myShapeTypes);
+
   myTypeCtrl = new ModuleBase_ChoiceCtrl(this, myShapeTypes, aIconsList);
   myTypeCtrl->setLabel(tr("Type"));
   if (!myShapeTypes.empty()) {
index 49d94f227aa0f5985018950dd39ade7f8f85fe01..959179cc9d70702c1e60259cbb698bf027084357 100644 (file)
@@ -128,7 +128,15 @@ PartSet_WidgetSketchCreator::PartSet_WidgetSketchCreator(QWidget* theParent,
   std::string aTypes = theData->getProperty("shape_types");
   myShapeTypes = QString(aTypes.c_str()).split(' ', QString::SkipEmptyParts);
   myIsUseChoice = theData->getBooleanAttribute("use_choice", false);
-  QStringList aIconsList = getIconsList(myShapeTypes);
+
+  QStringList aIconsList;
+  std::string aIcons = theData->getProperty("type_icons");
+  if (aIcons.size() > 0)
+    aIconsList = QString(aIcons.c_str()).split(' ', QString::SkipEmptyParts);
+
+  if (aIconsList.size() != myShapeTypes.size())
+    aIconsList = getIconsList(myShapeTypes);
+
   myTypeCtrl = new ModuleBase_ChoiceCtrl(this, myShapeTypes, aIconsList);
   myTypeCtrl->setLabel(tr("Type"));
   if (!myShapeTypes.empty()) {
index 98eb992f780647158b987c3ca4bb39f31134a84e..74a83a9afca4f91398959cad4ea8dd8d6ee06577 100644 (file)
@@ -1,25 +1,27 @@
- <!DOCTYPE RCC><RCC version="1.0">
- <qresource>
-     <file>icons/activate.png</file>
-     <file>icons/angle_32x32.png</file>
-     <file>icons/concealed_on.png</file>
-     <file>icons/concealed_off.png</file>
-     <file>icons/deactivate.png</file>
-     <file>icons/edit.png</file>
-     <file>icons/exec_state_failed.png</file>
-     <file>icons/exec_state_invalid_parameters.png</file>
-     <file>icons/hand_point.png</file>
-     <file>icons/move_to_end.png</file>
-     <file>icons/sketch_shape.png</file>
-     <file>icons/expression.png</file>
-     <file>icons/paper_roll.png</file>
-
-     <file>icons/group_edge.png</file>
-     <file>icons/group_face.png</file>
-     <file>icons/group_solid.png</file>
-     <file>icons/group_vertex.png</file>
-     <file>icons/toWork.png</file>
-     <file>icons/isFailed.png</file>
-     <file>icons/hasWarning.png</file>
- </qresource>
- </RCC>
+<RCC>
+    <qresource prefix="/">
+        <file>icons/activate.png</file>
+        <file>icons/angle_32x32.png</file>
+        <file>icons/concealed_on.png</file>
+        <file>icons/concealed_off.png</file>
+        <file>icons/deactivate.png</file>
+        <file>icons/edit.png</file>
+        <file>icons/exec_state_failed.png</file>
+        <file>icons/exec_state_invalid_parameters.png</file>
+        <file>icons/hand_point.png</file>
+        <file>icons/move_to_end.png</file>
+        <file>icons/sketch_shape.png</file>
+        <file>icons/expression.png</file>
+        <file>icons/paper_roll.png</file>
+        <file>icons/group_edge.png</file>
+        <file>icons/group_face.png</file>
+        <file>icons/group_solid.png</file>
+        <file>icons/group_vertex.png</file>
+        <file>icons/toWork.png</file>
+        <file>icons/isFailed.png</file>
+        <file>icons/hasWarning.png</file>
+        <file>icons/extrusion_edge32.png</file>
+        <file>icons/extrusion_face32.png</file>
+        <file>icons/extrusion_vertex32.png</file>
+    </qresource>
+</RCC>
diff --git a/src/PartSet/icons/extrusion_edge32.png b/src/PartSet/icons/extrusion_edge32.png
new file mode 100644 (file)
index 0000000..6a9607f
Binary files /dev/null and b/src/PartSet/icons/extrusion_edge32.png differ
diff --git a/src/PartSet/icons/extrusion_face32.png b/src/PartSet/icons/extrusion_face32.png
new file mode 100644 (file)
index 0000000..bd4b925
Binary files /dev/null and b/src/PartSet/icons/extrusion_face32.png differ
diff --git a/src/PartSet/icons/extrusion_vertex32.png b/src/PartSet/icons/extrusion_vertex32.png
new file mode 100644 (file)
index 0000000..6988ae3
Binary files /dev/null and b/src/PartSet/icons/extrusion_vertex32.png differ