Skip to content
Permalink
Browse files

Untranslatable strings and formatting of the raster min/max label

  • Loading branch information
artfwo committed Aug 27, 2013
1 parent 2046342 commit c6e483890bb38c1548cdd6ff9c6e78972ef1a90d
Showing with 18 additions and 15 deletions.
  1. +18 −15 src/core/raster/qgsrasterrenderer.cpp
@@ -191,45 +191,48 @@ QString QgsRasterRenderer::minMaxOriginLabel( int theOrigin )
return tr( "User defined" );
}

QString name;
QString label;
QString est_exact;
QString values;
QString extent;

if ( theOrigin & MinMaxEstimated )
{
name += tr( "Estimated" );
est_exact = tr( "Estimated" );
}
else if ( theOrigin & MinMaxExact )
{
name += tr( "Exact" );
est_exact = tr( "Exact" );
}

name += " ";

if ( theOrigin & MinMaxMinMax )
{
name += tr( "min / max" );
values = tr( "min / max" );
}
else if ( theOrigin & MinMaxCumulativeCut )
{
name += "cumulative cut";
values = tr( "cumulative cut" );
}
else if ( theOrigin & MinMaxStdDev )
{
name += "standard deviation";
values = tr( "standard deviation" );
}

name += " " + tr( " of " ) + " ";

if ( theOrigin & MinMaxFullExtent )
{
name += "full extent";
extent = tr( "full extent" );
}
else if ( theOrigin & MinMaxSubExtent )
{
name += "sub extent";
extent = tr( "sub extent" );
}

name += ".";

return name;
label = QCoreApplication::translate ( "QgsRasterRenderer", "%1 %2 of %3.",
"min/max origin label in raster properties, where %1 - estimated/exact, %2 - values (min/max, stddev, etc.), %3 - extent" )
.arg(est_exact)
.arg(values)
.arg(extent);
return label;
}

int QgsRasterRenderer::minMaxOriginFromName( QString theName )

0 comments on commit c6e4838

Please sign in to comment.
You can’t perform that action at this time.