]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Lambert changed to Geodesic.
authoradv <adv@opencascade.com>
Thu, 7 Nov 2013 05:39:32 +0000 (05:39 +0000)
committeradv <adv@opencascade.com>
Thu, 7 Nov 2013 05:39:32 +0000 (05:39 +0000)
src/HYDROData/HYDROData_Image.cxx
src/HYDROData/HYDROData_Image.h
src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx
src/HYDROGUI/HYDROGUI_ImportImageDlg.h
src/HYDROGUI/HYDROGUI_ImportImageOp.cxx

index 3556d543d3a04f24ae84648eb63d03f7012a7458..6499672946d5570808552aac5c05e98c4cb62d01 100644 (file)
@@ -335,7 +335,7 @@ void HYDROData_Image::UpdateTrsf()
   bool anIsByTwoPoints = IsByTwoPoints();
 
   // Convert lambert coordinates to cartesian
-  if ( aTrsfMode == ManualLambert )
+  if ( aTrsfMode == ManualGeodesic )
   {
     double aXCart = 0, aYCart = 0;
 
@@ -639,7 +639,7 @@ void HYDROData_Image::SetTrsfMode( const TransformationMode& theMode )
 
 HYDROData_Image::TransformationMode HYDROData_Image::GetTrsfMode() const
 {
-  TransformationMode aResMode = ManualLambert;
+  TransformationMode aResMode = ManualGeodesic;
 
   TDF_Label aLabel = myLab.FindChild( DataTag_TrsfPoints, false );
   if ( !aLabel.IsNull() )
index 7cf8a05f16bad1e35cb87dbb0ca330f2d1397c2b..90dec9c3210a6cba816ac85c1825ddb53e46b65c 100644 (file)
@@ -22,7 +22,7 @@ public:
 
   enum TransformationMode
   {
-    ManualLambert = 0,
+    ManualGeodesic = 0,
     ManualCartesian,
     ReferenceImage
   };
index 26f9b5ad693a1ca3621a1639613f3672d4c49037..a65d5015ddf6f8a69f21417182bd48d7715e8488 100644 (file)
@@ -98,12 +98,12 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co
   aPainter.drawPixmap( 0, 0, anArrowPixmap );
   aPainter.end();
 
-  QRadioButton* aManualLambertBtn = new QRadioButton( tr( "MANUALLY_GEODESIC" ), myTransformGroup );
+  QRadioButton* aManualGeodesicBtn = new QRadioButton( tr( "MANUALLY_GEODESIC" ), myTransformGroup );
   QRadioButton* aManualCartesianBtn = new QRadioButton( tr( "MANUALLY_LAMBERT93" ), myTransformGroup );
   QRadioButton* aRefImageBtn = new QRadioButton( tr( "BY_REFERENCE_IMAGE" ), myTransformGroup );
 
   myModeGroup = new QButtonGroup( myTransformGroup );
-  myModeGroup->addButton( aManualLambertBtn, HYDROData_Image::ManualLambert );
+  myModeGroup->addButton( aManualGeodesicBtn, HYDROData_Image::ManualGeodesic );
   myModeGroup->addButton( aManualCartesianBtn, HYDROData_Image::ManualCartesian );
   myModeGroup->addButton( aRefImageBtn, HYDROData_Image::ReferenceImage );
 
@@ -116,7 +116,7 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co
   QGridLayout* aModeLayout = new QGridLayout( myTransformGroup );
   aModeLayout->setMargin( 0 );
   aModeLayout->setSpacing( 5 );
-  aModeLayout->addWidget( aManualLambertBtn,   0, 0 );
+  aModeLayout->addWidget( aManualGeodesicBtn,   0, 0 );
   aModeLayout->addWidget( aManualCartesianBtn, 1, 0 );
   aModeLayout->addWidget( aRefImageBtn,        2, 0 );
   aModeLayout->addWidget( myRefImage,          2, 1 );
@@ -137,9 +137,9 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co
   connect( aManualCartesianBtn, SIGNAL( toggled( bool ) ), aGeodesicLabel, SLOT( setVisible ( bool ) ) );
   connect( aManualCartesianBtn, SIGNAL( toggled( bool ) ), aLambertLabel, SLOT( setHidden ( bool ) ) );
   connect( aManualCartesianBtn, SIGNAL( toggled( bool ) ), aRefImageLabel, SLOT( setHidden ( bool ) ) );
-  connect( aManualLambertBtn, SIGNAL( toggled( bool ) ), aLambertLabel, SLOT( setVisible ( bool ) ) );
-  connect( aManualLambertBtn, SIGNAL( toggled( bool ) ), aGeodesicLabel, SLOT( setHidden ( bool ) ) );
-  connect( aManualLambertBtn, SIGNAL( toggled( bool ) ), aRefImageLabel, SLOT( setHidden ( bool ) ) );
+  connect( aManualGeodesicBtn, SIGNAL( toggled( bool ) ), aLambertLabel, SLOT( setVisible ( bool ) ) );
+  connect( aManualGeodesicBtn, SIGNAL( toggled( bool ) ), aGeodesicLabel, SLOT( setHidden ( bool ) ) );
+  connect( aManualGeodesicBtn, SIGNAL( toggled( bool ) ), aRefImageLabel, SLOT( setHidden ( bool ) ) );
   connect( aRefImageBtn, SIGNAL( toggled( bool ) ), aRefImageLabel, SLOT( setVisible ( bool ) ) );
   connect( aRefImageBtn, SIGNAL( toggled( bool ) ), aGeodesicLabel, SLOT( setHidden ( bool ) ) );
   connect( aRefImageBtn, SIGNAL( toggled( bool ) ), aLambertLabel, SLOT( setHidden ( bool ) ) );
@@ -172,7 +172,7 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co
     QLabel* aPointYMinLabel = new QLabel( "'", myTransformGroup );
     QLabel* aPointXSecLabel = new QLabel( "\"", myTransformGroup );
     QLabel* aPointYSecLabel = new QLabel( "\"", myTransformGroup );
-    myLambertLabels << aPointXDegLabel << aPointYDegLabel
+    myGeodesicLabels << aPointXDegLabel << aPointYDegLabel
                     << aPointXMinLabel << aPointYMinLabel
                     << aPointXSecLabel << aPointYSecLabel;
 
@@ -255,12 +255,12 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co
     connect( aPointX, SIGNAL( valueChanged( int ) ), this, SLOT( onPointCoordChanged( int ) ) );
     connect( aPointY, SIGNAL( valueChanged( int ) ), this, SLOT( onPointCoordChanged( int ) ) );
 
-    connect( aPointXDeg, SIGNAL( valueChanged( int ) ), this, SLOT( onLambertCoordChanged() ) );
-    connect( aPointYDeg, SIGNAL( valueChanged( int ) ), this, SLOT( onLambertCoordChanged() ) );
-    connect( aPointXMin, SIGNAL( valueChanged( int ) ), this, SLOT( onLambertCoordChanged() ) );
-    connect( aPointYMin, SIGNAL( valueChanged( int ) ), this, SLOT( onLambertCoordChanged() ) );
-    connect( aPointXSec, SIGNAL( valueChanged( double ) ), this, SLOT( onLambertCoordChanged() ) );
-    connect( aPointYSec, SIGNAL( valueChanged( double ) ), this, SLOT( onLambertCoordChanged() ) );
+    connect( aPointXDeg, SIGNAL( valueChanged( int ) ), this, SLOT( onGeodesicCoordChanged() ) );
+    connect( aPointYDeg, SIGNAL( valueChanged( int ) ), this, SLOT( onGeodesicCoordChanged() ) );
+    connect( aPointXMin, SIGNAL( valueChanged( int ) ), this, SLOT( onGeodesicCoordChanged() ) );
+    connect( aPointYMin, SIGNAL( valueChanged( int ) ), this, SLOT( onGeodesicCoordChanged() ) );
+    connect( aPointXSec, SIGNAL( valueChanged( double ) ), this, SLOT( onGeodesicCoordChanged() ) );
+    connect( aPointYSec, SIGNAL( valueChanged( double ) ), this, SLOT( onGeodesicCoordChanged() ) );
 
     connect( aCartPointX, SIGNAL( valueChanged( double ) ), this, SLOT( onCartesianCoordChanged() ) );
     connect( aCartPointY, SIGNAL( valueChanged( double ) ), this, SLOT( onCartesianCoordChanged() ) );
@@ -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::ManualLambert );
+  setTransformationMode( HYDROData_Image::ManualGeodesic );
 
   setMinimumWidth( 350 );
 }
