]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1368: Creation of a Qt panel. Code improvement.
authornds <nds@opencascade.com>
Fri, 11 Mar 2016 04:32:31 +0000 (07:32 +0300)
committernds <nds@opencascade.com>
Fri, 11 Mar 2016 04:32:31 +0000 (07:32 +0300)
ModuleBase_ModelWidget does not use theParentId parameter.
It is removed to avoid having this parameter in createWidgetByType method
of WidgetCreator

65 files changed:
src/ModuleBase/ModuleBase_IModule.h
src/ModuleBase/ModuleBase_IWidgetCreator.h
src/ModuleBase/ModuleBase_ModelWidget.cpp
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_PagedContainer.cpp
src/ModuleBase/ModuleBase_PagedContainer.h
src/ModuleBase/ModuleBase_WidgetBoolValue.cpp
src/ModuleBase/ModuleBase_WidgetBoolValue.h
src/ModuleBase/ModuleBase_WidgetCheckGroupBox.cpp
src/ModuleBase/ModuleBase_WidgetCheckGroupBox.h
src/ModuleBase/ModuleBase_WidgetChoice.cpp
src/ModuleBase/ModuleBase_WidgetChoice.h
src/ModuleBase/ModuleBase_WidgetCreatorFactory.cpp
src/ModuleBase/ModuleBase_WidgetCreatorFactory.h
src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp
src/ModuleBase/ModuleBase_WidgetDoubleValue.h
src/ModuleBase/ModuleBase_WidgetEditor.cpp
src/ModuleBase/ModuleBase_WidgetEditor.h
src/ModuleBase/ModuleBase_WidgetErrorLabel.cpp
src/ModuleBase/ModuleBase_WidgetErrorLabel.h
src/ModuleBase/ModuleBase_WidgetExprEditor.cpp
src/ModuleBase/ModuleBase_WidgetExprEditor.h
src/ModuleBase/ModuleBase_WidgetFactory.cpp
src/ModuleBase/ModuleBase_WidgetFactory.h
src/ModuleBase/ModuleBase_WidgetFileSelector.cpp
src/ModuleBase/ModuleBase_WidgetFileSelector.h
src/ModuleBase/ModuleBase_WidgetIntValue.cpp
src/ModuleBase/ModuleBase_WidgetIntValue.h
src/ModuleBase/ModuleBase_WidgetLabel.cpp
src/ModuleBase/ModuleBase_WidgetLabel.h
src/ModuleBase/ModuleBase_WidgetLineEdit.cpp
src/ModuleBase/ModuleBase_WidgetLineEdit.h
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.h
src/ModuleBase/ModuleBase_WidgetSelector.cpp
src/ModuleBase/ModuleBase_WidgetSelector.h
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
src/ModuleBase/ModuleBase_WidgetShapeSelector.h
src/ModuleBase/ModuleBase_WidgetSwitch.cpp
src/ModuleBase/ModuleBase_WidgetSwitch.h
src/ModuleBase/ModuleBase_WidgetToolbox.cpp
src/ModuleBase/ModuleBase_WidgetToolbox.h
src/ModuleBase/ModuleBase_WidgetValidated.cpp
src/ModuleBase/ModuleBase_WidgetValidated.h
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_Module.h
src/PartSet/PartSet_WidgetChoice.h
src/PartSet/PartSet_WidgetEditor.cpp
src/PartSet/PartSet_WidgetEditor.h
src/PartSet/PartSet_WidgetFileSelector.cpp
src/PartSet/PartSet_WidgetFileSelector.h
src/PartSet/PartSet_WidgetMultiSelector.cpp
src/PartSet/PartSet_WidgetMultiSelector.h
src/PartSet/PartSet_WidgetPoint2DFlyout.cpp
src/PartSet/PartSet_WidgetPoint2DFlyout.h
src/PartSet/PartSet_WidgetPoint2d.cpp
src/PartSet/PartSet_WidgetPoint2d.h
src/PartSet/PartSet_WidgetPoint2dDistance.cpp
src/PartSet/PartSet_WidgetPoint2dDistance.h
src/PartSet/PartSet_WidgetShapeSelector.cpp
src/PartSet/PartSet_WidgetShapeSelector.h
src/PartSet/PartSet_WidgetSketchCreator.cpp
src/PartSet/PartSet_WidgetSketchCreator.h
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/PartSet/PartSet_WidgetSketchLabel.h

index be36fede6b6475fb67ac8ffa5b4cbe4859e9ca2f..016564178d8f7f2971b9597661091760276d2de8 100755 (executable)
@@ -102,7 +102,8 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject
   /// \param theMenu a popup menu to be shown in the viewer\r
   /// \param theStdActions a map of standard actions\r
   /// \return true if items are added and there is no necessity to provide standard menu\r
-  virtual bool addViewerMenu(QMenu* theMenu, const QMap<QString, QAction*>& theStdActions) const { return false; }\r
+  virtual bool addViewerMenu(QMenu* theMenu, const QMap<QString, QAction*>& theStdActions) const\r
+  { return false; }\r
 \r
   /// Add menu items for object browser into the given menu\r
   /// \param theMenu a popup menu to be shown in the object browser\r
@@ -112,9 +113,8 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject
   /// \param theType a type of widget\r
   /// \param theParent the parent object\r
   /// \param theWidgetApi the widget configuration. The attribute of the model widget is obtained from\r
-  /// \param theParentId is Id of a parent of the current attribute\r
   virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType, QWidget* theParent,\r
-                                      Config_WidgetAPI* theWidgetApi, std::string theParentId)\r
+                                                     Config_WidgetAPI* theWidgetApi)\r
   {\r
     return 0;\r
   }\r
index 91a076d447335fb4be8fad3ec1c390a3971d5f98..3d0789cceeb969252377a0aae21480cf2b862b33 100755 (executable)
@@ -41,18 +41,18 @@ public:
   /// Create page by its type
   /// \param theType a type
   /// \param theParent a parent widget
+  /// \param theData a low-level API for reading xml definitions of widgets
   virtual ModuleBase_PageBase* createPageByType(const std::string& theType,
                                                 QWidget* theParent,
-                                                Config_WidgetAPI* theWidgetApi,
-                                                std::string theParentId) = 0;
+                                                Config_WidgetAPI* theWidgetApi) = 0;
 
   /// Create widget by its type
-   /// \param theType a type
-   /// \param theParent a parent widget
+  /// \param theType a type
+  /// \param theParent a parent widget
+  /// \param theData a low-level API for reading xml definitions of widgets
   virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType,
                                                      QWidget* theParent,
                                                      Config_WidgetAPI* theWidgetApi,
-                                                     std::string theParentId,
                                                      ModuleBase_IWorkshop* theWorkshop) = 0;
 };
 
index e0ac58445270badf66dd16681c699911c1f3f07d..d12cfbeb2da066ed516182b0b6dd9b655595cf1e 100644 (file)
 //#define DEBUG_VALUE_STATE
 
 ModuleBase_ModelWidget::ModuleBase_ModelWidget(QWidget* theParent,
-                                               const Config_WidgetAPI* theData,
-                                               const std::string& theParentId)
+                                               const Config_WidgetAPI* theData)
     : QWidget(theParent),
-      myParentId(theParentId),
       myIsEditing(false),
       myState(Stored),
       myIsValueStateBlocked(false)
index a9f6530b92307f49101ca5cbd64cde7d8b2c1d0e..c2859e975ae3b5ffaa3853496236fe40d56641da 100644 (file)
@@ -39,12 +39,11 @@ Q_OBJECT
                      ModifiedInViewer, /// modification performed by viewer events
                      Reset }; /// the value is reset
 
