Salome HOME
Copyright update 2022
[modules/shaper.git] / src / ParametersPlugin / ParametersPlugin_WidgetParamsMgr.h
index 444cd0cfbb5317ebe83a09043f91e7b9cabd0586..39a157602145a9db979ccf45d3bec3fde625544f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -29,7 +29,7 @@ class QTreeWidgetItem;
 class ParametersPlugin_ItemDelegate;
 class QPushButton;
 class QToolButton;
-
+class ModuleBase_IWorkshop;
 
 /*!
  * \ingroup GUI
@@ -61,7 +61,8 @@ class ParametersPlugin_WidgetParamsMgr : public ModuleBase_ModelDialogWidget
  Q_OBJECT
 public:
   /// Constructs a model widget
-  ParametersPlugin_WidgetParamsMgr(QWidget* theParent, const Config_WidgetAPI* theData);
+  ParametersPlugin_WidgetParamsMgr(QWidget* theParent, const Config_WidgetAPI* theData,
+    ModuleBase_IWorkshop* theWorkshop);
 
   /// Destructs the model widget
   virtual ~ParametersPlugin_WidgetParamsMgr() {}
@@ -108,6 +109,9 @@ private slots:
   /// Slot for reaction on remove parameter
   void onRemove();
 
+  /// Slot for reaction on import parameter
+  void onImport();
+
   /// Slot for reaction on shift up
   void onUp();
 
@@ -147,7 +151,7 @@ private:
   bool isValid();
 
   /// Returns true if parameter with the given name already exists
-  bool hasName(const QString& theName) const;
+  bool hasName(const QString& theName, int theIndex) const;
 
   /// Enable or disable buttons for parameters managemnt
   void enableButtons(bool theEnable);
@@ -158,6 +162,8 @@ private:
 
   void updateParametersFeatures();
 
+  ModuleBase_IWorkshop* myWorkshop;
+
   ParametersPlugin_TreeWidget* myTable;
   QTreeWidgetItem* myFeatures;
   QTreeWidgetItem* myParameters;
@@ -170,6 +176,7 @@ private:
   QPushButton* myAddBtn;
   QPushButton* myInsertBtn;
   QPushButton* myRemoveBtn;
+  QPushButton* myImportBtn;
   QToolButton* myUpBtn;
   QToolButton* myDownBtn;