QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsRenderedLayerStatistics Class Reference

Contains computed statistics for a layer render. More...

#include <qgsrenderedlayerstatistics.h>

Inheritance diagram for QgsRenderedLayerStatistics:
Inheritance graph
[legend]

Public Member Functions

 QgsRenderedLayerStatistics (const QString &layerId, const QList< double > &minimum, const QList< double > &maximum)
 Constructor for QgsRenderedLayerStatistics from a list of minimum and maximum.
 
 QgsRenderedLayerStatistics (const QString &layerId, double minimum=std::numeric_limits< double >::quiet_NaN(), double maximum=std::numeric_limits< double >::quiet_NaN())
 Constructor for QgsRenderedLayerStatistics with only one value for minimum and maximum.
 
QList< double > maximum () const
 Returns the maximum values of the computed statistics.
 
double maximum (int index) const
 Returns the maximum values of the computed statistics at index.
 
QList< double > minimum () const
 Returns the minimum values of the computed statistics.
 
double minimum (int index) const
 Returns the minimum value of the computed statistics at index.
 
bool setMaximum (int index, double maximum)
 Sets the maximum value of the computed statistics at index.
 
void setMaximum (QList< double > &maximum)
 Sets the maximum values of the computed statistics.
 
bool setMinimum (int index, double minimum)
 Sets the minimum value of the computed statistics at index.
 
void setMinimum (QList< double > &minimum)
 Sets the minimum values of the computed statistics.
 
- Public Member Functions inherited from QgsRenderedItemDetails
 QgsRenderedItemDetails (const QString &layerId)
 Constructor for QgsRenderedItemDetails.
 
virtual ~QgsRenderedItemDetails ()
 
QgsRectangle boundingBox () const
 Returns the bounding box of the item (in map units).
 
QString layerId () const
 Returns the layer ID of the associated map layer.
 
void setBoundingBox (const QgsRectangle &bounds)
 Sets the bounding box of the item (in map units).
 

Detailed Description

Contains computed statistics for a layer render.

Since
QGIS 3.42

Definition at line 32 of file qgsrenderedlayerstatistics.h.

Constructor & Destructor Documentation

◆ QgsRenderedLayerStatistics() [1/2]

QgsRenderedLayerStatistics::QgsRenderedLayerStatistics ( const QString &  layerId,
const QList< double > &  minimum,
const QList< double > &  maximum 
)

Constructor for QgsRenderedLayerStatistics from a list of minimum and maximum.

This is used to store the minimum and maximum values of a layer. Many values may be stored. For example, a raster layer may have multiple bands. In that case, minimum will contain the minimum value of each band and maximum will contain the maximum value of each band.

Definition at line 19 of file qgsrenderedlayerstatistics.cpp.

◆ QgsRenderedLayerStatistics() [2/2]

QgsRenderedLayerStatistics::QgsRenderedLayerStatistics ( const QString &  layerId,
double  minimum = std::numeric_limits<double>::quiet_NaN(),
double  maximum = std::numeric_limits<double>::quiet_NaN() 
)

Constructor for QgsRenderedLayerStatistics with only one value for minimum and maximum.

Definition at line 27 of file qgsrenderedlayerstatistics.cpp.

Member Function Documentation

◆ maximum() [1/2]

QList< double > QgsRenderedLayerStatistics::maximum ( ) const

Returns the maximum values of the computed statistics.

See also
setMaximum()

Definition at line 50 of file qgsrenderedlayerstatistics.cpp.

◆ maximum() [2/2]

double QgsRenderedLayerStatistics::maximum ( int  index) const

Returns the maximum values of the computed statistics at index.

See also
setMaximum()

Definition at line 55 of file qgsrenderedlayerstatistics.cpp.

◆ minimum() [1/2]

QList< double > QgsRenderedLayerStatistics::minimum ( ) const

Returns the minimum values of the computed statistics.

See also
setMinimum()

Definition at line 35 of file qgsrenderedlayerstatistics.cpp.

◆ minimum() [2/2]

double QgsRenderedLayerStatistics::minimum ( int  index) const

Returns the minimum value of the computed statistics at index.

See also
setMinimum()

Definition at line 40 of file qgsrenderedlayerstatistics.cpp.

◆ setMaximum() [1/2]

bool QgsRenderedLayerStatistics::setMaximum ( int  index,
double  maximum 
)

Sets the maximum value of the computed statistics at index.

Returns
true if value has been set.
See also
maximum()

Definition at line 87 of file qgsrenderedlayerstatistics.cpp.

◆ setMaximum() [2/2]

void QgsRenderedLayerStatistics::setMaximum ( QList< double > &  maximum)

Sets the maximum values of the computed statistics.

See also
maximum()

Definition at line 82 of file qgsrenderedlayerstatistics.cpp.

◆ setMinimum() [1/2]

bool QgsRenderedLayerStatistics::setMinimum ( int  index,
double  minimum 
)

Sets the minimum value of the computed statistics at index.

Returns
true if value has been set.
See also
minimum()

Definition at line 71 of file qgsrenderedlayerstatistics.cpp.

◆ setMinimum() [2/2]

void QgsRenderedLayerStatistics::setMinimum ( QList< double > &  minimum)

Sets the minimum values of the computed statistics.

See also
minimum()

Definition at line 66 of file qgsrenderedlayerstatistics.cpp.


The documentation for this class was generated from the following files: