Salome HOME
PR: quadtree
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_PolylineDlg.cxx
index abbd6ae4850f1c7f001de1df568cbb0b18dd33aa..97912be9b0bbc904916e004a802eea5837ff06c4 100755 (executable)
 #include <QHBoxLayout>
 #include <QLabel>
 #include <QLineEdit>
+#include <QScrollArea>
 
 HYDROGUI_PolylineDlg::HYDROGUI_PolylineDlg( HYDROGUI_Module* theModule, const QString& theTitle )
 : HYDROGUI_InputPanel( theModule, theTitle ), myName(NULL)
 {
+  QScrollArea* aScrollView = new QScrollArea( this );
+  aScrollView->setFrameStyle( QFrame::NoFrame );
+  addWidget( aScrollView );
+
+  QWidget* aContent = new QWidget( aScrollView );
+  QVBoxLayout* aCLayout = new QVBoxLayout( aContent );
+  aCLayout->setMargin( 0 );
+
+  aScrollView->setWidget( aContent );
+  aScrollView->setWidgetResizable( true );
+
   QHBoxLayout* aNameLayout = new QHBoxLayout();
-  QLabel* aNameLabel = new QLabel(tr("POLYLINE_NAME_TLT"), this);
+  QLabel* aNameLabel = new QLabel(tr("POLYLINE_NAME_TLT"), aContent);
   aNameLayout->addWidget(aNameLabel);
-  myName = new QLineEdit(this);
+  myName = new QLineEdit(aContent);
   aNameLayout->addWidget(myName);
 
-  addLayout(aNameLayout);
+  aCLayout->addLayout(aNameLayout);
 
-  myEditorWidget = new CurveCreator_Widget( this, NULL );
-  addWidget( myEditorWidget, 3 );
+  myEditorWidget = new CurveCreator_Widget( aContent, NULL );
+  aCLayout->addWidget( myEditorWidget, 3 );
 
-  myAddElementBox = new QGroupBox( tr( "ADD_ELEMENT" ), this );
-  addWidget( myAddElementBox, 2 );
+  myAddElementBox = new QGroupBox( tr( "ADD_ELEMENT" ), aContent );
+  aCLayout->addWidget( myAddElementBox, 2 );
 
   QBoxLayout* anAddElementLayout = new QVBoxLayout( myAddElementBox );
   anAddElementLayout->setMargin( 0 );