@@ -352,7 +352,7 @@ void HYDROGUI_ImportImageDlg::reset()
   myTransformGroup->setEnabled( false );
   myRefImage->clear();
 
-  setTransformationMode( HYDROData_Image::ManualLambert );
+  setTransformationMode( HYDROData_Image::ManualGeodesic );
 
   myPrsPointDataList.clear();
 
@@ -430,7 +430,7 @@ void HYDROGUI_ImportImageDlg::setTransformationDataMap( const TransformationData
                                                         const bool theIsOnlyInput,
                                                         const bool theIsRefImage )
 {
-  blockSignalsLambert( true );
+  blockSignalsGeodesic( true );
   blockSignalsCartesian( true );
   for( int aPointType = HYDROGUI_PrsImage::PointA;
        aPointType <= HYDROGUI_PrsImage::PointC; aPointType++ )
@@ -446,7 +446,7 @@ void HYDROGUI_ImportImageDlg::setTransformationDataMap( const TransformationData
 
       if( !theIsOnlyInput && !theIsRefImage )
       {
-        QPointF aLPoint = aData.LambertPoint;
+        QPointF aLPoint = aData.GeodesicPoint;
         int aXDeg = 0, aYDeg = 0;
         int aXMin = 0, aYMin = 0;
         double aXSec = 0, aYSec = 0;
@@ -466,7 +466,7 @@ void HYDROGUI_ImportImageDlg::setTransformationDataMap( const TransformationData
       }
     }
   }
-  blockSignalsLambert( false );
+  blockSignalsGeodesic( false );
   blockSignalsCartesian( false );
 }
 
