Salome HOME
Dump Image data to python script (Feature #13).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_PolylineDlg.cxx
index 894bc23a12b9e53099671ab5a55264e20042393e..7deeb6fd47a8a105bf2aefceb4395937184964b0 100755 (executable)
 #include <CurveCreator_Widget.h>
 #include <CurveCreator_Curve.hxx>
 
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QLineEdit>
 
 HYDROGUI_PolylineDlg::HYDROGUI_PolylineDlg( HYDROGUI_Module* theModule, const QString& theTitle )
-: HYDROGUI_InputPanel( theModule, theTitle )
+: HYDROGUI_InputPanel( theModule, theTitle ), myName(NULL)
 {
-   CurveCreator_Curve *aStaticCurve = NULL;
+  QHBoxLayout* aNameLayout = new QHBoxLayout();
+  QLabel* aNameLabel = new QLabel(tr("CURVE_NAME_TLT"), this);
+  aNameLayout->addWidget(aNameLabel);
+  myName = new QLineEdit(this);
+  aNameLayout->addWidget(myName);
 
-   aStaticCurve = new CurveCreator_Curve(CurveCreator::Dim3d);
+  addLayout(aNameLayout);
 
-   CurveCreator_Widget *aWidget =
-       new CurveCreator_Widget( this, aStaticCurve);
+  myEditorWidget =
+    new CurveCreator_Widget( this, NULL);
 
-   addWidget( aWidget, 0, 0 );
-   setRowStretch();
+  addWidget( myEditorWidget );
+
+  connect( myEditorWidget, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
 }
 
 HYDROGUI_PolylineDlg::~HYDROGUI_PolylineDlg()
 {
 }
+
+void HYDROGUI_PolylineDlg::reset()
+{
+}
+
+void HYDROGUI_PolylineDlg::setPolylineName( const QString& theName )
+{
+  myName->setText(theName);
+}
+
+QString HYDROGUI_PolylineDlg::getPolylineName() const
+{
+  return myName->text();
+}
+
+void HYDROGUI_PolylineDlg::setCurve( CurveCreator_Curve* theCurve )
+{
+  myEditorWidget->setCurve( theCurve );
+}
+
+QList<int> HYDROGUI_PolylineDlg::getSelectedSections()
+{
+  return myEditorWidget->getSelectedSections();
+}
+
+QList< QPair< int, int > > HYDROGUI_PolylineDlg::getSelectedPoints()
+{
+  return myEditorWidget->getSelectedPoints();
+}