SUIT_ViewWindow* aViewWindow = aViewMgr ? aViewMgr->getActiveView() : 0;
double aX, aY, aZ;
if ( aDisplayer->GetCursorViewCoordinates( aViewWindow, aX, aY, aZ ) ) {
- QString aXStr = HYDROGUI_Tool::GetCoordinateString( aX );
- QString anYStr = HYDROGUI_Tool::GetCoordinateString( aY );
+ QString aXStr = HYDROGUI_Tool::GetCoordinateString( aX, false );
+ QString anYStr = HYDROGUI_Tool::GetCoordinateString( aY, false );
aResult = tr( "%1,%2" ).arg( aXStr ).arg( anYStr );
}
}
// Get georeferencement data for the current profile
QString aXg, anYg, aXd, anYd;
if ( !aGeoData.isEmpty ) {
- aXg = HYDROGUI_Tool::GetCoordinateString( aGeoData.Xg );
- anYg = HYDROGUI_Tool::GetCoordinateString( aGeoData.Yg );
- aXd = HYDROGUI_Tool::GetCoordinateString( aGeoData.Xd );
- anYd = HYDROGUI_Tool::GetCoordinateString( aGeoData.Yd );
+ aXg = HYDROGUI_Tool::GetCoordinateString( aGeoData.Xg, false );
+ anYg = HYDROGUI_Tool::GetCoordinateString( aGeoData.Yg, false );
+ aXd = HYDROGUI_Tool::GetCoordinateString( aGeoData.Xd, false );
+ anYd = HYDROGUI_Tool::GetCoordinateString( aGeoData.Yd, false );
}
// Insert row with the data
int aColumnX = aColumn < 3 ? 1 : 3;
int aColumnY = aColumnX + 1;
- QString aXStr = HYDROGUI_Tool::GetCoordinateString( aPnt.X() );
- QString anYStr = HYDROGUI_Tool::GetCoordinateString( aPnt.Y() );
+ QString aXStr = HYDROGUI_Tool::GetCoordinateString( aPnt.X(), false );
+ QString anYStr = HYDROGUI_Tool::GetCoordinateString( aPnt.Y(), false );
myTable->item( aRow, aColumnX )->setText( aXStr );
myTable->item( aRow, aColumnY )->setText( anYStr );
}
HYDROData_Document::Document( aStudyId )->Transform( aWPnt, false );
double WX = aWPnt.X(), WY = aWPnt.Y();
- QString aXStr = HYDROGUI_Tool::GetCoordinateString( X );
- QString anYStr = HYDROGUI_Tool::GetCoordinateString( Y );
- QString aWXStr = HYDROGUI_Tool::GetCoordinateString( WX );
- QString aWYStr = HYDROGUI_Tool::GetCoordinateString( WY );
+ QString aXStr = HYDROGUI_Tool::GetCoordinateString( X, true );
+ QString anYStr = HYDROGUI_Tool::GetCoordinateString( Y, true );
+ QString aWXStr = HYDROGUI_Tool::GetCoordinateString( WX, true );
+ QString aWYStr = HYDROGUI_Tool::GetCoordinateString( WY, true );
QString aMsg = tr( "COORDINATES_INFO" );
aMsg = aMsg.arg( aXStr ).arg( anYStr ).arg( aWXStr ).arg( aWYStr );
aDesktop->statusBar()->showMessage( aMsg );
theEvent->x(), theEvent->y(), anOCCViewWindow->getViewPort()->getView() );
// Show the coordinates
- QString aX = HYDROGUI_Tool::GetCoordinateString( aPnt.X() );
- QString anY = HYDROGUI_Tool::GetCoordinateString( aPnt.Y() );
+ QString aX = HYDROGUI_Tool::GetCoordinateString( aPnt.X(), true );
+ QString anY = HYDROGUI_Tool::GetCoordinateString( aPnt.Y(), true );
myCoordLabel->setText( tr("UZ_COORDINATES_INFO").arg( aX ).arg( anY ) );
}
}
return aNames;
}
-QString HYDROGUI_Tool::GetCoordinateString( const double theNumber )
+QString HYDROGUI_Tool::GetCoordinateString( const double theNumber, bool isInLocale )
{
- //return QString::number( theNumber, 'f', 2 );
- static QLocale aLocale( QLocale::English, QLocale::France );
- return aLocale.toString( theNumber, 'f', 2 );
+ if( isInLocale )
+ {
+ static QLocale aLocale( QLocale::English, QLocale::France );
+ return aLocale.toString( theNumber, 'f', 2 );
+ }
+ else
+ return QString::number( theNumber, 'f', 2 );
}
* \param theNumber coordinate as a number
* \return coordinate as a string
*/
- static QString GetCoordinateString( const double theNumber );
+ static QString GetCoordinateString( const double theNumber, bool isInLocale );
};
#endif