]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
GUI part of "group" creation functionality
authorsbh <sergey.belash@opencascade.com>
Thu, 9 Oct 2014 10:15:05 +0000 (14:15 +0400)
committersbh <sergey.belash@opencascade.com>
Thu, 9 Oct 2014 10:15:05 +0000 (14:15 +0400)
16 files changed:
src/Config/Config_Keywords.h
src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/FeaturesPlugin_Group.cpp [new file with mode: 0644]
src/FeaturesPlugin/FeaturesPlugin_Group.h [new file with mode: 0644]
src/FeaturesPlugin/FeaturesPlugin_Plugin.cpp
src/FeaturesPlugin/group_widget.xml [new file with mode: 0644]
src/FeaturesPlugin/plugin-Features.xml
src/ModuleBase/CMakeLists.txt
src/ModuleBase/ModuleBase_WidgetFactory.cpp
src/ModuleBase/ModuleBase_WidgetFactory.h
src/ModuleBase/ModuleBase_WidgetLineEdit.cpp [new file with mode: 0644]
src/ModuleBase/ModuleBase_WidgetLineEdit.h [new file with mode: 0644]
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp [new file with mode: 0644]
src/ModuleBase/ModuleBase_WidgetMultiSelector.h [new file with mode: 0644]
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
src/ModuleBase/ModuleBase_WidgetShapeSelector.h

index 87be5d39920d7ff5b619d9cdeb1b5a91c7b02982..5a4eb46831dba5b22024708dbf6a753c6f30ae5e 100644 (file)
@@ -20,6 +20,8 @@ const static char* NODE_VALIDATOR = "validator";
 //Widgets
 const static char* WDG_DOUBLEVALUE = "doublevalue";
 const static char* WDG_BOOLVALUE = "boolvalue";
+const static char* WDG_STRINGVALUE = "stringvalue";
+const static char* WDG_MULTISELECTOR = "multi_selector";
 //Widget containers
 const static char* WDG_INFO = "label";
 const static char* WDG_GROUP = "groupbox";
