@@ -191,45 +191,48 @@ QString QgsRasterRenderer::minMaxOriginLabel( int theOrigin )
191
191
return tr ( " User defined" );
192
192
}
193
193
194
- QString name;
194
+ QString label;
195
+ QString est_exact;
196
+ QString values;
197
+ QString extent;
198
+
195
199
if ( theOrigin & MinMaxEstimated )
196
200
{
197
- name + = tr ( " Estimated" );
201
+ est_exact = tr ( " Estimated" );
198
202
}
199
203
else if ( theOrigin & MinMaxExact )
200
204
{
201
- name + = tr ( " Exact" );
205
+ est_exact = tr ( " Exact" );
202
206
}
203
207
204
- name += " " ;
205
-
206
208
if ( theOrigin & MinMaxMinMax )
207
209
{
208
- name + = tr ( " min / max" );
210
+ values = tr ( " min / max" );
209
211
}
210
212
else if ( theOrigin & MinMaxCumulativeCut )
211
213
{
212
- name += " cumulative cut" ;
214
+ values = tr ( " cumulative cut" ) ;
213
215
}
214
216
else if ( theOrigin & MinMaxStdDev )
215
217
{
216
- name += " standard deviation" ;
218
+ values = tr ( " standard deviation" ) ;
217
219
}
218
220
219
- name += " " + tr ( " of " ) + " " ;
220
-
221
221
if ( theOrigin & MinMaxFullExtent )
222
222
{
223
- name += " full extent" ;
223
+ extent = tr ( " full extent" ) ;
224
224
}
225
225
else if ( theOrigin & MinMaxSubExtent )
226
226
{
227
- name += " sub extent" ;
227
+ extent = tr ( " sub extent" ) ;
228
228
}
229
229
230
- name += " ." ;
231
-
232
- return name;
230
+ label = QCoreApplication::translate ( " QgsRasterRenderer" , " %1 %2 of %3." ,
231
+ " min/max origin label in raster properties, where %1 - estimated/exact, %2 - values (min/max, stddev, etc.), %3 - extent" )
232
+ .arg (est_exact)
233
+ .arg (values)
234
+ .arg (extent);
235
+ return label;
233
236
}
234
237
235
238
int QgsRasterRenderer::minMaxOriginFromName ( QString theName )
0 commit comments