Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/geom.git] / src / MeasureGUI / MeasureGUI_WhatisDlg.cxx
index 6ce2962320c09aeb64e7d2b1b6816a1959b39a5f..8820931dd1230ffcdb81f7d0113e69e4d8e952de 100644 (file)
@@ -17,7 +17,7 @@
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
@@ -58,8 +58,8 @@
 //            The dialog will by default be modeless, unless you set 'modal' to
 //            TRUE to construct a modal dialog.
 //=================================================================================
-MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg( GeometryGUI* GUI, QWidget* parent )
-: MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_WhatisDlg" )
+MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg (GeometryGUI* GUI, QWidget* parent)
+  : MeasureGUI_Skeleton(GUI, parent, "MeasureGUI_WhatisDlg")
 {
   QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap(
     "GEOM",tr( "ICON_DLG_WHATIS" ) ) );
@@ -69,14 +69,23 @@ MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg( GeometryGUI* GUI, QWidget* parent )
   setCaption( tr( "GEOM_WHATIS_TITLE" ) );
 
   /***************************************************************/
-  
+
   GroupConstructors->setTitle( tr( "GEOM_WHATIS" ) );
   RadioButton1->setPixmap( image0 );
 
   myGrp = new MeasureGUI_1Sel1TextView_QTD( this, "myGrp" );
   myGrp->GroupBox1->setTitle( tr( "GEOM_WHATIS_OBJECT" ) );
   myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) );
+
   myGrp->TextEdit1->setReadOnly( TRUE );
+  // fix height to fit all text
+  myGrp->TextEdit1->setWordWrap(QTextEdit::NoWrap);
+  myGrp->TextEdit1->setTextFormat(Qt::PlainText);
+  QString allLines ("\n\n\n\n\n\n\n\n\n"); // 10 lines
+  myGrp->TextEdit1->setText(allLines);
+  int sbHeight = myGrp->TextEdit1->horizontalScrollBar()->height();
+  myGrp->TextEdit1->setFixedHeight(myGrp->TextEdit1->contentsHeight() + sbHeight);
+
   myGrp->PushButton1->setPixmap( image1 );
   myGrp->LineEdit1->setReadOnly( true );
 
@@ -84,7 +93,7 @@ MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg( GeometryGUI* GUI, QWidget* parent )
 
   /***************************************************************/
 
-  myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#Whatis";
+  myHelpFileName = "using_measurement_tools_page.html#whatis_anchor";
 
   /* Initialisation */
   Init();
@@ -111,6 +120,7 @@ void MeasureGUI_WhatisDlg::Init()
   MeasureGUI_Skeleton::Init();
 }
 
+
 //=================================================================================
 // function : processObject
 // purpose  :
@@ -145,6 +155,3 @@ bool MeasureGUI_WhatisDlg::getParameters( QString& theText )
     return getOperation()->IsDone();
   }
 }
-
-
-