Salome HOME
Save for a list of the local selected points.
[modules/hydro.git] / src / HYDROCurveCreator / CurveCreator_TableView.h
index a1e185ae3e7e0ad4464e48e7d99a5d3ff8c91e06..bb8f73240fa1c2baf49768d7474fd7c5c31279ca 100644 (file)
 #ifndef CURVECREATOR_TABLEVIEW_H
 #define CURVECREATOR_TABLEVIEW_H
 
+#include "CurveCreator_ICurve.hxx"
+
 #include <QItemDelegate>
+#include <QTableWidget>
 
 class CurveCreator_TableItemDelegate : public QItemDelegate
 {
@@ -36,4 +39,30 @@ public:
                                  const QModelIndex& theIndex ) const;
 };
 
+class CurveCreator_TableView : public QTableWidget
+{
+public:
+  CurveCreator_TableView( CurveCreator_ICurve* theCurve, QWidget* theParent = 0 );
+  ~CurveCreator_TableView() {};
+
+  void setCurve( CurveCreator_ICurve* theCurve );
+
+  void addLocalPointToTable( const CurveCreator_ICurve::SectionToPoint& thePoint );
+
+  /**
+   * Returns a section index from the table
+   * \param theRowId a table row
+   */
+  int getSectionId( const int theRowId ) const;
+  /**
+   * Returns a point index from the table
+   * \param theRowId a table row
+   */
+  int getPointId( const int theRowId ) const;
+
+private:
+  CurveCreator_ICurve* myCurve;
+
+};
+
 #endif // CURVECREATOR_TABLEVIEW_H