Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix incorrect 'not available in Python' dox
(cherry picked from commit 715395a)
  • Loading branch information
nyalldawson committed Feb 7, 2019
1 parent 985abf1 commit e14cea3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 24 deletions.
3 changes: 3 additions & 0 deletions python/core/auto_generated/raster/qgsrasterhistogram.sip.in
Expand Up @@ -24,6 +24,9 @@ It is used to cache computed histograms in raster providers.
typedef QVector<int> HistogramVector;

QgsRasterHistogram();
%Docstring
Constructor for an invalid QgsRasterHistogram.
%End

bool operator==( const QgsRasterHistogram &h ) const;

Expand Down
40 changes: 16 additions & 24 deletions src/core/raster/qgsrasterhistogram.h
Expand Up @@ -19,6 +19,7 @@
#define QGSRASTERHISTOGRAM

#include "qgis_core.h"
#include "qgsrectangle.h"
#include <QString>
#include <QVector>

Expand All @@ -34,18 +35,10 @@ class CORE_EXPORT QgsRasterHistogram
public:
typedef QVector<int> HistogramVector;

QgsRasterHistogram()
{
bandNumber = 0;
binCount = 0;
nonNullCount = 0;
includeOutOfRange = false;
maximum = 0;
minimum = 0;
width = 0;
height = 0;
valid = false;
}
/**
* Constructor for an invalid QgsRasterHistogram.
*/
QgsRasterHistogram() = default;

//! Compares region, size etc. not histogram itself
bool operator==( const QgsRasterHistogram &h ) const
Expand All @@ -61,39 +54,38 @@ class CORE_EXPORT QgsRasterHistogram
}

//! \brief The gdal band number (starts at 1)
int bandNumber;
int bandNumber = 0;

//! \brief Number of bins (intervals,buckets) in histogram.
int binCount;
int binCount = 0;

//! \brief The number of non NULL cells used to calculate histogram.
int nonNullCount;
int nonNullCount = 0;

//! \brief Whether histogram includes out of range values (in first and last bin)
bool includeOutOfRange;
bool includeOutOfRange = false;

/**
* \brief Store the histogram for a given layer
* \note not available via Python binding
*/
* Stores the histogram for a given layer
*/
QgsRasterHistogram::HistogramVector histogramVector;

//! \brief The maximum histogram value.
double maximum;
double maximum = 0;

//! \brief The minimum histogram value.
double minimum;
double minimum = 0;

//! \brief Number of columns used to calc histogram
int width;
int width = 0;

//! \brief Number of rows used to calc histogram
int height;
int height = 0;

//! \brief Extent used to calc histogram
QgsRectangle extent;

//! \brief Histogram is valid
bool valid;
bool valid = false;
};
#endif

0 comments on commit e14cea3

Please sign in to comment.