-   /// Constructor
+  /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuration. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
-  ModuleBase_ModelWidget(QWidget* theParent, const Config_WidgetAPI* theData,
-                         const std::string& theParentId);
+  /// \param theData a low-level API for reading xml definitions of widgets
+  ModuleBase_ModelWidget(QWidget* theParent, const Config_WidgetAPI* theData);
   /// Destructor
   virtual ~ModuleBase_ModelWidget()
   {
@@ -159,13 +158,6 @@ Q_OBJECT
     return myAttributeID;
   }
 
-  /// Returns the parent of the attribute
-  /// \returns the string value
-  std::string parentID() const
-  {
-    return myParentId;
-  }
-
   /// \return Current feature
   FeaturePtr feature() const
   {
@@ -292,9 +284,6 @@ protected slots:
   /// The attribute name of the model feature
   std::string myAttributeID;
 
-  /// Name of parent
-  std::string myParentId;
-
   /// A feature which is processing by active operation
   FeaturePtr myFeature;
 
index 9f32442a577901139b5a810492c2828dc1195cd1..4da74e21274d5c76c1e5b3fa4db9674794de9f6b 100644 (file)
@@ -17,9 +17,8 @@
 #include <QVBoxLayout>
 
 
-ModuleBase_PagedContainer::ModuleBase_PagedContainer(QWidget* theParent, const Config_WidgetAPI* theData,
-                                                     const std::string& theParentId)
-: ModuleBase_ModelWidget(theParent, theData, theParentId),
+ModuleBase_PagedContainer::ModuleBase_PagedContainer(QWidget* theParent, const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData),
   myIsFocusOnCurrentPage(false)
 {
   // it is not obligatory to be ignored when property panel tries to activate next active widget
index b98055fc9dcb640713822ed18b6097cc5041b809..aee2e5c75b24090aa18384a3eafd343ac6cdb064 100644 (file)
@@ -24,9 +24,7 @@ class MODULEBASE_EXPORT ModuleBase_PagedContainer : public ModuleBase_ModelWidge
    /// A constructor
    /// \param theParent a parent widget
    /// \param theData a data of the widget
-   /// \param theParentId an Id of the parent object
-  ModuleBase_PagedContainer(QWidget* theParent, const Config_WidgetAPI* theData,
-                           const std::string& theParentId);
+  ModuleBase_PagedContainer(QWidget* theParent, const Config_WidgetAPI* theData);
   virtual ~ModuleBase_PagedContainer();
 
   /// Add a new page
index f260939e540c9a26a2c522e1a48d85322eb5f9d7..074b832c0560f3927609b4084b5284b4b6b83b91 100644 (file)
@@ -21,9 +21,8 @@
 #include <QCheckBox>
 
 ModuleBase_WidgetBoolValue::ModuleBase_WidgetBoolValue(QWidget* theParent,
-                                                       const Config_WidgetAPI* theData,
-                                                       const std::string& theParentId)
-    : ModuleBase_ModelWidget(theParent, theData, theParentId)
+                                                       const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData)
 {
   QString aText = QString::fromStdString(theData->widgetLabel());
   QString aToolTip = QString::fromStdString(theData->widgetTooltip());
index b100c4ffe4cd43b6886a42aeb93c75f12fb36372..082e54eecec51e43e3dd96443960b4981484053f 100644 (file)
@@ -25,9 +25,7 @@ Q_OBJECT
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
-  ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData,
-                             const std::string& theParentId);
+  ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData);
 
   virtual ~ModuleBase_WidgetBoolValue();
 
index 89d9356b9383908cf9f09eee98e71c51c0b2cd07..df32f5b53ea8c09dff7a8d6a24d11c7975443fa2 100755 (executable)
@@ -18,9 +18,8 @@
 #include <QList>
 
 ModuleBase_WidgetCheckGroupBox::ModuleBase_WidgetCheckGroupBox(QWidget* theParent,
-                                                               const Config_WidgetAPI* theData,
-                                                               const std::string& theParentId)
-: ModuleBase_ModelWidget(theParent, theData, theParentId),
+                                                               const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData),
   ModuleBase_PageBase()
 {
   QString aToolTip = QString::fromStdString(theData->widgetTooltip());
index 4d8c12a4122a8e0cfa12b31b2ce571a5b961199c..88995430e59997c683e1a1d520c99113ff192585 100755 (executable)
@@ -26,9 +26,7 @@ public:
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuration. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
-  ModuleBase_WidgetCheckGroupBox(QWidget* theParent, const Config_WidgetAPI* theData,
-                                 const std::string& theParentId);
+  ModuleBase_WidgetCheckGroupBox(QWidget* theParent, const Config_WidgetAPI* theData);
   virtual ~ModuleBase_WidgetCheckGroupBox();
 
   void setTitle(const QString& theTitle);
index d837c4f38b10efcf2ef81d38730bbaa74ec291db..6c35d6627020c2ca5089fd3f749c2153ae7c1fd2 100644 (file)
@@ -22,9 +22,8 @@
 
 
 ModuleBase_WidgetChoice::ModuleBase_WidgetChoice(QWidget* theParent, 
-                                                 const Config_WidgetAPI* theData, 
-                                                 const std::string& theParentId)
-    : ModuleBase_ModelWidget(theParent, theData, theParentId), myCombo(0), myButtons(0)
+                                                 const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData), myCombo(0), myButtons(0)
 {
   QHBoxLayout* aLayout = new QHBoxLayout(this);
   ModuleBase_Tools::adjustMargins(aLayout);
index e8db6c289487d6942d47c8688fadc26c282b7e34..100f66f24a4833bf06a8e651b5fc5e48cfa60cdd 100644 (file)
@@ -40,9 +40,7 @@ Q_OBJECT
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
-  ModuleBase_WidgetChoice(QWidget* theParent, const Config_WidgetAPI* theData, 
-                          const std::string& theParentId);
+  ModuleBase_WidgetChoice(QWidget* theParent, const Config_WidgetAPI* theData);
 
   virtual ~ModuleBase_WidgetChoice();
 
index cdf53e151274393d684b6bb353323817fae669a3..3f2ff93079c0e633f0caf23126abbd48b14d3e29 100755 (executable)
@@ -64,14 +64,14 @@ bool ModuleBase_WidgetCreatorFactory::hasPageWidget(const std::string& theType)
 }
 
 ModuleBase_PageBase* ModuleBase_WidgetCreatorFactory::createPageByType(
-                              const std::string& theType, QWidget* theParent,
-                              Config_WidgetAPI* theWidgetApi, std::string theParentId)
+                                          const std::string& theType, QWidget* theParent,
+                                          Config_WidgetAPI* theWidgetApi)
 {
   ModuleBase_PageBase* aPage = 0;
 
   if (myPageToCreator.contains(theType)) {
     WidgetCreatorPtr aCreator = myPageToCreator[theType];
-    aPage = aCreator->createPageByType(theType, theParent, theWidgetApi, theParentId);
+    aPage = aCreator->createPageByType(theType, theParent, theWidgetApi);
   }
 
   return aPage;
@@ -79,16 +79,15 @@ ModuleBase_PageBase* ModuleBase_WidgetCreatorFactory::createPageByType(
 
 
 ModuleBase_ModelWidget* ModuleBase_WidgetCreatorFactory::createWidgetByType(
-                              const std::string& theType, QWidget* theParent,
-                              Config_WidgetAPI* theWidgetApi, std::string theParentId,
-                              ModuleBase_IWorkshop* theWorkshop)
+                                                const std::string& theType, QWidget* theParent,
+                                                Config_WidgetAPI* theWidgetApi,
+                                                ModuleBase_IWorkshop* theWorkshop)
 {
   ModuleBase_ModelWidget* aWidget = 0;
 
   if (myCreators.contains(theType)) {
     WidgetCreatorPtr aCreator = myCreators[theType];
-    aWidget = aCreator->createWidgetByType(theType, theParent, theWidgetApi, theParentId,
-                                           theWorkshop);
+    aWidget = aCreator->createWidgetByType(theType, theParent, theWidgetApi, theWorkshop);
   }
 
   return aWidget;
index 98f4d211d1b514d8f5d6f83e70766e6da8f1b0b0..1c6991a5a44a405543af9334774ee4e75b7ab44f 100755 (executable)
@@ -49,8 +49,7 @@ class MODULEBASE_EXPORT ModuleBase_WidgetCreatorFactory
   /// \param theParent a parent widget
   ModuleBase_PageBase* createPageByType(const std::string& theType,
                                         QWidget* theParent,
-                                        Config_WidgetAPI* theWidgetApi,
-                                        std::string theParentId);
+                                        Config_WidgetAPI* theWidgetApi);
 
   /// Create widget by its type
   /// \param theType a type
@@ -58,7 +57,6 @@ class MODULEBASE_EXPORT ModuleBase_WidgetCreatorFactory
   ModuleBase_ModelWidget* createWidgetByType(const std::string& theType,
                                              QWidget* theParent,
                                              Config_WidgetAPI* theWidgetApi,
-                                             std::string theParentId,
                                              ModuleBase_IWorkshop* theWorkshop);
 
 private:
index fbe80ec1897a1c38369dcd1da4b4595c6d209573..672539acba696db961dc67cb45040ac419855270 100644 (file)
@@ -32,9 +32,8 @@
 #endif
 
 ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent,
-                                                           const Config_WidgetAPI* theData,
-                                                           const std::string& theParentId)
-    : ModuleBase_ModelWidget(theParent, theData, theParentId)
+                                                           const Config_WidgetAPI* theData)
+    : ModuleBase_ModelWidget(theParent, theData)
 {
   QFormLayout* aControlLay = new QFormLayout(this);
   ModuleBase_Tools::adjustMargins(aControlLay);
index cfd49221c3d525eef39aca22ca7a4154bfada40a..0abf5b526c99f2fcd77ee2feb9d34ec4f65e09a5 100644 (file)
@@ -31,9 +31,7 @@ Q_OBJECT
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent structure (widget, operation, group)
-  ModuleBase_WidgetDoubleValue(QWidget* theParent, const Config_WidgetAPI* theData,
-                               const std::string& theParentId);
+  ModuleBase_WidgetDoubleValue(QWidget* theParent, const Config_WidgetAPI* theData);
 
   virtual ~ModuleBase_WidgetDoubleValue();
 
index 41ec508e2a08183e489992dd97107f6d718d4934..b5dee0c4d8430f7bd80556a926e846ccfcdfc349 100644 (file)
@@ -33,9 +33,8 @@
 #include <QLayout>
 
 ModuleBase_WidgetEditor::ModuleBase_WidgetEditor(QWidget* theParent,
-                                                 const Config_WidgetAPI* theData,
-                                                 const std::string& theParentId)
-: ModuleBase_WidgetDoubleValue(theParent, theData, theParentId),
+                                                 const Config_WidgetAPI* theData)
+: ModuleBase_WidgetDoubleValue(theParent, theData),
   myXPosition(-1), myYPosition(-1)
 {
 }
