- myColor = new QRadioButton( tr( "COLOR" ) );
- myColorBox = new HYDROGUI_ColorWidget( 0 );
-
- addWidget( tr( "NAME" ), myName );
- addSeparator();
- addWidget( tr( "IMAGE_1" ), myImage1 );
- addWidget( tr( "IMAGE_2" ), myImage2 );
-
- QFrame* aBackground = new QFrame();
- QGridLayout* aLayout = new QGridLayout( aBackground );
- aLayout->addWidget( myTransparent, 0, 0 );
- aLayout->addWidget( myColor, 1, 0 );
- aLayout->addWidget( myColorBox, 1, 1 );
-
- addWidget( tr( "BACKGROUND" ), aBackground );
- addSeparator();
- setRowStretch();
+ myColor = new QRadioButton( tr( "COLOR" ), aBackgroundFrame );
+ myColorBox = new HYDROGUI_ColorWidget( aBackgroundFrame );
+
+ QGridLayout* aBackgroundLayout = new QGridLayout( aBackgroundFrame );
+ aBackgroundLayout->setMargin( 0 );
+ aBackgroundLayout->setSpacing( 5 );
+ aBackgroundLayout->addWidget( aBackgroundLabel, 0, 0, 2, 1 );
+ aBackgroundLayout->addWidget( myTransparent, 0, 1 );
+ aBackgroundLayout->addWidget( myColor, 1, 1 );
+ aBackgroundLayout->addWidget( myColorBox, 1, 2 );
+
+ QGridLayout* aParamLayout = new QGridLayout( aParamGroup );
+ aParamLayout->setMargin( 5 );
+ aParamLayout->setSpacing( 5 );
+ aParamLayout->addWidget( myImage1Label, 0, 0 );
+ aParamLayout->addWidget( myImage1, 0, 1 );
+ aParamLayout->addWidget( myImage2Label, 1, 0 );
+ aParamLayout->addWidget( myImage2, 1, 1 );
+ aParamLayout->addWidget( myPolylineLabel, 1, 0 );
+ aParamLayout->addWidget( myPolyline, 1, 1 );
+ aParamLayout->addWidget( aBackgroundFrame, 2, 0, 1, 2 );
+
+ // Common
+ addWidget( anImageNameGroup );
+ addWidget( aParamGroup );
+ addStretch();
+
+ connect( myModifySelectedImage, SIGNAL( toggled( bool ) ),
+ this, SLOT( onModifySelectedImage( bool ) ) );
+
+ setMode( myMode, myIsEdit );