From: rkv Date: Wed, 23 Oct 2013 07:04:25 +0000 (+0000) Subject: Checkbox for the point C is improved in Import Image dialog. Now coordinates edit... X-Git-Tag: BR_hydro_v_0_3~91 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bbe919cad657d54e6c562794e4236450ffcfc593;p=modules%2Fhydro.git Checkbox for the point C is improved in Import Image dialog. Now coordinates edit fields are also enabled/disabled. --- diff --git a/src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx b/src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx index 7f318290..4251a04c 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx @@ -193,7 +193,6 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co myPointCEnabler = new QCheckBox( myTransformGroup ); aTransformLayout->addWidget( myPointCEnabler, aRow, 0, 1, 2, Qt::AlignHCenter ); aTransformLayout->addWidget( aPointBtn, aRow, 2, 1, 7 ); - connect( myPointCEnabler, SIGNAL( toggled( bool ) ), aPointBtn, SLOT( setEnabled( bool ) ) ); } else { @@ -267,6 +266,22 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co connect( aRefPointX, SIGNAL( valueChanged( int ) ), this, SLOT( onPointCoordChanged( int ) ) ); connect( aRefPointY, SIGNAL( valueChanged( int ) ), this, SLOT( onPointCoordChanged( int ) ) ); } + + // Connect checkbox enabling point C + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myPointBtnMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myPointXMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myPointYMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myPointXDegMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myPointYDegMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myPointXMinMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myPointYMinMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myPointXSecMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myPointYSecMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myCartPointXMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myCartPointYMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myRefPointXMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + connect( myPointCEnabler, SIGNAL( toggled( bool ) ), myRefPointYMap[ HYDROGUI_PrsImage::PointC ], SLOT( setEnabled( bool ) ) ); + aTransformLayout->setColumnStretch( 1, 1 ); // double aTransformLayout->setColumnStretch( 3, 1 ); // degrees aTransformLayout->setColumnStretch( 5, 1 ); // minutes @@ -333,8 +348,8 @@ void HYDROGUI_ImportImageDlg::reset() myCartPointXMap[ aPointType ]->clear(); myCartPointYMap[ aPointType ]->clear(); } - myPointCEnabler->setChecked( false ); - myPointBtnMap[ HYDROGUI_PrsImage::PointC ]->setEnabled( false ); + myPointCEnabler->setChecked( true ); + myPointCEnabler->toggle(); myTransformGroup->setEnabled( false ); myRefImage->clear();