index 43d9c099b8421527768fa40848fba5a599d4ad7c..db9dd1cc422f65dbef5030a98a11c92daeadd860 100644 (file)
@@ -27,9 +27,7 @@ Q_OBJECT
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
-  ModuleBase_WidgetEditor(QWidget* theParent, const Config_WidgetAPI* theData,
-                          const std::string& theParentId);
+  ModuleBase_WidgetEditor(QWidget* theParent, const Config_WidgetAPI* theData);
   /// Constructor
   /// \param theParent the parent object
   /// \param theAttribute The attribute of the model widget
index 2291bf1a0f9228b4ec7305c65f592543d0601fe4..cbcbae63f0db61ba1eecb8faaa84ccd8aa4e0b2f 100644 (file)
@@ -14,9 +14,8 @@
 #include <QEvent>
 
 ModuleBase_WidgetErrorLabel::ModuleBase_WidgetErrorLabel(QWidget* theParent,
-                                               const Config_WidgetAPI* theData,
-                                               const std::string& theParentId)
-    : ModuleBase_WidgetLabel(theParent, theData, theParentId)
+                                                         const Config_WidgetAPI* theData)
+: ModuleBase_WidgetLabel(theParent, theData)
 {
   myDefaultStyle = myLabel->styleSheet();
   myLabel->setContentsMargins(0,0,0,4);
index f173509016152d6b4a03bba66207e5148f2fc8d0..9adee7cce958cbdfe4c3edc6d3106772db9f9924 100644 (file)
@@ -23,9 +23,7 @@ Q_OBJECT
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
-  ModuleBase_WidgetErrorLabel(QWidget* theParent, const Config_WidgetAPI* theData,
-                            const std::string & theParentId);
+  ModuleBase_WidgetErrorLabel(QWidget* theParent, const Config_WidgetAPI* theData);
 
   virtual ~ModuleBase_WidgetErrorLabel();
 
index 1df376b2b2cff2127f5f3fd05321153f707817f9..a47d9e367ea73a77969deb2437c123cc466c4b2b 100644 (file)
@@ -208,9 +208,8 @@ void ExpressionEditor::onTextChanged()
 
 ModuleBase_WidgetExprEditor::ModuleBase_WidgetExprEditor( QWidget* theParent,
                                                           const Config_WidgetAPI* theData,
-                                                          const std::string& theParentId,
                                                           const std::string& thePlaceHolder )
-    : ModuleBase_ModelWidget(theParent, theData, theParentId)
+: ModuleBase_ModelWidget(theParent, theData)
 {
   QVBoxLayout* aMainLay = new QVBoxLayout(this);
   ModuleBase_Tools::adjustMargins(aMainLay);
index bbd84a89f2f415cfb71405e23b2b24cf8d6ea184..b3a63174b52bbf3b45fca6bf4afa559bda976e80 100644 (file)
@@ -104,7 +104,6 @@ class MODULEBASE_EXPORT ModuleBase_WidgetExprEditor : public ModuleBase_ModelWid
   /// \param thePlaceHolder a placeholder string
   ModuleBase_WidgetExprEditor( QWidget* theParent,
                                const Config_WidgetAPI* theData,
-                               const std::string& theParentId,
                                const std::string& thePlaceHolder );
   virtual ~ModuleBase_WidgetExprEditor();
 
index 267ab17b5468e28aa64ed4b1142689fdebce4421..41709a1bab606d016a88ba838bcfbd1439f5ce81 100644 (file)
@@ -71,7 +71,6 @@ ModuleBase_WidgetFactory::~ModuleBase_WidgetFactory()
 
 void ModuleBase_WidgetFactory::createWidget(ModuleBase_PageBase* thePage)
 {
-  myParentId = myWidgetApi->widgetId();
   if (!myWidgetApi->toChildWidget())
     return;
 
@@ -160,7 +159,6 @@ void ModuleBase_WidgetFactory::getGreedAttribute(std::string& theAttributeId)
   if (!theAttributeId.empty())
     return;
 
-  myParentId = myWidgetApi->widgetId();
   if (!myWidgetApi->toChildWidget())
     return;
 
@@ -193,7 +191,6 @@ void ModuleBase_WidgetFactory::moveToWidgetId(const std::string& theWidgetId, bo
   if (theFound)
     return;
 
-  myParentId = myWidgetApi->widgetId();
   if (!myWidgetApi->toChildWidget())
     return;
 
@@ -234,13 +231,13 @@ ModuleBase_PageBase* ModuleBase_WidgetFactory::createPageByType(const std::strin
   else if (theType == WDG_CHECK_GROUP) {
     QString aGroupName = qs(myWidgetApi->getProperty(CONTAINER_PAGE_NAME));
     ModuleBase_WidgetCheckGroupBox* aPage = new ModuleBase_WidgetCheckGroupBox(theParent,
-                                                                myWidgetApi, myParentId);
+                                                                myWidgetApi);
     aPage->setTitle(aGroupName);
     aResult = aPage;
   }
   if (!aResult)
     aResult = ModuleBase_WidgetCreatorFactory::get()->createPageByType(theType, theParent,
-                                                                       myWidgetApi, myParentId);
+                                                                       myWidgetApi);
 
   ModuleBase_ModelWidget* aWidget = dynamic_cast<ModuleBase_ModelWidget*>(aResult);
   if (aWidget)
@@ -255,44 +252,44 @@ ModuleBase_ModelWidget* ModuleBase_WidgetFactory::createWidgetByType(const std::
   ModuleBase_ModelWidget* result = NULL;
 
   if (theType == WDG_INFO) {
-    result = new ModuleBase_WidgetLabel(theParent, myWidgetApi, myParentId);
+    result = new ModuleBase_WidgetLabel(theParent, myWidgetApi);
   } else if (theType == WDG_ERRORINFO) {
-    result = new ModuleBase_WidgetErrorLabel(theParent, myWidgetApi, myParentId);
+    result = new ModuleBase_WidgetErrorLabel(theParent, myWidgetApi);
   } else if (theType == WDG_DOUBLEVALUE) {
-    result = new ModuleBase_WidgetDoubleValue(theParent, myWidgetApi, myParentId);
+    result = new ModuleBase_WidgetDoubleValue(theParent, myWidgetApi);
   } else if (theType == WDG_INTEGERVALUE) {
-    result = new ModuleBase_WidgetIntValue(theParent, myWidgetApi, myParentId);
+    result = new ModuleBase_WidgetIntValue(theParent, myWidgetApi);
   } else if (theType == WDG_SHAPE_SELECTOR) {
-    result = new ModuleBase_WidgetShapeSelector(theParent, myWorkshop, myWidgetApi, myParentId);
+    result = new ModuleBase_WidgetShapeSelector(theParent, myWorkshop, myWidgetApi);
   } else if (theType == WDG_BOOLVALUE) {
-    result = new ModuleBase_WidgetBoolValue(theParent, myWidgetApi, myParentId);
+    result = new ModuleBase_WidgetBoolValue(theParent, myWidgetApi);
   //} else if (theType == WDG_DOUBLEVALUE_EDITOR) {
-  //  result = new ModuleBase_WidgetEditor(theParent, myWidgetApi, myParentId);
+  //  result = new ModuleBase_WidgetEditor(theParent, myWidgetApi);
   } else if (theType == WDG_FILE_SELECTOR) {
-    result = new ModuleBase_WidgetFileSelector(theParent, myWidgetApi, myParentId);
+    result = new ModuleBase_WidgetFileSelector(theParent, myWidgetApi);
   } else if (theType == WDG_CHOICE) {
-    result = new ModuleBase_WidgetChoice(theParent, myWidgetApi, myParentId);
+    result = new ModuleBase_WidgetChoice(theParent, myWidgetApi);
   } else if (theType == WDG_STRINGVALUE) {
     std::string aPlaceHolder = myWidgetApi->getProperty( WDG_PLACE_HOLDER );
-    result = new ModuleBase_WidgetLineEdit( theParent, myWidgetApi, myParentId, aPlaceHolder );
+    result = new ModuleBase_WidgetLineEdit( theParent, myWidgetApi, aPlaceHolder );
   } else if (theType == WDG_EXPR_EDITOR) {
     std::string aPlaceHolder = myWidgetApi->getProperty( WDG_PLACE_HOLDER );
-    result = new ModuleBase_WidgetExprEditor( theParent, myWidgetApi, myParentId, aPlaceHolder );
+    result = new ModuleBase_WidgetExprEditor( theParent, myWidgetApi, aPlaceHolder );
   } else if (theType == WDG_MULTISELECTOR) {
-    result = new ModuleBase_WidgetMultiSelector(theParent, myWorkshop, myWidgetApi, myParentId);
+    result = new ModuleBase_WidgetMultiSelector(theParent, myWorkshop, myWidgetApi);
   } else if (theType == WDG_TOOLBOX) {
-    result = new ModuleBase_WidgetToolbox(theParent, myWidgetApi, myParentId);
+    result = new ModuleBase_WidgetToolbox(theParent, myWidgetApi);
   } else if (theType == WDG_SWITCH) {
-    result = new ModuleBase_WidgetSwitch(theParent, myWidgetApi, myParentId);
+    result = new ModuleBase_WidgetSwitch(theParent, myWidgetApi);
   } else if (theType == WDG_TOOLBOX_BOX || theType == WDG_SWITCH_CASE ||
              theType == NODE_VALIDATOR) {
     // Do nothing for "box" and "case"
     result = NULL;
   } else {
-    result = myWorkshop->module()->createWidgetByType(theType, theParent, myWidgetApi, myParentId);
+    result = myWorkshop->module()->createWidgetByType(theType, theParent, myWidgetApi);
     if (!result)
       result = ModuleBase_WidgetCreatorFactory::get()->createWidgetByType(theType, theParent,
-                                                              myWidgetApi, myParentId, myWorkshop);
+                                                              myWidgetApi, myWorkshop);
     #ifdef _DEBUG
     if (!result) {
       qDebug("ModuleBase_WidgetFactory::fillWidget: find bad widget type %s", theType.c_str());
index 5e14ad4af7a8f4dda8abe566990b544461eec9f7..cebeb0bda77b4b0db7be809ac6b7731773291c24 100644 (file)
@@ -98,9 +98,6 @@ protected:
 
   /// List of created model widgets
   QList<ModuleBase_ModelWidget*> myModelWidgets;
-
-  /// Id of current parent
-  std::string myParentId;
 };
 
 #endif /* ModuleBase_WidgetFactory_H_ */
index dbe8e8ce30411823c8863bd989e56b5b2585101d..f3238f222744a1468ebe337d9aad48fc8b7fb791 100644 (file)
@@ -31,9 +31,8 @@
 #include <string>
 
 ModuleBase_WidgetFileSelector::ModuleBase_WidgetFileSelector(QWidget* theParent,
-                                                             const Config_WidgetAPI* theData,
-                                                             const std::string& theParentId)
-    : ModuleBase_ModelWidget(theParent, theData, theParentId)
+                                                             const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData)
 {
   myTitle = QString::fromStdString(theData->getProperty("title"));
   myType = (theData->getProperty("type") == "save") ? WFS_SAVE : WFS_OPEN;
index b6f029fb088b9eda8c124d32a8c4617e4283b874..4d6c3b1d5e2e89b3defaa5f7afc17f130c23e4c6 100644 (file)
@@ -44,10 +44,8 @@ class MODULEBASE_EXPORT ModuleBase_WidgetFileSelector : public ModuleBase_ModelW
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuration. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   ModuleBase_WidgetFileSelector(QWidget* theParent,
-                                const Config_WidgetAPI* theData,
-                                const std::string& theParentId);
+                                const Config_WidgetAPI* theData);
   virtual ~ModuleBase_WidgetFileSelector();
 
   virtual QList<QWidget*> getControls() const;
index 6056ca2e061ad93b4f1b0f6b852ac90478cc59db..95074f73ad39fe25609561faceca390f64fe6a03 100644 (file)
@@ -35,9 +35,8 @@
 #endif
 
 ModuleBase_WidgetIntValue::ModuleBase_WidgetIntValue(QWidget* theParent,
-                                                           const Config_WidgetAPI* theData,
-                                                           const std::string& theParentId)
-    : ModuleBase_ModelWidget(theParent, theData, theParentId)
+                                                     const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData)
 {
   QFormLayout* aControlLay = new QFormLayout(this);
   ModuleBase_Tools::adjustMargins(aControlLay);
index 1268a5592ebea580e1913851b10fe4c001d007cb..d88b4d156314aaa60b05cf1eb5eb14cddc7d655e 100644 (file)
@@ -31,9 +31,7 @@ Q_OBJECT
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuration. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent structure (widget, operation, group)
-  ModuleBase_WidgetIntValue(QWidget* theParent, const Config_WidgetAPI* theData,
-                               const std::string& theParentId);
+  ModuleBase_WidgetIntValue(QWidget* theParent, const Config_WidgetAPI* theData);
 
   virtual ~ModuleBase_WidgetIntValue();
 
index 3abae6c7b704c9062981fd4ee87f8da1b9b25afc..e1e41ecd186ca107ae1bdaf75b48bac3bc99f1a8 100644 (file)
@@ -14,9 +14,8 @@
 
 
 ModuleBase_WidgetLabel::ModuleBase_WidgetLabel(QWidget* theParent,
-                                               const Config_WidgetAPI* theData,
-                                               const std::string& theParentId)
-    : ModuleBase_ModelWidget(theParent, theData, theParentId)
+                                               const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData)
 {
   QString aText = QString::fromStdString(theData->getProperty("title"));
   myLabel = new QLabel(aText, theParent);
index 9fb8ddd76f2caad71ddfa3e8308ebf3d3eccb630..b024b17c9c000cc0a11cd6ad805226ad57a067e2 100644 (file)
@@ -23,9 +23,7 @@ Q_OBJECT
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
-  ModuleBase_WidgetLabel(QWidget* theParent, const Config_WidgetAPI* theData,
-                            const std::string& theParentId);
+  ModuleBase_WidgetLabel(QWidget* theParent, const Config_WidgetAPI* theData);
 
   virtual ~ModuleBase_WidgetLabel();
 
index 7f7e187b8319149030c1d77e65de0b407dfec026..5b2929c4f1047a83d835e61d35fec2487f4ee951 100644 (file)
@@ -75,9 +75,8 @@ private:
 
 ModuleBase_WidgetLineEdit::ModuleBase_WidgetLineEdit(QWidget* theParent,
                                                      const Config_WidgetAPI* theData,
-                                                     const std::string& theParentId,
                                                      const std::string& thePlaceHolder )
-    : ModuleBase_ModelWidget(theParent, theData, theParentId)
+: ModuleBase_ModelWidget(theParent, theData)
 {
   QFormLayout* aMainLay = new QFormLayout(this);
   ModuleBase_Tools::adjustMargins(aMainLay);
index 5b6b22e57e16848e130575753a6539beec46fb60..3b8070af83b7926c0171f3ad1810d2e79b8a6c49 100644 (file)
@@ -32,11 +32,9 @@ class MODULEBASE_EXPORT ModuleBase_WidgetLineEdit : public ModuleBase_ModelWidge
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuration.
-  /// \param theParentId is Id of a parent of the current attribute
   /// \param thePlaceHolder a string of placeholder
   ModuleBase_WidgetLineEdit( QWidget* theParent,
                              const Config_WidgetAPI* theData,
-                             const std::string& theParentId,
                              const std::string& thePlaceHolder );
   virtual ~ModuleBase_WidgetLineEdit();
 
index 40518a2ca9dcfc573c8af708a769180f931f51dd..f5c1ef25189538e99e380c7265321c6785bd7132 100755 (executable)
@@ -84,10 +84,9 @@ protected:
 
 ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParent,
                                                                ModuleBase_IWorkshop* theWorkshop,
-                                                               const Config_WidgetAPI* theData,
-                                                               const std::string& theParentId)
- : ModuleBase_WidgetSelector(theParent, theWorkshop, theData, theParentId),
-   mySelectionCount(0)
+                                                               const Config_WidgetAPI* theData)
+: ModuleBase_WidgetSelector(theParent, theWorkshop, theData),
+  mySelectionCount(0)
 {
   QGridLayout* aMainLay = new QGridLayout(this);
   ModuleBase_Tools::adjustMargins(aMainLay);
index bebe4123b98cf30ddf8078088d33803dca11ce3b..81fcbed1dd9a83149d6b7adbfb3992173c32115d 100755 (executable)
@@ -54,11 +54,9 @@ class MODULEBASE_EXPORT ModuleBase_WidgetMultiSelector : public ModuleBase_Widge
   /// \param theParent the parent object
   /// \param theWorkshop instance of workshop interface
   /// \param theData the widget configuration. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   ModuleBase_WidgetMultiSelector(QWidget* theParent,
                                  ModuleBase_IWorkshop* theWorkshop,
-                                 const Config_WidgetAPI* theData,
-                                 const std::string& theParentId);
+                                 const Config_WidgetAPI* theData);
   virtual ~ModuleBase_WidgetMultiSelector();
 
   /// Returns list of widget controls
index 9471f0b8d6e314fedbf5b28761f35b7c1c703137..d2d36e4461c118a9ee40d25bf38dc1be8e292baa 100755 (executable)
@@ -20,9 +20,8 @@
 
 ModuleBase_WidgetSelector::ModuleBase_WidgetSelector(QWidget* theParent,
                                                      ModuleBase_IWorkshop* theWorkshop,
-                                                     const Config_WidgetAPI* theData,
-                                                     const std::string& theParentId)
- : ModuleBase_WidgetValidated(theParent, theWorkshop, theData, theParentId)
+                                                     const Config_WidgetAPI* theData)
+: ModuleBase_WidgetValidated(theParent, theWorkshop, theData)
 {
 }
 
