]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Fix of import image dialog: Lambert93 origin point is used for setting default points...
authorrkv <rkv@opencascade.com>
Thu, 7 Nov 2013 11:05:35 +0000 (11:05 +0000)
committerrkv <rkv@opencascade.com>
Thu, 7 Nov 2013 11:05:35 +0000 (11:05 +0000)
src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx
src/HYDROGUI/HYDROGUI_ImportImageDlg.h

index a65d5015ddf6f8a69f21417182bd48d7715e8488..6e44310a6b4e7deb2eb487f3e7acb81dad1e2359 100644 (file)
@@ -303,7 +303,7 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co
   connect( myRefImage, SIGNAL( activated( const QString& ) ),
            this, SLOT( onRefImageActivated( const QString& ) ) );
 
-  setTransformationMode( HYDROData_Image::ManualGeodesic );
+  //setTransformationMode( HYDROData_Image::ManualCartesian );
 
   setMinimumWidth( 350 );
 }
@@ -352,7 +352,7 @@ void HYDROGUI_ImportImageDlg::reset()
   myTransformGroup->setEnabled( false );
   myRefImage->clear();
 
-  setTransformationMode( HYDROData_Image::ManualGeodesic );
+  setTransformationMode( HYDROData_Image::ManualCartesian );
 
   myPrsPointDataList.clear();
 
@@ -545,50 +545,16 @@ void HYDROGUI_ImportImageDlg::initializePointSelection()
 
   myPointBtnMap[ HYDROGUI_PrsImage::PointA ]->setChecked( true );
 
-  // ouv: tmp
-  /*
-  blockSignalsGeodesic( true );
-
-  myPointXDegMap[ HYDROGUI_PrsImage::PointA ]->setValue( 50 );
-  myPointXMinMap[ HYDROGUI_PrsImage::PointA ]->setValue( 0 );
-  myPointXSecMap[ HYDROGUI_PrsImage::PointA ]->setValue( 0 );
-  myPointYDegMap[ HYDROGUI_PrsImage::PointA ]->setValue( 50 );
-  myPointYMinMap[ HYDROGUI_PrsImage::PointA ]->setValue( 0 );
-  myPointYSecMap[ HYDROGUI_PrsImage::PointA ]->setValue( 0 );
-
-  myPointXDegMap[ HYDROGUI_PrsImage::PointB ]->setValue( 50 );
-  myPointXMinMap[ HYDROGUI_PrsImage::PointB ]->setValue( 1 );
-  myPointXSecMap[ HYDROGUI_PrsImage::PointB ]->setValue( 0 );
-  myPointYDegMap[ HYDROGUI_PrsImage::PointB ]->setValue( 50 );
-  myPointYMinMap[ HYDROGUI_PrsImage::PointB ]->setValue( 0 );
-  myPointYSecMap[ HYDROGUI_PrsImage::PointB ]->setValue( 0 );
-
-  myPointXDegMap[ HYDROGUI_PrsImage::PointC ]->setValue( 50 );
-  myPointXMinMap[ HYDROGUI_PrsImage::PointC ]->setValue( 0 );
-  myPointXSecMap[ HYDROGUI_PrsImage::PointC ]->setValue( 0 );
-  myPointYDegMap[ HYDROGUI_PrsImage::PointC ]->setValue( 50 );
-  myPointYMinMap[ HYDROGUI_PrsImage::PointC ]->setValue( 1 );
-  myPointYSecMap[ HYDROGUI_PrsImage::PointC ]->setValue( 0 );
-
-  for( int aPointType = HYDROGUI_PrsImage::PointA;
-       aPointType <= HYDROGUI_PrsImage::PointC; aPointType++ )
-    onGeodesicCoordChanged( aPointType );
-
-  blockSignalsGeodesic( false );
-  */
-
-  //double aCartX0 = 600000;
-  //double aCartY0 = 6800000;
-  double aCartX0 = 0;
-  double aCartY0 = 0;
+  double aCartX0 = LAMBERT_X0;
+  double aCartY0 = LAMBERT_Y0;
 
   blockSignalsCartesian( true );
 
   myCartPointXMap[ HYDROGUI_PrsImage::PointA ]->setValue( aCartX0 );
-  myCartPointYMap[ HYDROGUI_PrsImage::PointA ]->setValue( aCartY0 + 500 );
+  myCartPointYMap[ HYDROGUI_PrsImage::PointA ]->setValue( aCartY0 + IMG_DELTA );
 
-  myCartPointXMap[ HYDROGUI_PrsImage::PointB ]->setValue( aCartX0 + 500 );
-  myCartPointYMap[ HYDROGUI_PrsImage::PointB ]->setValue( aCartY0 + 500 );
+  myCartPointXMap[ HYDROGUI_PrsImage::PointB ]->setValue( aCartX0 + IMG_DELTA );
+  myCartPointYMap[ HYDROGUI_PrsImage::PointB ]->setValue( aCartY0 + IMG_DELTA );
 
   myCartPointXMap[ HYDROGUI_PrsImage::PointC ]->setValue( aCartX0 );
   myCartPointYMap[ HYDROGUI_PrsImage::PointC ]->setValue( aCartY0 );
