Salome HOME
Merge branch 'BR_1328' into BR_DEMO
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_StreamDlg.cxx
index 9693fd7fce569433979ccd759bb13af67aa045b1..a07c5fe7e79b5e5a178bfead856e8a6a2bf7e62c 100644 (file)
@@ -36,6 +36,7 @@
 #include <QListWidget>
 #include <QPushButton>
 #include <QDoubleSpinBox>
+#include <QTextEdit>
 
 HYDROGUI_StreamDlg::HYDROGUI_StreamDlg( HYDROGUI_Module* theModule, const QString& theTitle )
 : HYDROGUI_InputPanel( theModule, theTitle )
@@ -57,13 +58,13 @@ HYDROGUI_StreamDlg::HYDROGUI_StreamDlg( HYDROGUI_Module* theModule, const QStrin
   myAxes = new QComboBox( aParamGroup );
   myAxes->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   myDDZ = new QDoubleSpinBox( aParamGroup );
-  myDDZ->setRange( 1E-2, 100 );
-  myDDZ->setSingleStep( 1E-2 );
+  myDDZ->setRange( 0.01, 100 );
+  myDDZ->setSingleStep( 0.1 );
   myDDZ->setValue( 0.1 );
   myDDZ->setDecimals( 2 );
   mySpatialStep = new QDoubleSpinBox( aParamGroup );
-  mySpatialStep->setRange( 1E-2, 100 );
-  mySpatialStep->setSingleStep( 1.0 );
+  mySpatialStep->setRange( 0.1, 100 );
+  mySpatialStep->setSingleStep( 0.1 );
   mySpatialStep->setValue( 1 );
   mySpatialStep->setDecimals( 2 );
 
@@ -100,9 +101,18 @@ HYDROGUI_StreamDlg::HYDROGUI_StreamDlg( HYDROGUI_Module* theModule, const QStrin
   
   aParamGroup->setLayout( aParamLayout );
 
+  // Warnings
+  QGroupBox* aWarnGroup = new QGroupBox( tr( "STREAM_WARNINGS" ), mainFrame() );
+  myWarnText = new QTextEdit(); 
+  myWarnText->setReadOnly(true);
+  QBoxLayout* aWarnLayout = new QVBoxLayout();
+  aWarnLayout->addWidget( myWarnText );  
+  aWarnGroup->setLayout( aWarnLayout );
+
   // Common
   addWidget( myObjectNameGroup );
   addWidget( aParamGroup );
+  addWidget( aWarnGroup );
   addStretch();
 
   // Create selector
@@ -247,3 +257,28 @@ double HYDROGUI_StreamDlg::getSpatialStep() const
   return mySpatialStep->value();
 }
 
+void HYDROGUI_StreamDlg::setBackgroundColorForProfileList (int theInd, QColor theColor)
+{
+  myProfiles->setBackgroundColor(theInd, theColor);
+}
+
+QColor HYDROGUI_StreamDlg::getBackgroundColorForProfileList (int theInd) const
+{
+  return myProfiles->getBackgroundColor(theInd);
+}
+
+void HYDROGUI_StreamDlg::clearAllBackgroundColorsForProfileList ()
+{
+  myProfiles->clearAllBackgroundColors();
+}
+
+void HYDROGUI_StreamDlg::addWarning( const QString& theWarnMess )
+{
+  myWarnText->append( theWarnMess );
+}
+
+void HYDROGUI_StreamDlg::clearWarnings()
+{
+  myWarnText->clear();
+}
+