index 9756b3633e13c78af6f2b7ef4f7ee224e85f632e..2a41f711449980ddc0f0d5169eabed0d0fb8a487 100755 (executable)
@@ -34,9 +34,8 @@ Q_OBJECT
   /// \param theParent the parent object
   /// \param theWorkshop instance of workshop interface
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   ModuleBase_WidgetSelector(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
-                            const Config_WidgetAPI* theData, const std::string& theParentId);
+                            const Config_WidgetAPI* theData);
 
   virtual ~ModuleBase_WidgetSelector();
 
index b68e282b69630d35b31d42bb8790a3f5064adf2e..55b9e9dc14fdce37693a2fb9c4b61791192c0535 100644 (file)
@@ -66,9 +66,8 @@
 
 ModuleBase_WidgetShapeSelector::ModuleBase_WidgetShapeSelector(QWidget* theParent,
                                                      ModuleBase_IWorkshop* theWorkshop,
-                                                     const Config_WidgetAPI* theData,
-                                                     const std::string& theParentId)
- : ModuleBase_WidgetSelector(theParent, theWorkshop, theData, theParentId)
+                                                     const Config_WidgetAPI* theData)
+: ModuleBase_WidgetSelector(theParent, theWorkshop, theData)
 {
   QFormLayout* aLayout = new QFormLayout(this);
   ModuleBase_Tools::adjustMargins(aLayout);
index bcc247b0f9a7d37ee43fb5fdd0d4ddf46b6077fa..4c73b1765d2a4c3efbca31fdd530d6d3bca99489 100644 (file)
@@ -63,9 +63,8 @@ Q_OBJECT
   /// \param theParent the parent object
   /// \param theWorkshop instance of workshop interface
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   ModuleBase_WidgetShapeSelector(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
-                                 const Config_WidgetAPI* theData, const std::string& theParentId);
+                                 const Config_WidgetAPI* theData);
 
   virtual ~ModuleBase_WidgetShapeSelector();
 