index ac77bbaa3033373f83c5ca1a480cc534b107137c..8018366b7ddef7af8c12b4dbb9c57ac957f8eeee 100644 (file)
 
 #include <QMap>
 
+#define LAMBERT_X0 700000
+#define LAMBERT_Y0 6600000
+#define LAMBERT_LONG 3
+#define LAMBERT_LATT 46.5
+#define IMG_DELTA 500
+
 class QButtonGroup;
 class QComboBox;
 class QGroupBox;
@@ -134,40 +140,40 @@ signals:
   void                       refImageActivated( const QString& );
 
 private:
-  QGroupBox*                 myFileNameGroup;
-  QLineEdit*                 myFileName;
+  QGroupBox*                   myFileNameGroup;    //!< The group for the source image file selection
+  QLineEdit*                   myFileName;         //!< Source image file name input field
 
-  QGroupBox*                 myImageNameGroup;
-  QLineEdit*                 myImageName;
+  QGroupBox*                   myImageNameGroup;   //!< The group for the image name input field
+  QLineEdit*                   myImageName;        //!< The image name input field
 
-  QGroupBox*                 myTransformGroup;
+  QGroupBox*                   myTransformGroup;   //!< The group of input contols for points definition
 
-  QButtonGroup*              myModeGroup;
-  QComboBox*                 myRefImage;
+  QButtonGroup*                myModeGroup;        //!< The group for the input mode selector
+  QComboBox*                   myRefImage;         //!< Reference image selector
 
-  QList<QLabel*>             myGeodesicLabels;
+  QList<QLabel*>               myGeodesicLabels;   //!< Labels for geodesic coords input fields
 
-  QMap<int, QPushButton*>    myPointBtnMap;
-  QMap<int, QtxIntSpinBox*>  myPointXMap;
-  QMap<int, QtxIntSpinBox*>  myPointYMap;
-  QMap<int, QtxIntSpinBox*>  myPointXDegMap;
-  QMap<int, QtxIntSpinBox*>  myPointYDegMap;
-  QMap<int, QtxIntSpinBox*>  myPointXMinMap;
-  QMap<int, QtxIntSpinBox*>  myPointYMinMap;
-  QMap<int, QtxDoubleSpinBox*> myPointXSecMap;
-  QMap<int, QtxDoubleSpinBox*> myPointYSecMap;
+  QMap<int, QPushButton*>      myPointBtnMap;      //!< A,B,C points selection modes activators
+  QMap<int, QtxIntSpinBox*>    myPointXMap;        //!< X coord on the image
+  QMap<int, QtxIntSpinBox*>    myPointYMap;        //!< Y coord on the image
+  QMap<int, QtxIntSpinBox*>    myPointXDegMap;     //!< Longitude degrees
+  QMap<int, QtxIntSpinBox*>    myPointYDegMap;     //!< Latitude degrees
+  QMap<int, QtxIntSpinBox*>    myPointXMinMap;     //!< Longitude minutes
+  QMap<int, QtxIntSpinBox*>    myPointYMinMap;     //!< Latitude minutes
+  QMap<int, QtxDoubleSpinBox*> myPointXSecMap;     //!< Longitude seconds
+  QMap<int, QtxDoubleSpinBox*> myPointYSecMap;     //!< Latitude seconds
 
-  QMap<int, QtxDoubleSpinBox*> myCartPointXMap;
-  QMap<int, QtxDoubleSpinBox*> myCartPointYMap;
+  QMap<int, QtxDoubleSpinBox*> myCartPointXMap;    //!< Lambert93 (cartesian) X coord (m)
+  QMap<int, QtxDoubleSpinBox*> myCartPointYMap;    //!< Lambert93 (cartesian) Y coord (m)
 
-  QMap<int, QtxIntSpinBox*>  myRefPointXMap;
-  QMap<int, QtxIntSpinBox*>  myRefPointYMap;
+  QMap<int, QtxIntSpinBox*>    myRefPointXMap;     //!< X coord on the reference image
+  QMap<int, QtxIntSpinBox*>    myRefPointYMap;     //!< Y coord on the reference image
 
-  QCheckBox*                 myPointCEnabler;
+  QCheckBox*                   myPointCEnabler;    //!< Checkbox for enabling definition of the point C
 
-  PrsPointDataList           myPrsPointDataList;
+  PrsPointDataList             myPrsPointDataList; //!< Points presentations
 
-  bool                       myIsInitialized;
+  bool                         myIsInitialized;    //!< True if a point selection is activated
 };
 
 #endif