Salome HOME
Merge remote-tracking branch 'origin/BR_1321_ECW' into BR_DEMO
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ChannelDlg.cxx
index 9097bf1e959ed177c5bc72b24366de0a463952fc..9c8513ca679971b0e924683193717b8bd9dd6ccc 100644 (file)
@@ -1,8 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// Copyright (C) 2014-2015  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
 // License as published by the Free Software Foundation; either
@@ -29,6 +25,7 @@
 #include <QLabel>
 #include <QLayout>
 #include <QLineEdit>
+#include <QtxDoubleSpinBox.h>
 
 HYDROGUI_ChannelDlg::HYDROGUI_ChannelDlg( HYDROGUI_Module* theModule, const QString& theTitle )
 : HYDROGUI_InputPanel( theModule, theTitle )
@@ -55,6 +52,11 @@ HYDROGUI_ChannelDlg::HYDROGUI_ChannelDlg( HYDROGUI_Module* theModule, const QStr
   myProfiles = new QComboBox( aParamGroup );
   myProfiles->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
+  myEquiDistance = new QtxDoubleSpinBox( aParamGroup );
+  myEquiDistance->setRange( 0.01, 9999 );
+  myEquiDistance->setValue( 1.0 );
+  myEquiDistance->setSingleStep( 1.0 );
+
   QGridLayout* aParamsLayout = new QGridLayout( aParamGroup );
   aParamsLayout->setMargin( 5 );
   aParamsLayout->setSpacing( 5 );
@@ -62,6 +64,8 @@ HYDROGUI_ChannelDlg::HYDROGUI_ChannelDlg( HYDROGUI_Module* theModule, const QStr
   aParamsLayout->addWidget( myGuideLines, 0, 1 );
   aParamsLayout->addWidget( new QLabel( tr( "CHANNEL_PROFILE" ), aParamGroup ), 1, 0 );
   aParamsLayout->addWidget( myProfiles, 1, 1 );
+  aParamsLayout->addWidget( new QLabel( tr( "EQUI_DISTANCE" ), aParamGroup ), 2, 0 );
+  aParamsLayout->addWidget( myEquiDistance, 2, 1 );
 
   // Common
   addWidget( myObjectNameGroup );
@@ -165,3 +169,13 @@ void HYDROGUI_ChannelDlg::onChannelDefChanged()
 
   emit CreatePreview();
 }
+
+double HYDROGUI_ChannelDlg::getEquiDistance() const
+{
+  return myEquiDistance->value();
+}
+
+void HYDROGUI_ChannelDlg::setEquiDistance( double theValue )
+{
+  myEquiDistance->setValue( theValue );
+}