index 00ea700462e9aacd0a5f24d75d85b38e3fc35ffc..77eff6744cfa77257461edc04bc0901a8ada2e03 100644 (file)
@@ -18,9 +18,8 @@
 #include <QStackedLayout>
 #include <QVBoxLayout>
 
-ModuleBase_WidgetSwitch::ModuleBase_WidgetSwitch(QWidget* theParent, const Config_WidgetAPI* theData,
-                                                 const std::string& theParentId)
-: ModuleBase_PagedContainer(theParent, theData, theParentId)
+ModuleBase_WidgetSwitch::ModuleBase_WidgetSwitch(QWidget* theParent, const Config_WidgetAPI* theData)
+: ModuleBase_PagedContainer(theParent, theData)
 {
   QVBoxLayout*  aMainLay = new QVBoxLayout(this);
   //aMainLay->setContentsMargins(2, 4, 2, 2);
index 1f278042bc650f11fd704e3f2e7de7db5f2ef2b3..8b127f4d2a5f62da8e0e92912dbe49d45cc61633 100644 (file)
@@ -27,10 +27,8 @@ class MODULEBASE_EXPORT ModuleBase_WidgetSwitch : public ModuleBase_PagedContain
    /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuration. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   ModuleBase_WidgetSwitch(QWidget* theParent,
-                          const Config_WidgetAPI* theData,
-                          const std::string& theParentId);
+                          const Config_WidgetAPI* theData);
   virtual ~ModuleBase_WidgetSwitch();
 
   /// Defines if it is supported to set the value in this widget
