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 );
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 );
}
myPolyline->Clear();
myTransparent->setChecked( true );
myColorBox->resetColor();
+ myColorBox->setDisabled( true );
}
void HYDROGUI_TwoImagesDlg::setMode( const int theMode, const bool theIsEdit )
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