23 const QMap<QString, QgsMapLayer *> &mapLayers = project->
mapLayers();
26 double min = std::numeric_limits<double>::quiet_NaN();
27 double max = std::numeric_limits<double>::quiet_NaN();
29 for ( QMap<QString, QgsMapLayer *>::const_iterator it = mapLayers.constBegin(); it != mapLayers.constEnd(); ++it )
31 currentLayer = it.value();
40 if ( layerRange.
lower() > std::numeric_limits< double >::lowest() )
42 if ( std::isnan( min ) || layerRange.
lower() < min )
43 min = layerRange.
lower();
46 if ( layerRange.
upper() < std::numeric_limits< double >::max() )
48 if ( std::isnan( max ) || layerRange.
upper() > max )
49 max = layerRange.
upper();
53 return QgsDoubleRange( std::isnan( min ) ? std::numeric_limits< double >::lowest() : min,
54 std::isnan( max ) ? std::numeric_limits< double >::max() : max );