index 83afaa5d62555adee1cf8dbb8798333a0bcb3737..c1f35c987cae6f5b192a32ff2d033d820e5f5afb 100644 (file)
@@ -18,9 +18,8 @@
 #include <QVBoxLayout>
 #include <QIcon>
 
-ModuleBase_WidgetToolbox::ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData,
-                                                   const std::string& theParentId)
-: ModuleBase_PagedContainer(theParent, theData, theParentId)
+ModuleBase_WidgetToolbox::ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData)
+: ModuleBase_PagedContainer(theParent, theData)
 {
   QVBoxLayout* aMainLayout = new QVBoxLayout(this);
   ModuleBase_Tools::zeroMargins(aMainLayout);
index 28e48c0fce27b20b33ccdd81dbdc47b596ca5dd1..08d851a142fdfa2c7ae2763fc1ce8e709f1a6a53 100644 (file)
@@ -25,9 +25,7 @@ class MODULEBASE_EXPORT ModuleBase_WidgetToolbox : public ModuleBase_PagedContai
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuration. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
-  ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData,
-                           const std::string& theParentId);
+  ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData);
   virtual ~ModuleBase_WidgetToolbox();
 
   /// Defines if it is supported to set the value in this widget
index eedfb2b799a22b3bebab7afc3a45e0cc97671684..645f2714333938f3e9a25a9462b83d3f80f21777 100644 (file)
@@ -24,9 +24,8 @@
 
 ModuleBase_WidgetValidated::ModuleBase_WidgetValidated(QWidget* theParent,
                                                        ModuleBase_IWorkshop* theWorkshop,
-                                                       const Config_WidgetAPI* theData,
-                                                       const std::string& theParentId)
-: ModuleBase_ModelWidget(theParent, theData, theParentId),
+                                                       const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData),
   myWorkshop(theWorkshop), myIsInValidate(false)
 {
 }
index f60cd1a0eeeb23122402a07822b7c10c39da8a5f..b101e051741d896470182b9638065873b528b340 100644 (file)
@@ -38,11 +38,9 @@ class MODULEBASE_EXPORT ModuleBase_WidgetValidated : public ModuleBase_ModelWidg
   /// \param theParent the parent object
   /// \param theWorkshop a reference to workshop
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   ModuleBase_WidgetValidated(QWidget* theParent,
                              ModuleBase_IWorkshop* theWorkshop,
-                             const Config_WidgetAPI* theData,
-                             const std::string& theParentId);
+                             const Config_WidgetAPI* theData);
   virtual ~ModuleBase_WidgetValidated();
 
   /// Checks whether all active viewer filters validate the presentation
index a4e5d07a0bf07592b514e1925bfaf80b824c21fa..0849ba3e31f7c4073cdb456c48b6ddb44bd35089 100755 (executable)
@@ -564,15 +564,16 @@ void PartSet_Module::onOperationActivatedByPreselection()
   mySketchMgr->operationActivatedByPreselection();
 }
 
-ModuleBase_ModelWidget* PartSet_Module::createWidgetByType(const std::string& theType, QWidget* theParent,
-                                            Config_WidgetAPI* theWidgetApi, std::string theParentId)
+ModuleBase_ModelWidget* PartSet_Module::createWidgetByType(const std::string& theType,
+                                                           QWidget* theParent,
+                                                           Config_WidgetAPI* theWidgetApi)
 {
   ModuleBase_IWorkshop* aWorkshop = workshop();
   XGUI_Workshop* aXUIWorkshop = getWorkshop();
   ModuleBase_ModelWidget* aWgt = NULL;
   if (theType == "sketch-start-label") {
     PartSet_WidgetSketchLabel* aLabelWgt = new PartSet_WidgetSketchLabel(theParent, aWorkshop,
-      theWidgetApi, theParentId, myHasConstraintShown);
+                                                               theWidgetApi, myHasConstraintShown);
     connect(aLabelWgt, SIGNAL(planeSelected(const std::shared_ptr<GeomAPI_Pln>&)),
       mySketchMgr, SLOT(onPlaneSelected(const std::shared_ptr<GeomAPI_Pln>&)));
     connect(aLabelWgt, SIGNAL(showConstraintToggled(int, bool)),
@@ -580,39 +581,39 @@ ModuleBase_ModelWidget* PartSet_Module::createWidgetByType(const std::string& th
     aWgt = aLabelWgt;
   } else if (theType == "sketch-2dpoint_selector") {
     PartSet_WidgetPoint2D* aPointWgt = new PartSet_WidgetPoint2D(theParent, aWorkshop,
-                                                                 theWidgetApi, theParentId);
+                                                                 theWidgetApi);
     aPointWgt->setSketch(mySketchMgr->activeSketch());
     connect(aPointWgt, SIGNAL(vertexSelected()), sketchReentranceMgr(), SLOT(onVertexSelected()));
     aWgt = aPointWgt;
   }else if (theType == "sketch-2dpoint_flyout_selector") {
     PartSet_WidgetPoint2DFlyout* aPointWgt = new PartSet_WidgetPoint2DFlyout(theParent, aWorkshop,
-                                                                 theWidgetApi, theParentId);
+                                                                             theWidgetApi);
     aPointWgt->setSketch(mySketchMgr->activeSketch());
     connect(aPointWgt, SIGNAL(vertexSelected()), sketchReentranceMgr(), SLOT(onVertexSelected()));
     aWgt = aPointWgt;
   } else if (theType == "point2ddistance") {
     PartSet_WidgetPoint2dDistance* aDistanceWgt = new PartSet_WidgetPoint2dDistance(theParent,
-                                                        aWorkshop, theWidgetApi, theParentId);
+                                                                     aWorkshop, theWidgetApi);
     aDistanceWgt->setSketch(mySketchMgr->activeSketch());
     aWgt = aDistanceWgt;
   } else if (theType == "sketch_shape_selector") {
     PartSet_WidgetShapeSelector* aShapeSelectorWgt =
-      new PartSet_WidgetShapeSelector(theParent, aWorkshop, theWidgetApi, theParentId);
+                          new PartSet_WidgetShapeSelector(theParent, aWorkshop, theWidgetApi);
     aShapeSelectorWgt->setSketcher(mySketchMgr->activeSketch());
     aWgt = aShapeSelectorWgt;
   } else if (theType == "sketch_multi_selector") {
     PartSet_WidgetMultiSelector* aShapeSelectorWgt =
-      new PartSet_WidgetMultiSelector(theParent, aWorkshop, theWidgetApi, theParentId);
+                          new PartSet_WidgetMultiSelector(theParent, aWorkshop, theWidgetApi);
     aShapeSelectorWgt->setSketcher(mySketchMgr->activeSketch());
     aWgt = aShapeSelectorWgt;
   } else if (theType == WDG_DOUBLEVALUE_EDITOR) {
-    aWgt = new PartSet_WidgetEditor(theParent, aWorkshop, theWidgetApi, theParentId);
+    aWgt = new PartSet_WidgetEditor(theParent, aWorkshop, theWidgetApi);
   } else if (theType == "export_file_selector") {
-    aWgt = new PartSet_WidgetFileSelector(theParent, aWorkshop, theWidgetApi, theParentId);
+    aWgt = new PartSet_WidgetFileSelector(theParent, aWorkshop, theWidgetApi);
   } else if (theType == "sketch_launcher") {
-    aWgt = new PartSet_WidgetSketchCreator(theParent, this, theWidgetApi, theParentId);
+    aWgt = new PartSet_WidgetSketchCreator(theParent, this, theWidgetApi);
   } else if (theType == "module_choice") {
-    aWgt = new PartSet_WidgetChoice(theParent, theWidgetApi, theParentId);
+    aWgt = new PartSet_WidgetChoice(theParent, theWidgetApi);
     connect(aWgt, SIGNAL(itemSelected(int)), SLOT(onBooleanOperationChange(int)));
   }
   return aWgt;
