@@ -209,7 +209,7 @@ QgsRasterLayer::QgsRasterLayer( int dummy,
209
209
);
210
210
QgsDebugMsg( "(8 arguments) exiting." );
211
211
212
- emit statusChanged( "QgsRasterLayer created" );
212
+ emit statusChanged( tr( "QgsRasterLayer created" ) );
213
213
} // QgsRasterLayer ctor
214
214
215
215
QgsRasterLayer::~QgsRasterLayer()
@@ -222,7 +222,7 @@ QgsRasterLayer::~QgsRasterLayer()
222
222
GDALDereferenceDataset( mGdalBaseDataset );
223
223
}
224
224
225
- if( mGdalDataset )
225
+ if ( mGdalDataset )
226
226
{
227
227
GDALClose( mGdalDataset );
228
228
}
@@ -723,7 +723,7 @@ const QgsRasterBandStats QgsRasterLayer::bandStatistics( int theBandNo )
723
723
return myRasterBandStats;
724
724
}
725
725
// only print message if we are actually gathering the stats
726
- emit statusChanged( QString ( "Retrieving stats for " ) + name() );
726
+ emit statusChanged( tr ( "Retrieving stats for %1 " ).arg( name() ) );
727
727
qApp->processEvents();
728
728
QgsDebugMsg( "stats for band " + QString::number( theBandNo ) );
729
729
GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, theBandNo );
@@ -737,7 +737,7 @@ const QgsRasterBandStats QgsRasterLayer::bandStatistics( int theBandNo )
737
737
738
738
myRasterBandStats.elementCount = 0; // because we'll be counting only VALID pixels later
739
739
740
- emit statusChanged( QString ( "Calculating stats for " ) + name() );
740
+ emit statusChanged( tr ( "Calculating stats for %1 " ).arg( name() ) );
741
741
//reset the main app progress bar
742
742
emit drawingProgress( 0, 0 );
743
743
@@ -1492,7 +1492,7 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
1492
1492
{
1493
1493
QgsDebugMsg( "Wanting a '" + mProviderKey + "' provider to draw this." );
1494
1494
1495
- emit statusChanged( QString ( "Retrieving using " ) + mProviderKey );
1495
+ emit statusChanged( tr ( "Retrieving using %1 " ).arg( mProviderKey ) );
1496
1496
1497
1497
QImage* image =
1498
1498
mDataProvider->draw(
@@ -1538,13 +1538,13 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
1538
1538
int myWidth = image->width();
1539
1539
int myHeight = image->height();
1540
1540
QRgb myRgb;
1541
- for( int myHeightRunner = 0; myHeightRunner < myHeight; myHeightRunner++ )
1541
+ for ( int myHeightRunner = 0; myHeightRunner < myHeight; myHeightRunner++ )
1542
1542
{
1543
- for( int myWidthRunner = 0; myWidthRunner < myWidth; myWidthRunner++ )
1544
- {
1545
- myRgb = image->pixel( myWidthRunner, myHeightRunner );
1546
- image->setPixel( myWidthRunner, myHeightRunner, qRgba( qRed( myRgb ), qGreen( myRgb ), qBlue( myRgb ), mTransparencyLevel ) );
1547
- }
1543
+ for ( int myWidthRunner = 0; myWidthRunner < myWidth; myWidthRunner++ )
1544
+ {
1545
+ myRgb = image->pixel( myWidthRunner, myHeightRunner );
1546
+ image->setPixel( myWidthRunner, myHeightRunner, qRgba( qRed( myRgb ), qGreen( myRgb ), qBlue( myRgb ), mTransparencyLevel ) );
1547
+ }
1548
1548
}
1549
1549
1550
1550
// Since GDAL's RasterIO can't handle floating point, we have to round to
@@ -3405,7 +3405,7 @@ void QgsRasterLayer::setNoDataValue( double theNoDataValue )
3405
3405
void QgsRasterLayer::setRasterShaderFunction( QgsRasterShaderFunction* theFunction )
3406
3406
{
3407
3407
//Free old shader if it is not a userdefined shader
3408
- if( mColorShadingAlgorithm != QgsRasterLayer::UserDefinedShader && 0 != mRasterShader->rasterShaderFunction() )
3408
+ if ( mColorShadingAlgorithm != QgsRasterLayer::UserDefinedShader && 0 != mRasterShader->rasterShaderFunction() )
3409
3409
{
3410
3410
delete( mRasterShader->rasterShaderFunction() );
3411
3411
}
0 commit comments