@@ -547,7 +547,7 @@ void HYDROGUI_ImportImageDlg::initializePointSelection()
 
   // ouv: tmp
   /*
-  blockSignalsLambert( true );
+  blockSignalsGeodesic( true );
 
   myPointXDegMap[ HYDROGUI_PrsImage::PointA ]->setValue( 50 );
   myPointXMinMap[ HYDROGUI_PrsImage::PointA ]->setValue( 0 );
@@ -572,9 +572,9 @@ void HYDROGUI_ImportImageDlg::initializePointSelection()
 
   for( int aPointType = HYDROGUI_PrsImage::PointA;
        aPointType <= HYDROGUI_PrsImage::PointC; aPointType++ )
-    onLambertCoordChanged( aPointType );
+    onGeodesicCoordChanged( aPointType );
 
-  blockSignalsLambert( false );
+  blockSignalsGeodesic( false );
   */
 
   //double aCartX0 = 600000;
@@ -610,23 +610,23 @@ HYDROGUI_ImportImageDlg::TransformationData HYDROGUI_ImportImageDlg::ComputeTrsf
 
   double arx = theGlobalPoint.x();
   double ary = theGlobalPoint.y();
-  if ( theMode == HYDROData_Image::ManualLambert )
+  if ( theMode == HYDROData_Image::ManualGeodesic )
   {
-    // Lambert to Cartesian
+    // Geodesic to Cartesian
     double aXCart = 0, aYCart = 0;
     HYDROData_Lambert93::toXY( arx, ary, aXCart, aYCart );
 
-    aResTrsfData.LambertPoint = theGlobalPoint;
+    aResTrsfData.GeodesicPoint = theGlobalPoint;
     aResTrsfData.CartesianPoint = QPointF( aXCart, aYCart );
   }
   else if ( theMode == HYDROData_Image::ManualCartesian )
   {
-    // Cartesian to Lambert
+    // Cartesian to Geodesic
     double aLonDeg = 0, aLatDeg = 0;
     HYDROData_Lambert93::toGeo( arx, ary, aLatDeg, aLonDeg );
 
     aResTrsfData.CartesianPoint = theGlobalPoint;
-    aResTrsfData.LambertPoint = QPointF( aLonDeg, aLatDeg );
+    aResTrsfData.GeodesicPoint = QPointF( aLonDeg, aLatDeg );
   }
 
   return aResTrsfData;