index 024b9593b35bb7cef050fcffa0f06aa6fc417b06..4d2b643d5eb0b0d7d868ff360f99dc3adec4e58c 100644 (file)
@@ -5,18 +5,21 @@ SET(PROJECT_HEADERS
     FeaturesPlugin_Plugin.h
     FeaturesPlugin_Extrusion.h
        FeaturesPlugin_Boolean.h
+       FeaturesPlugin_Group.h
 )
 
 SET(PROJECT_SOURCES
     FeaturesPlugin_Plugin.cpp
     FeaturesPlugin_Extrusion.cpp
     FeaturesPlugin_Boolean.cpp
+    FeaturesPlugin_Group.cpp
 )
 
 SET(XML_RESOURCES
   plugin-Features.xml
   extrusion_widget.xml
   boolean_widget.xml
+  group_widget.xml
 )
 
 INCLUDE_DIRECTORIES(
diff --git a/src/FeaturesPlugin/FeaturesPlugin_Group.cpp b/src/FeaturesPlugin/FeaturesPlugin_Group.cpp
new file mode 100644 (file)
index 0000000..3a9a07a
--- /dev/null
@@ -0,0 +1,32 @@
+// File:        FeaturesPlugin_Group.cpp
+// Created:     08 Oct 2014
+// Author:      Sergey BELASH
+
+#include "FeaturesPlugin_Group.h"
+
+#include <ModelAPI_Data.h>
+#include <ModelAPI_Document.h>
+#include <ModelAPI_AttributeInteger.h>
+#include <ModelAPI_AttributeString.h>
+
+using namespace std;
+
+FeaturesPlugin_Group::FeaturesPlugin_Group()
+{
+}
+
+void FeaturesPlugin_Group::initAttributes()
+{
+  data()->addAttribute(FeaturesPlugin_Group::NAME_ID(), ModelAPI_AttributeString::type());
+  data()->addAttribute(FeaturesPlugin_Group::TYPE_ID(), ModelAPI_AttributeInteger::type());
+  data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeString::type());
+}
+
+void FeaturesPlugin_Group::execute()
+{
+  AttributeIntegerPtr aTypeAttr = boost::dynamic_pointer_cast<ModelAPI_AttributeInteger>(
+      data()->attribute(FeaturesPlugin_Group::TYPE_ID()));
+  if (!aTypeAttr)
+    return;
+  int aType = aTypeAttr->value();
+}
diff --git a/src/FeaturesPlugin/FeaturesPlugin_Group.h b/src/FeaturesPlugin/FeaturesPlugin_Group.h
new file mode 100644 (file)
index 0000000..12d2987
--- /dev/null
@@ -0,0 +1,58 @@
+// File:        FeaturesPlugin_Group.h
+// Created:     08 Oct 2014
+// Author:      Sergey BELASH
+
+#ifndef FEATURESPLUGIN_GROUP_H_
+#define FEATURESPLUGIN_GROUP_H_
+
+#include "FeaturesPlugin.h"
+#include <ModelAPI_Feature.h>
+#include <GeomAPI_Shape.h>
+
+class FeaturesPlugin_Group : public ModelAPI_Feature
+{
+ public:
+  /// Extrusion kind
+  inline static const std::string& ID()
+  {
+    static const std::string MY_GROUP_ID("Group");
+    return MY_GROUP_ID;
+  }
+  /// attribute name of group type
+  inline static const std::string& NAME_ID()
+  {
+    static const std::string MY_GROUP_NAME_ID("group_name");
+    return MY_GROUP_NAME_ID;
+  }
+  /// attribute name of group type
+  inline static const std::string& TYPE_ID()
+  {
+    static const std::string MY_GROUP_TYPE_ID("group_type");
+    return MY_GROUP_TYPE_ID;
+  }
+  /// attribute name of selected entities list
+  inline static const std::string& LIST_ID()
+  {
+    static const std::string MY_GROUP_LIST_ID("group_list");
+    return MY_GROUP_LIST_ID;
+  }
+
+  /// Returns the kind of a feature
+  FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
+  {
+    static std::string MY_KIND = FeaturesPlugin_Group::ID();
+    return MY_KIND;
+  }
+
+  /// Creates a new part document if needed
+  FEATURESPLUGIN_EXPORT virtual void execute();
+
+  /// Request for initialization of data model of the feature: adding all attributes
+  FEATURESPLUGIN_EXPORT virtual void initAttributes();
+
+  /// Use plugin manager for features creation
+  FeaturesPlugin_Group();
+
+};
+
+#endif
index c43cd7a52691901535b4d528675dbf96e2827bb5..32c95813f68f1258d2f7b434e4226bacaefbeaa4 100644 (file)
@@ -1,9 +1,14 @@
-#include "FeaturesPlugin_Plugin.h"
-#include "FeaturesPlugin_Extrusion.h"
-#include "FeaturesPlugin_Boolean.h"
+#include <FeaturesPlugin_Plugin.h>
+
+#include <FeaturesPlugin_Boolean.h>
+#include <FeaturesPlugin_Extrusion.h>
+#include <FeaturesPlugin_Group.h>
 
 #include <ModelAPI_Session.h>
-#include <ModelAPI_Document.h>
+
+#include <string>
+
+#include <boost/smart_ptr/shared_ptr.hpp>
 
 using namespace std;
 