index 52c677690afe138cbb4ee54a3e4e2bcca63762fc..d3731bd8be0e9365a6c9856e11f6bb26465881e9 100755 (executable)
@@ -74,7 +74,7 @@ public:
 
   /// Creates custom widgets for property panel
   virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType, QWidget* theParent,
-                                                     Config_WidgetAPI* theWidgetApi, std::string theParentId);
+                                                     Config_WidgetAPI* theWidgetApi);
 
   /// Returns the active widget, by default it is the property panel active widget
   /// If the internal edit operation is started, this is the first widget of the operation
index 6b5e965f848e0761ac4f9a11b628ee4b987a1a08..d83bc3643a7b06b42dc492b63614447e2f077eed 100644 (file)
@@ -22,10 +22,8 @@ Q_OBJECT
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
-  PartSet_WidgetChoice(QWidget* theParent, const Config_WidgetAPI* theData, 
-    const std::string& theParentId) 
-    : ModuleBase_WidgetChoice(theParent, theData, theParentId) {}
+  PartSet_WidgetChoice(QWidget* theParent, const Config_WidgetAPI* theData) 
+    : ModuleBase_WidgetChoice(theParent, theData) {}
 };
 
 #endif
\ No newline at end of file
index d0a129aba01b49031ea569c398776a79f3683fb8..54e455ceb226e472de415d7b9664443854e1feef 100644 (file)
@@ -14,9 +14,8 @@
 #include <QWidget>
 
 PartSet_WidgetEditor::PartSet_WidgetEditor(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
-                                           const Config_WidgetAPI* theData,
-                                           const std::string& theParentId)
- : ModuleBase_WidgetEditor(theParent, theData, theParentId), myWorkshop(theWorkshop)
+                                           const Config_WidgetAPI* theData)
+ : ModuleBase_WidgetEditor(theParent, theData), myWorkshop(theWorkshop)
 {
 }
 
index 3536ebfafb61317443e4e6db262872bcdb95dd5c..432b7d141045248e9a7b8de56ffa20056ff21aa4 100644 (file)
@@ -27,9 +27,8 @@ Q_OBJECT
   /// \param theParent the parent object
   /// \param theWorkshop instance of workshop interface
   /// \param theData the widget configuration. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   PartSet_WidgetEditor(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
-                       const Config_WidgetAPI* theData, const std::string& theParentId);
+                       const Config_WidgetAPI* theData);
 
   virtual ~PartSet_WidgetEditor() {}
 
index c9ed766b4d862b18156e4d09b8eecd7ed8fa8cd4..b493c2a86fd569d8a18866885b085df023a91c4e 100644 (file)
 
 PartSet_WidgetFileSelector::PartSet_WidgetFileSelector(QWidget* theParent,
                                                        ModuleBase_IWorkshop* theWorkshop,
-                                                       const Config_WidgetAPI* theData,
-                                                       const std::string& theParentId)
-: ModuleBase_WidgetFileSelector(theParent, theData, theParentId)
-, myWorkshop(theWorkshop)
+                                                       const Config_WidgetAPI* theData)
+: ModuleBase_WidgetFileSelector(theParent, theData),
+  myWorkshop(theWorkshop)
 {
 }
 
index 70207a0cddeece1b5e7ce265801992330f67912f..632cb0571e3f3876ce21a94db109f4b7e4f35537 100644 (file)
@@ -29,11 +29,9 @@ public:
   /// \param theParent the parent object
   /// \param theWorkshop instance of workshop interface
   /// \param theData the widget configuration. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   PartSet_WidgetFileSelector(QWidget* theParent,
                              ModuleBase_IWorkshop* theWorkshop,
-                             const Config_WidgetAPI* theData,
-                             const std::string& theParentId);
+                             const Config_WidgetAPI* theData);
 
   virtual ~PartSet_WidgetFileSelector() {}
 
index afb664ed02bc246363af1633e6b6ebc6bf030885..bfa7a8d30d2b9ce3cc78e61832bb6fba374d14e3 100755 (executable)
@@ -31,9 +31,8 @@
 
 PartSet_WidgetMultiSelector::PartSet_WidgetMultiSelector(QWidget* theParent,
                                                          ModuleBase_IWorkshop* theWorkshop,
-                                                         const Config_WidgetAPI* theData,
-                                                         const std::string& theParentId)
-: ModuleBase_WidgetMultiSelector(theParent, theWorkshop, theData, theParentId)
+                                                         const Config_WidgetAPI* theData)
+: ModuleBase_WidgetMultiSelector(theParent, theWorkshop, theData)
 {
   myExternalObjectMgr = new PartSet_ExternalObjectsMgr(theData->getProperty("use_external"), false);
 }
index 5207201cb4b8710870b6ea0b46242a800c66c9aa..2f94057a7bda524338c56b35e241a7ff4a77be0b 100644 (file)
@@ -30,9 +30,8 @@ Q_OBJECT
   /// \param theParent the parent object
   /// \param theWorkshop instance of workshop interface
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   PartSet_WidgetMultiSelector(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
-                              const Config_WidgetAPI* theData, const std::string& theParentId);
+                              const Config_WidgetAPI* theData);
 
   virtual ~PartSet_WidgetMultiSelector();
 
index fa0b7257963df2df2d33df7536fdf3c92bce3d93..bb4d54b0eebf929ddb35102264d87103e8f3b228 100755 (executable)
@@ -18,9 +18,8 @@
 
 PartSet_WidgetPoint2DFlyout::PartSet_WidgetPoint2DFlyout(QWidget* theParent, 
                                                          ModuleBase_IWorkshop* theWorkshop,
-                                                         const Config_WidgetAPI* theData,
-                                                         const std::string& theParentId)
- : PartSet_WidgetPoint2D(theParent, theWorkshop, theData, theParentId)
+                                                         const Config_WidgetAPI* theData)
+ : PartSet_WidgetPoint2D(theParent, theWorkshop, theData)
 {
 }
 
