From aab614ec8b5812b890ea83b5a495bab9b4a09257 Mon Sep 17 00:00:00 2001 From: rkv Date: Tue, 22 Oct 2013 14:37:46 +0000 Subject: [PATCH] Checkbox for the point C is added in Import Image dialog. --- src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx | 15 ++++++++++++++- src/HYDROGUI/HYDROGUI_ImportImageDlg.h | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx b/src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx index 288e0a60..7f318290 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx @@ -45,6 +45,7 @@ #include #include #include +#include HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, const QString& theTitle ) : HYDROGUI_InputPanel( theModule, theTitle ), @@ -187,7 +188,17 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co QtxIntSpinBox* aRefPointY = new QtxIntSpinBox( 0, 0, 1, myTransformGroup ); // max is updated later int aRow = 4 * aPointType + 3; - aTransformLayout->addWidget( aPointBtn, aRow, 0, 1, 9 ); + if ( aPointType == HYDROGUI_PrsImage::PointC ) + { + 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 + { + aTransformLayout->addWidget( aPointBtn, aRow, 0, 1, 9 ); + } aTransformLayout->addWidget( aPointXLabel, aRow + 1, 0 ); aTransformLayout->addWidget( aPointX, aRow + 1, 1 ); @@ -322,6 +333,8 @@ void HYDROGUI_ImportImageDlg::reset() myCartPointXMap[ aPointType ]->clear(); myCartPointYMap[ aPointType ]->clear(); } + myPointCEnabler->setChecked( false ); + myPointBtnMap[ HYDROGUI_PrsImage::PointC ]->setEnabled( false ); myTransformGroup->setEnabled( false ); myRefImage->clear(); diff --git a/src/HYDROGUI/HYDROGUI_ImportImageDlg.h b/src/HYDROGUI/HYDROGUI_ImportImageDlg.h index c49bdac0..88233890 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageDlg.h +++ b/src/HYDROGUI/HYDROGUI_ImportImageDlg.h @@ -32,6 +32,7 @@ class QComboBox; class QGroupBox; class QLabel; class QLineEdit; +class QCheckBox; class QtxDoubleSpinBox; class QtxIntSpinBox; @@ -152,6 +153,8 @@ private: QMap myRefPointXMap; QMap myRefPointYMap; + QCheckBox* myPointCEnabler; + PrsPointDataList myPrsPointDataList; bool myIsInitialized; -- 2.39.2