]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/CollectionPlugin/CollectionPlugin_WidgetField.h
Salome HOME
Issue #1865: Create a field
[modules/shaper.git] / src / CollectionPlugin / CollectionPlugin_WidgetField.h
index 3e3277b53a28c38219f3ccf9a999c467be4563f0..2e6d630ff47ca135addc5a245ab04c77b0abb3c3 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <ModuleBase_WidgetSelector.h>
 #include <ModuleBase_ViewerPrs.h>
+#include <ModelAPI_AttributeTables.h>
 
 #include <QList>
 #include <QStringList>
@@ -26,6 +27,8 @@ class QSlider;
 class QTableWidget;
 class QStackedWidget;
 class QPushButton;
+class QTableWidgetItem;
+class QLineEdit;
 
 /*!
  * \ingroup GUI
@@ -63,6 +66,8 @@ protected:
   /// \return a list of shapes
   virtual QIntList shapeTypes() const;
 
+  virtual bool eventFilter(QObject* theObbject, QEvent* theEvent);
+
 
 protected slots:
   /// Slot which is called on selection event
@@ -79,12 +84,28 @@ private slots:
 
   void onFieldTypeChanged(int theIdx);
 
+  void onTableEdited(int theRow, int theCol);
+
+  void onShapeTypeChanged(int theType);
+
 private:
   void clearData();
 
   void appendStepControls();
   void removeStepControls();
 
+  void updateHeaders(QTableWidget* theDataTbl) const;
+
+  int getSelectionType(const std::string& theStr) const;
+
+  std::string getSelectionType(int theType) const;
+
+  QTableWidgetItem* createDefaultItem() const;
+
+  QTableWidgetItem* createValueItem(ModelAPI_AttributeTables::Value& theVal) const;
+
+  ModelAPI_AttributeTables::Value getValue(QString theStrVal) const;
+
   /// Types of shapes selection
   QComboBox* myShapeTypeCombo;
 
@@ -111,9 +132,10 @@ private:
 
   QStringList myCompNamesList;
 
-  QList<ModuleBase_ViewerPrsPtr> mySelection;
-
   QPushButton* myRemoveBtn;
+
+  QLineEdit* myHeaderEditor;
+  int myEditIndex;
 };
 
 #endif
\ No newline at end of file