@@ -20,9 +25,10 @@ FeaturePtr FeaturesPlugin_Plugin::createFeature(string theFeatureID)
 {
   if (theFeatureID == FeaturesPlugin_Extrusion::ID()) {
     return FeaturePtr(new FeaturesPlugin_Extrusion);
-  } else
-  if (theFeatureID == FeaturesPlugin_Boolean::ID()) {
+  } else if (theFeatureID == FeaturesPlugin_Boolean::ID()) {
     return FeaturePtr(new FeaturesPlugin_Boolean);
+  } else if (theFeatureID == FeaturesPlugin_Group::ID()) {
+    return FeaturePtr(new FeaturesPlugin_Group);
   }
   // feature of such kind is not found
   return FeaturePtr();
diff --git a/src/FeaturesPlugin/group_widget.xml b/src/FeaturesPlugin/group_widget.xml
new file mode 100644 (file)
index 0000000..7b45d68
--- /dev/null
@@ -0,0 +1,15 @@
+<source>
+  <stringvalue
+    id="group_name"
+    label="Name"
+    tooltip="Name of the group"
+    string_list="Vertices Edges Faces Solids" />
+  <choice
+    id="group_type"
+    label="Type"
+    tooltip="Type of geometry entities"
+    string_list="Vertices Edges Faces Solids" />
+  <multi_selector id="group_list" 
+    label="Selected objects:"
+    tooltip="List of selected objects" /> 
+</source>
\ No newline at end of file
index 1088f2425bd73836b5fdec61c81b5b91d69363a3..bcd23c7e170835b084e69b62dfd61e27ee0b534b 100644 (file)
@@ -8,5 +8,13 @@
           <source path="boolean_widget.xml"/>
       </feature>
     </group>
+    <group id="Collections">
+      <feature id="Group"
+        title="Group"
+        tooltip="Create a new named collection of geometry entities"
+        icon=":icons/group.png">
+        <source path="group_widget.xml"/>
+      </feature>
+    </group>
   </workbench>  
 </plugin>
index 1e49aef443cb866012974e9b8fc553d225b74fc9..4a778cb41c93a7cd4a85b9c7cc9c29a6e8fac3d7 100644 (file)
@@ -30,6 +30,8 @@ SET(PROJECT_HEADERS
        ModuleBase_DoubleSpinBox.h
        ModuleBase_IPropertyPanel.h
        ModuleBase_IViewer.h
+       ModuleBase_WidgetLineEdit.h
+       ModuleBase_WidgetMultiSelector.h
 )
 
 SET(PROJECT_SOURCES
@@ -53,6 +55,8 @@ SET(PROJECT_SOURCES
        ModuleBase_WidgetChoice.cpp
        ModuleBase_WidgetFileSelector.cpp
        ModuleBase_DoubleSpinBox.cpp
+    ModuleBase_WidgetLineEdit.cpp
+       ModuleBase_WidgetMultiSelector.cpp
 )
 
 SET(PROJECT_LIBRARIES
index 9ce1c133fa9f9a6a4ad05c756300f0aabda1e95f..c7f0c609c5b8be02e7f321f80d16b5bc2f059c36 100644 (file)
@@ -23,6 +23,8 @@
 #include <ModuleBase_IWorkshop.h>
 #include <ModuleBase_IModule.h>
 #include <ModuleBase_Tools.h>
+#include <ModuleBase_WidgetLineEdit.h>
+#include <ModuleBase_WidgetMultiSelector.h>
 
 #include <ModelAPI_Validator.h>
 
@@ -156,6 +158,12 @@ QWidget* ModuleBase_WidgetFactory::createWidgetByType(const std::string& theType
   } else if (theType == WDG_CHOICE) {
     result = choiceControl(theParent);
 
+  } else if (theType == WDG_STRINGVALUE) {
+    result = lineEditControl(theParent);
+
+  } else if (theType == WDG_MULTISELECTOR) {
+    result = multiSelectorControl(theParent);
+
   } else if (myWidgetApi->isContainerWidget() || myWidgetApi->isPagedWidget()) {
     result = createContainer(theType, theParent);
   } else {
@@ -279,6 +287,22 @@ QWidget* ModuleBase_WidgetFactory::choiceControl(QWidget* theParent)
   return aChoiceWgt->getControl();
 }
 
+QWidget* ModuleBase_WidgetFactory::lineEditControl(QWidget* theParent)
+{
+  ModuleBase_WidgetLineEdit* aLineEditWgt =
+      new ModuleBase_WidgetLineEdit(theParent, myWidgetApi,myParentId);
+  myModelWidgets.append(aLineEditWgt);
+  return aLineEditWgt->getControl();
+}
+
+QWidget* ModuleBase_WidgetFactory::multiSelectorControl(QWidget* theParent)
+{
+  ModuleBase_WidgetMultiSelector* aMultiselectorWgt =
+      new ModuleBase_WidgetMultiSelector(theParent, myWidgetApi,myParentId);
+  myModelWidgets.append(aMultiselectorWgt);
+  return aMultiselectorWgt->getControl();
+}
+
 QString ModuleBase_WidgetFactory::qs(const std::string& theStdString) const
 {
   return QString::fromStdString(theStdString);
index 6ea4debf31035e2c1bfae2b586f509b5f574bfab..fd267d41801bd144d92aa5841b20f71ece86af69 100644 (file)
@@ -48,6 +48,9 @@ class MODULEBASE_EXPORT ModuleBase_WidgetFactory
   QWidget* point2dDistanceControl(QWidget* theParent);
   QWidget* fileSelectorControl(QWidget* theParent);
   QWidget* choiceControl(QWidget* theParent);
+  QWidget* lineEditControl(QWidget* theParent);
+  QWidget* multiSelectorControl(QWidget* theParent);
+
 
   QString qs(const std::string& theStdString) const;
 
diff --git a/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp b/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp
new file mode 100644 (file)
index 0000000..bf311c5
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * ModuleBase_WidgetLineEdit.cpp
+ *
+ *  Created on: Aug 28, 2014
+ *      Author: sbh
+ */
+
+#include <ModuleBase_WidgetLineEdit.h>
+#include <ModuleBase_Tools.h>
+
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_Data.h>
+#include <ModelAPI_Object.h>
+#include <ModelAPI_Validator.h>
+
+#include <Config_WidgetAPI.h>
+
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QObject>
+#include <QString>
+
+#include <boost/smart_ptr/shared_ptr.hpp>
+#include <string>
+
+ModuleBase_WidgetLineEdit::ModuleBase_WidgetLineEdit(QWidget* theParent,
+                                                     const Config_WidgetAPI* theData,
+                                                     const std::string& theParentId)
+    : ModuleBase_ModelWidget(theParent, theData, theParentId)
+{
+  myMainWidget = new QWidget(theParent);
+  QHBoxLayout* aMainLay = new QHBoxLayout(myMainWidget);
+  ModuleBase_Tools::adjustMargins(aMainLay);
+  QString aTitle = QString::fromStdString(theData->widgetLabel());
+  QLabel* aTitleLabel = new QLabel(aTitle, myMainWidget);
+  aMainLay->addWidget(aTitleLabel);
+  myLineEdit = new QLineEdit(myMainWidget);
+  aMainLay->addWidget(myLineEdit);
+  myLineEdit->setMinimumHeight(20);
+  myMainWidget->setLayout(aMainLay);
+
+  connect(myLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(onTextChanged()));
+}
+
+ModuleBase_WidgetLineEdit::~ModuleBase_WidgetLineEdit()
+{
+}
+
+bool ModuleBase_WidgetLineEdit::storeValue() const
+{
+  // A rare case when plugin was not loaded. 
+  if(!myFeature)
+    return false;
+  DataPtr aData = myFeature->data();
+  AttributeStringPtr aStringAttr = aData->string(attributeID());
+  QString aWidgetValue = myLineEdit->text();
+  aStringAttr->setValue(aWidgetValue.toStdString());
+  updateObject(myFeature);
+  return true;
+}
+
+bool ModuleBase_WidgetLineEdit::restoreValue()
+{
+  // A rare case when plugin was not loaded. 
+  if(!myFeature)
+    return false;
+  DataPtr aData = myFeature->data();
+  AttributeStringPtr aStringAttr = aData->string(attributeID());
+
+  bool isBlocked = myLineEdit->blockSignals(true);
+  myLineEdit->setText(QString::fromStdString(aStringAttr->value()));
+  myLineEdit->blockSignals(isBlocked);
+
+  return true;
+}
+
+QWidget* ModuleBase_WidgetLineEdit::getControl() const
+{
+  return myMainWidget;
+}
+
+QList<QWidget*> ModuleBase_WidgetLineEdit::getControls() const
+{
+  QList<QWidget*> result;
+  result << myLineEdit;
+  return result;
+}
+
+void ModuleBase_WidgetLineEdit::onTextChanged()
+{
+  storeValue();
+}
diff --git a/src/ModuleBase/ModuleBase_WidgetLineEdit.h b/src/ModuleBase/ModuleBase_WidgetLineEdit.h
new file mode 100644 (file)
index 0000000..92eff34
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * ModuleBase_WidgetLineEdit.h
+ *
+ *  Created on: Oct 8, 2014
+ *      Author: sbh
+ */
+
+#ifndef MODULEBASE_WIDGETLINEEDIT_H_
+#define MODULEBASE_WIDGETLINEEDIT_H_
+
+#include <ModuleBase.h>
+#include <ModuleBase_ModelWidget.h>
+
+#include <QList>
+#include <QString>
+#include <QStringList>
+
+class QWidget;
+class QLineEdit;
+
+class MODULEBASE_EXPORT ModuleBase_WidgetLineEdit : public ModuleBase_ModelWidget
+{
+  Q_OBJECT
+ public:
+  ModuleBase_WidgetLineEdit(QWidget* theParent,
+                                const Config_WidgetAPI* theData,
+                                const std::string& theParentId);
+  virtual ~ModuleBase_WidgetLineEdit();
+
+  /// Saves the internal parameters to the given feature
+  /// \param theObject a model feature to be changed
+  virtual bool storeValue() const;
+
+  virtual bool restoreValue();
+
+  /// Returns the internal parent wiget control, that can be shown anywhere
+  /// \returns the widget
+  QWidget* getControl() const;
+
+  /// Returns list of widget controls
+  /// \return a control list
+  virtual QList<QWidget*> getControls() const;
+
+ public slots:
+  void onTextChanged();
+
+ private:
+  QLineEdit* myLineEdit;
+  QWidget* myMainWidget;
+};
+
+#endif /* MODULEBASE_WIDGETFILESELECTOR_H_ */
diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
new file mode 100644 (file)
index 0000000..4ee9a4b
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * ModuleBase_WidgetMultiSelector.cpp
+ *
+ *  Created on: Aug 28, 2014
+ *      Author: sbh
+ */
+
+#include <ModuleBase_WidgetMultiSelector.h>
+#include <ModuleBase_Tools.h>
+
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_Data.h>
+#include <ModelAPI_Object.h>
+#include <ModelAPI_Validator.h>
+
+#include <Config_WidgetAPI.h>
+
+#include <QVBoxLayout>
+#include <QLabel>
+#include <QTextEdit>
+#include <QObject>
+#include <QString>
+
+#include <boost/smart_ptr/shared_ptr.hpp>
+#include <string>
+
+ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParent,
+                                                     const Config_WidgetAPI* theData,
+                                                     const std::string& theParentId)
+    : ModuleBase_ModelWidget(theParent, theData, theParentId)
+{
+  myMainWidget = new QWidget(theParent);
+  QVBoxLayout* aMainLay = new QVBoxLayout(myMainWidget);
+  ModuleBase_Tools::adjustMargins(aMainLay);
+  QString aTitle = QString::fromStdString(theData->widgetLabel());
+  QLabel* aTitleLabel = new QLabel(aTitle, myMainWidget);
+  aMainLay->addWidget(aTitleLabel);
+  myListControl = new QTextEdit(myMainWidget);
+  myListControl->setReadOnly(true);
+  aMainLay->addWidget(myListControl);
+  myListControl->setMinimumHeight(20);
+  myMainWidget->setLayout(aMainLay);
+
+  connect(myListControl, SIGNAL(textChanged(const QString&)), this, SLOT(onTextChanged()));
+}
+
+ModuleBase_WidgetMultiSelector::~ModuleBase_WidgetMultiSelector()
+{
+}
+
+bool ModuleBase_WidgetMultiSelector::storeValue() const
+{
+  // A rare case when plugin was not loaded. 
+  if(!myFeature)
+    return false;
+  DataPtr aData = myFeature->data();
+  AttributeStringPtr aStringAttr = aData->string(attributeID());
+  QString aWidgetValue = myListControl->toPlainText();
+  aStringAttr->setValue(aWidgetValue.toStdString());
+  updateObject(myFeature);
+  return true;
+}
+
+bool ModuleBase_WidgetMultiSelector::restoreValue()
+{
+  // A rare case when plugin was not loaded. 
+  if(!myFeature)
+    return false;
+  DataPtr aData = myFeature->data();
+  AttributeStringPtr aStringAttr = aData->string(attributeID());
+
+  bool isBlocked = myListControl->blockSignals(true);
+  myListControl->setText(QString::fromStdString(aStringAttr->value()));
+  myListControl->blockSignals(isBlocked);
+
+  return true;
+}
+
+QWidget* ModuleBase_WidgetMultiSelector::getControl() const
+{
+  return myMainWidget;
+}
+
+QList<QWidget*> ModuleBase_WidgetMultiSelector::getControls() const
+{
+  QList<QWidget*> result;
+  result << myListControl;
+  return result;
+}
diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h
new file mode 100644 (file)
index 0000000..d631f35
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * ModuleBase_WidgetMultiSelector.h
+ *
+ *  Created on: Oct 8, 2014
+ *      Author: sbh
+ */
+
+#ifndef MODULEBASE_WIDGETMULTISELECTOR_H_
+#define MODULEBASE_WIDGETMULTISELECTOR_H_
+
+#include <ModuleBase.h>
+#include <ModuleBase_ModelWidget.h>
+
+#include <QList>
+#include <QString>
+#include <QStringList>
+
+class QWidget;
+class QTextEdit;
+
+class MODULEBASE_EXPORT ModuleBase_WidgetMultiSelector : public ModuleBase_ModelWidget
+{
+  Q_OBJECT
+ public:
+  ModuleBase_WidgetMultiSelector(QWidget* theParent,
+                                const Config_WidgetAPI* theData,
+                                const std::string& theParentId);
+  virtual ~ModuleBase_WidgetMultiSelector();
+
+  /// Saves the internal parameters to the given feature
+  /// \param theObject a model feature to be changed
+  virtual bool storeValue() const;
+
+  virtual bool restoreValue();
+
+  /// Returns the internal parent wiget control, that can be shown anywhere
+  /// \returns the widget
+  QWidget* getControl() const;
+
+  /// Returns list of widget controls
+  /// \return a control list
+  virtual QList<QWidget*> getControls() const;
+
+ //public slots:
+
+ private:
+  QTextEdit* myListControl;
+  QWidget* myMainWidget;
+};
+
+#endif /* MODULEBASE_WIDGETFILESELECTOR_H_ */
index 3fb534b36482d1effb4df9ee153ffc0c085e1218..c800f9a7d4f5b8511647cd22207ab90cec35e069 100644 (file)
@@ -49,8 +49,9 @@ TopAbs_ShapeEnum ModuleBase_WidgetShapeSelector::shapeType(const QString& theTyp
     MyShapeTypes["shell"] = TopAbs_SHELL;
     MyShapeTypes["solid"] = TopAbs_SOLID;
   }
-  if (MyShapeTypes.contains(theType))
-    return MyShapeTypes[theType];
+  QString aType = theType.toLower();
+  if (MyShapeTypes.contains(aType))
+    return MyShapeTypes[aType];
   throw std::invalid_argument("Shape type defined in XML is not implemented!");
 }
 
index c1decfa56450fdf6eb19c3aa2d1b6362a131ecbe..7446122705d4af04dddb8dc2c8fc460cd363a11d 100644 (file)
@@ -26,6 +26,8 @@ class MODULEBASE_EXPORT ModuleBase_WidgetShapeSelector : public ModuleBase_Model
 {
 Q_OBJECT
  public:
+  static TopAbs_ShapeEnum shapeType(const QString& theType);
+
   ModuleBase_WidgetShapeSelector(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
                             const Config_WidgetAPI* theData, const std::string& theParentId);
 
@@ -79,8 +81,6 @@ private:
   // Set the given object as a value of the widget
   void setObject(ObjectPtr theObj);
 
-  static TopAbs_ShapeEnum shapeType(const QString& theType);
-
   QWidget* myContainer;
   QLabel* myLabel;
   QLineEdit* myTextLine;