Skip to content

Commit e14cea3

Browse files
committed
Fix incorrect 'not available in Python' dox
(cherry picked from commit 715395a)
1 parent 985abf1 commit e14cea3

File tree

2 files changed

+19
-24
lines changed

2 files changed

+19
-24
lines changed

python/core/auto_generated/raster/qgsrasterhistogram.sip.in

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ It is used to cache computed histograms in raster providers.
2424
typedef QVector<int> HistogramVector;
2525

2626
QgsRasterHistogram();
27+
%Docstring
28+
Constructor for an invalid QgsRasterHistogram.
29+
%End
2730

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

src/core/raster/qgsrasterhistogram.h

+16-24
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#define QGSRASTERHISTOGRAM
2020

2121
#include "qgis_core.h"
22+
#include "qgsrectangle.h"
2223
#include <QString>
2324
#include <QVector>
2425

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

37-
QgsRasterHistogram()
38-
{
39-
bandNumber = 0;
40-
binCount = 0;
41-
nonNullCount = 0;
42-
includeOutOfRange = false;
43-
maximum = 0;
44-
minimum = 0;
45-
width = 0;
46-
height = 0;
47-
valid = false;
48-
}
38+
/**
39+
* Constructor for an invalid QgsRasterHistogram.
40+
*/
41+
QgsRasterHistogram() = default;
4942

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

6356
//! \brief The gdal band number (starts at 1)
64-
int bandNumber;
57+
int bandNumber = 0;
6558

6659
//! \brief Number of bins (intervals,buckets) in histogram.
67-
int binCount;
60+
int binCount = 0;
6861

6962
//! \brief The number of non NULL cells used to calculate histogram.
70-
int nonNullCount;
63+
int nonNullCount = 0;
7164

7265
//! \brief Whether histogram includes out of range values (in first and last bin)
73-
bool includeOutOfRange;
66+
bool includeOutOfRange = false;
7467

7568
/**
76-
* \brief Store the histogram for a given layer
77-
* \note not available via Python binding
78-
*/
69+
* Stores the histogram for a given layer
70+
*/
7971
QgsRasterHistogram::HistogramVector histogramVector;
8072

8173
//! \brief The maximum histogram value.
82-
double maximum;
74+
double maximum = 0;
8375

8476
//! \brief The minimum histogram value.
85-
double minimum;
77+
double minimum = 0;
8678

8779
//! \brief Number of columns used to calc histogram
88-
int width;
80+
int width = 0;
8981

9082
//! \brief Number of rows used to calc histogram
91-
int height;
83+
int height = 0;
9284

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

9688
//! \brief Histogram is valid
97-
bool valid;
89+
bool valid = false;
9890
};
9991
#endif

0 commit comments

Comments
 (0)