+
+void HYDROGUI_TwoImagesDlg::setPreselectedObject( const QString& theName )
+{
+ myImage1->SetName( theName );
+
+ HYDROGUI_ObjSelector* aSelector = isTwoImagesMode() ? myImage2 : myPolyline;
+ aSelector->SetChecked( true );
+ aSelector->SetName( QString() );
+}
+
+void HYDROGUI_TwoImagesDlg::setColor( const QColor& theColor )
+{
+ if( theColor.alpha() == 0 ) { // transparent
+ myTransparent->setChecked( true );
+ myColorBox->resetColor();
+ }
+ else {
+ myColor->setChecked( true );
+ myColorBox->setColor( theColor );
+ }
+}
+
+QColor HYDROGUI_TwoImagesDlg::getColor() const
+{
+ QColor aColor( 255, 255, 255, 0 ); // transparent
+ if( myColor->isChecked() )
+ aColor = myColorBox->color();
+ return aColor;
+}
+
+void HYDROGUI_TwoImagesDlg::onModifySelectedImage( bool theState )
+{
+ myImageName->setEnabled( !theState );
+}
+
+bool HYDROGUI_TwoImagesDlg::isTwoImagesMode() const
+{
+ return myMode == TwoFuseImage || myMode == TwoCutImage;
+}