Salome HOME
Merge branch 'BR_1328' into BR_DEMO
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_StreamDlg.cxx
index a1cc548fb6ded0853b6d350d6eed1469bedeee3d..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 );
 
@@ -97,14 +98,21 @@ HYDROGUI_StreamDlg::HYDROGUI_StreamDlg( HYDROGUI_Module* theModule, const QStrin
   aParamLayout->addLayout( aParam1Layout );
   aParamLayout->addWidget( myProfiles );
   aParamLayout->addLayout( aButtonsLayout );
-
-
-
+  
   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
@@ -203,6 +211,7 @@ void HYDROGUI_StreamDlg::setProfiles( const QStringList& theProfiles )
 
   myProfiles->setObjects( aProfiles );
 
+
   myRemoveButton->setEnabled( myProfiles->getObjects().count() > 0 );
 
   myProfiles->setUpdatesEnabled( true );
@@ -248,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();
+}
+