Salome HOME
lot 10 - warnings for DTM - untested
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_StreamDlg.cxx
index 06707d5f79bbca19d67c3c72f6b42d2a51f240f0..3a06ca02ff602e90f09c2eac493cea74ba439fe5 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,7 +58,7 @@ 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( 0.1, 100 );
+  myDDZ->setRange( 0.01, 100 );
   myDDZ->setSingleStep( 0.1 );
   myDDZ->setValue( 0.1 );
   myDDZ->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
@@ -252,6 +262,11 @@ void HYDROGUI_StreamDlg::setBackgroundColorForProfileList (int theInd, QColor th
   myProfiles->setBackgroundColor(theInd, theColor);
 }
 
+void HYDROGUI_StreamDlg::setBackgroundColorForProfileList (QString name, QColor theColor)
+{
+  myProfiles->setBackgroundColor(name, theColor);
+}
+
 QColor HYDROGUI_StreamDlg::getBackgroundColorForProfileList (int theInd) const
 {
   return myProfiles->getBackgroundColor(theInd);
@@ -262,3 +277,13 @@ void HYDROGUI_StreamDlg::clearAllBackgroundColorsForProfileList ()
   myProfiles->clearAllBackgroundColors();
 }
 
+void HYDROGUI_StreamDlg::addWarning( const QString& theWarnMess )
+{
+  myWarnText->append( theWarnMess );
+}
+
+void HYDROGUI_StreamDlg::clearWarnings()
+{
+  myWarnText->clear();
+}
+