@@ -651,7 +651,7 @@ void HYDROGUI_ImportImageDlg::onBrowse()
 
 void HYDROGUI_ImportImageDlg::onModeActivated( int theMode )
 {
-  bool anIsManualLambert = theMode == HYDROData_Image::ManualLambert;
+  bool anIsManualGeodesic = theMode == HYDROData_Image::ManualGeodesic;
   bool anIsManualCartesian = theMode == HYDROData_Image::ManualCartesian;
   bool anIsRefImage = theMode == HYDROData_Image::ReferenceImage;
 
@@ -660,12 +660,12 @@ void HYDROGUI_ImportImageDlg::onModeActivated( int theMode )
   for( int aPointType = HYDROGUI_PrsImage::PointA;
        aPointType <= HYDROGUI_PrsImage::PointC; aPointType++ )
   {
-    myPointXDegMap[ aPointType ]->setVisible( anIsManualLambert );
-    myPointYDegMap[ aPointType ]->setVisible( anIsManualLambert );
-    myPointXMinMap[ aPointType ]->setVisible( anIsManualLambert );
-    myPointYMinMap[ aPointType ]->setVisible( anIsManualLambert );
-    myPointXSecMap[ aPointType ]->setVisible( anIsManualLambert );
-    myPointYSecMap[ aPointType ]->setVisible( anIsManualLambert );
+    myPointXDegMap[ aPointType ]->setVisible( anIsManualGeodesic );
+    myPointYDegMap[ aPointType ]->setVisible( anIsManualGeodesic );
+    myPointXMinMap[ aPointType ]->setVisible( anIsManualGeodesic );
+    myPointYMinMap[ aPointType ]->setVisible( anIsManualGeodesic );
+    myPointXSecMap[ aPointType ]->setVisible( anIsManualGeodesic );
+    myPointYSecMap[ aPointType ]->setVisible( anIsManualGeodesic );
 
     myCartPointXMap[ aPointType ]->setVisible( anIsManualCartesian );
     myCartPointYMap[ aPointType ]->setVisible( anIsManualCartesian );
@@ -674,9 +674,9 @@ void HYDROGUI_ImportImageDlg::onModeActivated( int theMode )
     myRefPointYMap[ aPointType ]->setVisible( anIsRefImage );
   }
 
-  QListIterator<QLabel*> anIter( myLambertLabels );
+  QListIterator<QLabel*> anIter( myGeodesicLabels );
   while( anIter.hasNext() )
-    anIter.next()->setVisible( anIsManualLambert );
+    anIter.next()->setVisible( anIsManualGeodesic );
 
   emit modeActivated( theMode );
 }
@@ -733,7 +733,7 @@ void HYDROGUI_ImportImageDlg::onPointCoordChanged( int theValue )
   }
 }
 
-void HYDROGUI_ImportImageDlg::onLambertCoordChanged()
+void HYDROGUI_ImportImageDlg::onGeodesicCoordChanged()
 {
   QObject* aSender = sender();
   if( !aSender )
@@ -749,13 +749,13 @@ void HYDROGUI_ImportImageDlg::onLambertCoordChanged()
         aSender == myPointXSecMap[ aPointType ] ||
         aSender == myPointYSecMap[ aPointType ] )
     {
-      onLambertCoordChanged( aPointType );
+      onGeodesicCoordChanged( aPointType );
       return;
     }
   }
 }
 
-void HYDROGUI_ImportImageDlg::onLambertCoordChanged( const int thePointType )
+void HYDROGUI_ImportImageDlg::onGeodesicCoordChanged( const int thePointType )
 {
   bool anIsOk[6];
   for( int i = 0; i < 6; i++ )
@@ -827,7 +827,7 @@ void HYDROGUI_ImportImageDlg::onCartesianCoordChanged( const int thePointType )
   HYDROData_Lambert93::degToDMS( aLonDeg, aXDeg, aXMin, aXSec );
   HYDROData_Lambert93::degToDMS( aLatDeg, aYDeg, aYMin, aYSec );
 
-  blockSignalsLambert( true );
+  blockSignalsGeodesic( true );
 
   myPointXDegMap[ thePointType ]->setValue( aXDeg );
   myPointYDegMap[ thePointType ]->setValue( aYDeg );
@@ -836,10 +836,10 @@ void HYDROGUI_ImportImageDlg::onCartesianCoordChanged( const int thePointType )
   myPointXSecMap[ thePointType ]->setValue( aXSec );
   myPointYSecMap[ thePointType ]->setValue( aYSec );
 
-  blockSignalsLambert( false );
+  blockSignalsGeodesic( false );
 }
 
