Salome HOME
Profile dialog backgound like it is in OCC viewer.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_TwoImagesDlg.cxx
index 5a80d9e2c8ac6b294bffa44240fd3cb1e4426c50..1ba4a66897f3d1fd30992ee7251faaa36805bd3e 100644 (file)
@@ -62,7 +62,7 @@ HYDROGUI_TwoImagesDlg::HYDROGUI_TwoImagesDlg( HYDROGUI_Module* theModule, const
   myImage2 = new HYDROGUI_ObjSelector( theModule, KIND_IMAGE, aParamGroup );
 
   myPolylineLabel = new QLabel( tr( "POLYLINE" ), aParamGroup );
-  myPolyline = new HYDROGUI_ObjSelector( theModule, KIND_POLYLINE, aParamGroup );
+  myPolyline = new HYDROGUI_ObjSelector( theModule, KIND_POLYLINEXY, aParamGroup );
 
   QFrame* aBackgroundFrame = new QFrame( aParamGroup );
   QLabel* aBackgroundLabel = new QLabel( tr( "BACKGROUND" ), aBackgroundFrame );
@@ -169,6 +169,15 @@ bool HYDROGUI_TwoImagesDlg::getSelectedObjects( QString& theName1,
   return !theName1.isEmpty() && !theName2.isEmpty();
 }
 
+void HYDROGUI_TwoImagesDlg::setPreselectedObject( const QString& theName )
+{
+  myImage1->SetName( theName );
+
+  HYDROGUI_ObjSelector* aSelector = myMode == TwoImages ? myImage2 : myPolyline;
+  aSelector->SetChecked( true );
+  aSelector->SetName( QString() );
+}
+
 void HYDROGUI_TwoImagesDlg::setColor( const QColor& theColor )
 {
   if( theColor.alpha() == 0 ) // transparent