[QGIS Commit] r10240 - in trunk/qgis/src: app core/raster
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Feb 25 15:59:22 EST 2009
Author: jef
Date: 2009-02-25 15:59:22 -0500 (Wed, 25 Feb 2009)
New Revision: 10240
Modified:
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/core/raster/qgsrasterlayer.cpp
Log:
update translation strings
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2009-02-25 20:58:19 UTC (rev 10239)
+++ trunk/qgis/src/app/qgisapp.cpp 2009-02-25 20:59:22 UTC (rev 10240)
@@ -3751,7 +3751,7 @@
//display a warning
int numberOfDeletedFeatures = vlayer->selectedFeaturesIds().size();
- if(QMessageBox::warning(this, tr("Delete features"), tr("Delete %1 feature(s)?").arg(numberOfDeletedFeatures), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel)
+ if ( QMessageBox::warning( this, tr( "Delete features" ), tr( "Delete %n feature(s)?", "number of features to delete", numberOfDeletedFeatures ), QMessageBox::Ok, QMessageBox::Cancel ) == QMessageBox::Cancel )
{
return;
}
Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2009-02-25 20:58:19 UTC (rev 10239)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2009-02-25 20:59:22 UTC (rev 10240)
@@ -209,7 +209,7 @@
);
QgsDebugMsg( "(8 arguments) exiting." );
- emit statusChanged( "QgsRasterLayer created" );
+ emit statusChanged( tr( "QgsRasterLayer created" ) );
} // QgsRasterLayer ctor
QgsRasterLayer::~QgsRasterLayer()
@@ -222,7 +222,7 @@
GDALDereferenceDataset( mGdalBaseDataset );
}
- if( mGdalDataset )
+ if ( mGdalDataset )
{
GDALClose( mGdalDataset );
}
@@ -723,7 +723,7 @@
return myRasterBandStats;
}
// only print message if we are actually gathering the stats
- emit statusChanged( QString( "Retrieving stats for " ) + name() );
+ emit statusChanged( tr( "Retrieving stats for %1" ).arg( name() ) );
qApp->processEvents();
QgsDebugMsg( "stats for band " + QString::number( theBandNo ) );
GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, theBandNo );
@@ -737,7 +737,7 @@
myRasterBandStats.elementCount = 0; // because we'll be counting only VALID pixels later
- emit statusChanged( QString( "Calculating stats for " ) + name() );
+ emit statusChanged( tr( "Calculating stats for %1" ).arg( name() ) );
//reset the main app progress bar
emit drawingProgress( 0, 0 );
@@ -1492,7 +1492,7 @@
{
QgsDebugMsg( "Wanting a '" + mProviderKey + "' provider to draw this." );
- emit statusChanged( QString( "Retrieving using " ) + mProviderKey );
+ emit statusChanged( tr( "Retrieving using %1" ).arg( mProviderKey ) );
QImage* image =
mDataProvider->draw(
@@ -1538,13 +1538,13 @@
int myWidth = image->width();
int myHeight = image->height();
QRgb myRgb;
- for( int myHeightRunner = 0; myHeightRunner < myHeight; myHeightRunner++ )
+ for ( int myHeightRunner = 0; myHeightRunner < myHeight; myHeightRunner++ )
{
- for( int myWidthRunner = 0; myWidthRunner < myWidth; myWidthRunner++ )
- {
- myRgb = image->pixel( myWidthRunner, myHeightRunner );
- image->setPixel( myWidthRunner, myHeightRunner, qRgba( qRed( myRgb ), qGreen( myRgb ), qBlue( myRgb ), mTransparencyLevel ) );
- }
+ for ( int myWidthRunner = 0; myWidthRunner < myWidth; myWidthRunner++ )
+ {
+ myRgb = image->pixel( myWidthRunner, myHeightRunner );
+ image->setPixel( myWidthRunner, myHeightRunner, qRgba( qRed( myRgb ), qGreen( myRgb ), qBlue( myRgb ), mTransparencyLevel ) );
+ }
}
// Since GDAL's RasterIO can't handle floating point, we have to round to
@@ -3405,7 +3405,7 @@
void QgsRasterLayer::setRasterShaderFunction( QgsRasterShaderFunction* theFunction )
{
//Free old shader if it is not a userdefined shader
- if( mColorShadingAlgorithm != QgsRasterLayer::UserDefinedShader && 0 != mRasterShader->rasterShaderFunction() )
+ if ( mColorShadingAlgorithm != QgsRasterLayer::UserDefinedShader && 0 != mRasterShader->rasterShaderFunction() )
{
delete( mRasterShader->rasterShaderFunction() );
}
More information about the QGIS-commit
mailing list