-void HYDROGUI_ImportImageDlg::blockSignalsLambert( const bool theState )
+void HYDROGUI_ImportImageDlg::blockSignalsGeodesic( const bool theState )
 {
   for( int aPointType = HYDROGUI_PrsImage::PointA;
        aPointType <= HYDROGUI_PrsImage::PointC; aPointType++ )
index 3473fdfb89352a94fb21dcf89266895067b08430..ac77bbaa3033373f83c5ca1a480cc534b107137c 100644 (file)
@@ -45,7 +45,7 @@ public:
   struct TransformationData
   {
     QPoint  ImagePoint;
-    QPointF LambertPoint;
+    QPointF GeodesicPoint;
     QPointF CartesianPoint;
 
     TransformationData() {}
@@ -53,11 +53,11 @@ public:
     TransformationData( const QPoint& theImagePoint ) :
       ImagePoint( theImagePoint ) {}
 
-    TransformationData( const QPoint& theImagePoint,
-                        const QPointF& theLambertPoint,
+    TransformationData( const QPoint&  theImagePoint,
+                        const QPointF& theGeodesicPoint,
                         const QPointF& theCartesianPoint ) :
       ImagePoint( theImagePoint ),
-      LambertPoint( theLambertPoint ),
+      GeodesicPoint( theGeodesicPoint ),
       CartesianPoint( theCartesianPoint ) {}
   };
   typedef QMap< int, TransformationData > TransformationDataMap;
@@ -113,14 +113,14 @@ protected slots:
   void                       onPointBtnToggled( bool );
   void                       onPointCoordChanged( int );
 
-  void                       onLambertCoordChanged();
-  void                       onLambertCoordChanged( const int thePointType );
+  void                       onGeodesicCoordChanged();
+  void                       onGeodesicCoordChanged( const int thePointType );
 
   void                       onCartesianCoordChanged();
   void                       onCartesianCoordChanged( const int thePointType );
 
 private:
-  void                       blockSignalsLambert( const bool theState );
+  void                       blockSignalsGeodesic( const bool theState );
   void                       blockSignalsCartesian( const bool theState );
 
 signals:
@@ -145,7 +145,7 @@ private:
   QButtonGroup*              myModeGroup;
   QComboBox*                 myRefImage;
 
-  QList<QLabel*>             myLambertLabels;
+  QList<QLabel*>             myGeodesicLabels;
 
   QMap<int, QPushButton*>    myPointBtnMap;
   QMap<int, QtxIntSpinBox*>  myPointXMap;
index d53d3a8bb997ebc3d37fb2c39bb4971e4c8225b7..ffd893a79f48684993c27fa98144fc7deaf3b419 100644 (file)
@@ -30,8 +30,6 @@
 #include "HYDROGUI_UpdateFlags.h"
 
 #include <HYDROData_Iterator.h>
-#include <HYDROData_Lambert93.h>
-#include <HYDROData_OperationsFactory.h>
 #include <HYDROData_Tool.h>
 
 #include <GraphicsView_ViewManager.h>
@@ -349,12 +347,12 @@ bool HYDROGUI_ImportImageOp::processApply( int& theUpdateFlags,
   }
   else
   {
-    if ( aTransformationMode == HYDROData_Image::ManualLambert )
+    if ( aTransformationMode == HYDROData_Image::ManualGeodesic )
     {
-      aTrsfPointA = aMap[ HYDROGUI_PrsImage::PointA ].LambertPoint;
-      aTrsfPointB = aMap[ HYDROGUI_PrsImage::PointB ].LambertPoint;
+      aTrsfPointA = aMap[ HYDROGUI_PrsImage::PointA ].GeodesicPoint;
+      aTrsfPointB = aMap[ HYDROGUI_PrsImage::PointB ].GeodesicPoint;
       if ( !anIsByTwoPoints )
-        aTrsfPointC = aMap[ HYDROGUI_PrsImage::PointC ].LambertPoint;
+        aTrsfPointC = aMap[ HYDROGUI_PrsImage::PointC ].GeodesicPoint;
     }
     else
     {