mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-06 00:05:02 -05:00
The improvement allows immediate cancellation of raster rendering in progress. Until now, even when map rendering got cancelled (e.g. by zooming of panning canvas), the GUI got blocked while waiting for raster layers to finish their rendering (only vector layers have had support for cancellation). This should allow for much smoother user experience while browsing maps including rasters. The cancellation is supported currently by WMS/WMTS and WCS providers. GDAL provider may also get support thanks to improvements in GDAL 2. Funded by Land Information New Zealand.
44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
class QgsPalettedRasterRenderer : QgsRasterRenderer
|
|
{
|
|
%TypeHeaderCode
|
|
#include "qgspalettedrasterrenderer.h"
|
|
%End
|
|
public:
|
|
/** Renderer owns color array*/
|
|
QgsPalettedRasterRenderer( QgsRasterInterface* input, int bandNumber, QColor* colorArray /Array,Transfer/, int nColors /ArraySize/, const QVector<QString>& labels = QVector<QString>() );
|
|
~QgsPalettedRasterRenderer();
|
|
virtual QgsPalettedRasterRenderer * clone() const /Factory/;
|
|
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterInterface* input ) /Factory/;
|
|
|
|
QgsRasterBlock *block( int bandNo, const QgsRectangle & extent, int width, int height, QgsRasterBlockFeedback* feedback = nullptr ) /Factory/;
|
|
|
|
/** Returns number of colors*/
|
|
int nColors() const;
|
|
/** Returns copy of color array (caller takes ownership)*/
|
|
QColor* colors() const /Factory/;
|
|
|
|
/** Returns copy of rgb array (caller takes ownership)
|
|
@note not available in python bindings
|
|
*/
|
|
// QRgb* rgbArray() const;
|
|
|
|
/** Return optional category label
|
|
* @note added in 2.1 */
|
|
QString label( int idx ) const;
|
|
|
|
/** Set category label
|
|
* @note added in 2.1 */
|
|
void setLabel( int idx, const QString& label );
|
|
|
|
void writeXml( QDomDocument& doc, QDomElement& parentElem ) const;
|
|
|
|
void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const;
|
|
|
|
QList<int> usesBands() const;
|
|
|
|
private:
|
|
|
|
QgsPalettedRasterRenderer( const QgsPalettedRasterRenderer& );
|
|
const QgsPalettedRasterRenderer& operator=( const QgsPalettedRasterRenderer& );
|
|
};
|