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 );
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 );
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 ) ) );
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;
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() ) );
connect( myRefImage, SIGNAL( activated( const QString& ) ),
this, SLOT( onRefImageActivated( const QString& ) ) );
- setTransformationMode( HYDROData_Image::ManualLambert );
+ setTransformationMode( HYDROData_Image::ManualGeodesic );
setMinimumWidth( 350 );
}
myTransformGroup->setEnabled( false );
myRefImage->clear();
- setTransformationMode( HYDROData_Image::ManualLambert );
+ setTransformationMode( HYDROData_Image::ManualGeodesic );
myPrsPointDataList.clear();
const bool theIsOnlyInput,
const bool theIsRefImage )
{
- blockSignalsLambert( true );
+ blockSignalsGeodesic( true );
blockSignalsCartesian( true );
for( int aPointType = HYDROGUI_PrsImage::PointA;
aPointType <= HYDROGUI_PrsImage::PointC; aPointType++ )
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;
}
}
}
- blockSignalsLambert( false );
+ blockSignalsGeodesic( false );
blockSignalsCartesian( false );
}
// ouv: tmp
/*
- blockSignalsLambert( true );
+ blockSignalsGeodesic( true );
myPointXDegMap[ HYDROGUI_PrsImage::PointA ]->setValue( 50 );
myPointXMinMap[ HYDROGUI_PrsImage::PointA ]->setValue( 0 );
for( int aPointType = HYDROGUI_PrsImage::PointA;
aPointType <= HYDROGUI_PrsImage::PointC; aPointType++ )
- onLambertCoordChanged( aPointType );
+ onGeodesicCoordChanged( aPointType );
- blockSignalsLambert( false );
+ blockSignalsGeodesic( false );
*/
//double aCartX0 = 600000;
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;
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;
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 );
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 );
}
}
}
-void HYDROGUI_ImportImageDlg::onLambertCoordChanged()
+void HYDROGUI_ImportImageDlg::onGeodesicCoordChanged()
{
QObject* aSender = sender();
if( !aSender )
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++ )
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 );
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++ )