index 637d14f5242f1c86f13a96da107624bdf99d0681..f6247b33f79fda40e6b056e33477d7fa27a6f48b 100755 (executable)
@@ -25,10 +25,8 @@ public:
   /// \param theParent the parent object
   /// \param theWorkshop a current workshop
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   PartSet_WidgetPoint2DFlyout(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
-                        const Config_WidgetAPI* theData, 
-                        const std::string& theParentId);
+                              const Config_WidgetAPI* theData);
   /// Destructor
   virtual ~PartSet_WidgetPoint2DFlyout() {};
 
index 49940a310567f0c462debbe3ae114def42888cbc..82f7683c2919e7787f2f0d88a5787be182c1673f 100644 (file)
@@ -58,9 +58,8 @@ static QStringList MyFeaturesForCoincedence;
 
 PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent, 
                                              ModuleBase_IWorkshop* theWorkshop,
-                                             const Config_WidgetAPI* theData,
-                                             const std::string& theParentId)
-: ModuleBase_ModelWidget(theParent, theData, theParentId), myWorkshop(theWorkshop),
+                                             const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData), myWorkshop(theWorkshop),
   myValueIsCashed(false), myIsFeatureVisibleInCash(true),
   myXValueInCash(0), myYValueInCash(0)
 {
index 4395b6eb291588c696fbff30a8fd12fe15cbdae2..e179720d3bde7b0dedc1db1a4aebdc36c2b593cb 100755 (executable)
@@ -42,10 +42,8 @@ Q_OBJECT
   /// \param theParent the parent object
   /// \param theWorkshop a current workshop
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   PartSet_WidgetPoint2D(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
-                        const Config_WidgetAPI* theData, 
-                        const std::string& theParentId);
+                        const Config_WidgetAPI* theData);
   /// Destructor
   virtual ~PartSet_WidgetPoint2D();
 
index 9e92051b7964bace54cb3943faae3cf5215c1b58..ed8165c23ab76da3c83746361a856b120b2a9348 100644 (file)
@@ -28,9 +28,8 @@
 
 PartSet_WidgetPoint2dDistance::PartSet_WidgetPoint2dDistance(QWidget* theParent,
                                                              ModuleBase_IWorkshop* theWorkshop,
-                                                             const Config_WidgetAPI* theData,
-                                                             const std::string& theParentId)
-: ModuleBase_WidgetDoubleValue(theParent, theData, theParentId), myWorkshop(theWorkshop),
+                                                             const Config_WidgetAPI* theData)
+: ModuleBase_WidgetDoubleValue(theParent, theData), myWorkshop(theWorkshop),
   myValueIsCashed(false), myIsFeatureVisibleInCash(true), myValueInCash(0)
 {
   myFirstPntName = theData->getProperty("first_point");
index 1cac83c89ea5bd2fd17db03dc1372fddbac8ca09..c81a3dc8291b004e79386b13cd96a8c4735e0a0d 100644 (file)
@@ -42,10 +42,8 @@ Q_OBJECT
   /// \param theParent the parent object
   /// \param theWorkshop a current workshop
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
-   PartSet_WidgetPoint2dDistance(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
-                                 const Config_WidgetAPI* theData,
-                                 const std::string& theParentId);
+  PartSet_WidgetPoint2dDistance(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
+                                const Config_WidgetAPI* theData);
 
   virtual ~PartSet_WidgetPoint2dDistance();
 
index 6f841163a7b271f4bbb442c507e01f1752e211a1..84d5644b58f9daa509acbc834f58ffce928aa2ff 100755 (executable)
@@ -28,9 +28,8 @@
 
 PartSet_WidgetShapeSelector::PartSet_WidgetShapeSelector(QWidget* theParent,
                                                          ModuleBase_IWorkshop* theWorkshop,
-                                                         const Config_WidgetAPI* theData,
-                                                         const std::string& theParentId)
-: ModuleBase_WidgetShapeSelector(theParent, theWorkshop, theData, theParentId)
+                                                         const Config_WidgetAPI* theData)
+: ModuleBase_WidgetShapeSelector(theParent, theWorkshop, theData)
 {
   myUseSketchPlane = theData->getBooleanAttribute("use_sketch_plane", true);
   myExternalObjectMgr = new PartSet_ExternalObjectsMgr(theData->getProperty("use_external"), true);
index 93cf342d77248d5524a6dd0b9c6dfa401ef85a78..ddbc8ba43d267171967a3bf20aea45ee0ed76a36 100644 (file)
@@ -29,9 +29,8 @@ Q_OBJECT
   /// \param theParent the parent object
   /// \param theWorkshop instance of workshop interface
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   PartSet_WidgetShapeSelector(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
-    const Config_WidgetAPI* theData, const std::string& theParentId);
+                              const Config_WidgetAPI* theData);
 
   virtual ~PartSet_WidgetShapeSelector();
 
index 308dd965f0f544f8e1d579071a0bb958266e6715..b965f4348d51ce42126f2067118faa1f7133120b 100644 (file)
@@ -42,9 +42,8 @@
 
 PartSet_WidgetSketchCreator::PartSet_WidgetSketchCreator(QWidget* theParent, 
                                                          PartSet_Module* theModule,
-                                                         const Config_WidgetAPI* theData,
-                                                         const std::string& theParentId)
-: ModuleBase_ModelWidget(theParent, theData, theParentId), myModule(theModule), myUseBody(true)
+                                                         const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData), myModule(theModule), myUseBody(true)
 {
   QFormLayout* aLayout = new QFormLayout(this);
   ModuleBase_Tools::adjustMargins(aLayout);
index f92285d37c4ffd5354b088c56f92cf0f3fe1598b..4bb31fe94de04f0324ac1bdd662f0c4dd74e02a3 100644 (file)
@@ -32,9 +32,8 @@ Q_OBJECT
   /// \param theParent the parent object
   /// \param theModule a reference to a module object
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
-  PartSet_WidgetSketchCreator(QWidget* theParent, PartSet_Module* theModule, 
-    const Config_WidgetAPI* theData, const std::string& theParentId);
+  PartSet_WidgetSketchCreator(QWidget* theParent, PartSet_Module* theModule,
+                              const Config_WidgetAPI* theData);
 
   virtual ~PartSet_WidgetSketchCreator();
 
index fa2f50750acce400899cc456d12f211e19119333..d424aa7e7b5868c604a08475eee6e34b9829cc1b 100644 (file)
@@ -57,9 +57,8 @@
 PartSet_WidgetSketchLabel::PartSet_WidgetSketchLabel(QWidget* theParent,
                         ModuleBase_IWorkshop* theWorkshop,
                         const Config_WidgetAPI* theData,
-                        const std::string& theParentId,
                         const QMap<PartSet_Tools::ConstraintVisibleState, bool>& toShowConstraints)
-: ModuleBase_WidgetValidated(theParent, theWorkshop, theData, theParentId),
+: ModuleBase_WidgetValidated(theParent, theWorkshop, theData),
   myPreviewDisplayed(false)
 {
   QVBoxLayout* aLayout = new QVBoxLayout(this);
index 0d1d4405642f93de202cbd9490a92dba3537846e..90c291bcdcf56086d4b717ebdb019469f62b85b3 100644 (file)
@@ -48,11 +48,9 @@ public:
   /// \param theParent the parent object
   /// \param theWorkshop a reference to workshop
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  /// \param theParentId is Id of a parent of the current attribute
   /// \param toShowConstraints a current show constraints state
   PartSet_WidgetSketchLabel(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
                       const Config_WidgetAPI* theData,
-                      const std::string& theParentId,
                       const QMap<PartSet_Tools::ConstraintVisibleState, bool>& toShowConstraints);
 
   virtual ~PartSet_WidgetSketchLabel();