]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Checkbox for the point C is added in Import Image dialog.
authorrkv <rkv@opencascade.com>
Tue, 22 Oct 2013 14:37:46 +0000 (14:37 +0000)
committerrkv <rkv@opencascade.com>
Tue, 22 Oct 2013 14:37:46 +0000 (14:37 +0000)
src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx
src/HYDROGUI/HYDROGUI_ImportImageDlg.h

index 288e0a6051815f1ee7088c07566e4689646d798c..7f31829099124177fbf8afd59d68c53bbf1559d3 100644 (file)
@@ -45,6 +45,7 @@
 #include <QPushButton>
 #include <QRadioButton>
 #include <QToolButton>
+#include <QCheckBox>
 
 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();
 
index c49bdac01d0a594684f2192a14e9073cb0e4438c..8823389061318ba782c955bbc0b022c5d158648c 100644 (file)
@@ -32,6 +32,7 @@ class QComboBox;
 class QGroupBox;
 class QLabel;
 class QLineEdit;
+class QCheckBox;
 
 class QtxDoubleSpinBox;
 class QtxIntSpinBox;
@@ -152,6 +153,8 @@ private:
   QMap<int, QtxIntSpinBox*>  myRefPointXMap;
   QMap<int, QtxIntSpinBox*>  myRefPointYMap;
 
+  QCheckBox*                 myPointCEnabler;
+
   PrsPointDataList           myPrsPointDataList;
 
   bool                       myIsInitialized;