X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_TwoImagesDlg.cxx;h=7ec78132a5c38f10e5f88cba4c5e8eac984442c0;hb=f34b90e9e4e02ba65419134d5d37a2e42aecfabf;hp=5a80d9e2c8ac6b294bffa44240fd3cb1e4426c50;hpb=a51a8a154799a4a022e4f8d5f8547585102e83f7;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_TwoImagesDlg.cxx b/src/HYDROGUI/HYDROGUI_TwoImagesDlg.cxx index 5a80d9e2..7ec78132 100644 --- a/src/HYDROGUI/HYDROGUI_TwoImagesDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_TwoImagesDlg.cxx @@ -62,7 +62,8 @@ 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, + HYDROGUI_ObjSelector::ClosedPolyline); QFrame* aBackgroundFrame = new QFrame( aParamGroup ); QLabel* aBackgroundLabel = new QLabel( tr( "BACKGROUND" ), aBackgroundFrame ); @@ -97,6 +98,12 @@ HYDROGUI_TwoImagesDlg::HYDROGUI_TwoImagesDlg( HYDROGUI_Module* theModule, const connect( myModifySelectedImage, SIGNAL( toggled( bool ) ), this, SLOT( onModifySelectedImage( bool ) ) ); + connect( myTransparent, SIGNAL( toggled( bool ) ), + myColorBox, SLOT( setDisabled( bool ) ) ); + connect( myImage1, SIGNAL( alreadySelected( const QString& ) ), + this, SIGNAL( alreadySelected( const QString& ) ) ); + connect( myImage2, SIGNAL( alreadySelected( const QString& ) ), + this, SIGNAL( alreadySelected( const QString& ) ) ); setMode( myMode, myIsEdit ); } @@ -114,6 +121,7 @@ void HYDROGUI_TwoImagesDlg::reset() myPolyline->Clear(); myTransparent->setChecked( true ); myColorBox->resetColor(); + myColorBox->setDisabled( true ); } void HYDROGUI_TwoImagesDlg::setMode( const int theMode, const bool theIsEdit ) @@ -169,6 +177,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