mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -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.
41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
class QgsSingleBandGrayRenderer: QgsRasterRenderer
|
|
{
|
|
%TypeHeaderCode
|
|
#include "qgssinglebandgrayrenderer.h"
|
|
%End
|
|
public:
|
|
enum Gradient
|
|
{
|
|
BlackToWhite,
|
|
WhiteToBlack
|
|
};
|
|
|
|
QgsSingleBandGrayRenderer( QgsRasterDataProvider* provider, int grayBand );
|
|
~QgsSingleBandGrayRenderer();
|
|
virtual QgsSingleBandGrayRenderer * clone() const /Factory/;
|
|
|
|
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider ) /Factory/;
|
|
|
|
QgsRasterBlock *block( int bandNo, const QgsRectangle & extent, int width, int height, QgsRasterBlockFeedback* feedback = nullptr ) / Factory /;
|
|
|
|
int grayBand() const;
|
|
void setGrayBand( int band );
|
|
const QgsContrastEnhancement* contrastEnhancement() const;
|
|
/** Takes ownership*/
|
|
void setContrastEnhancement( QgsContrastEnhancement* ce /Transfer/ );
|
|
|
|
void setGradient( Gradient theGradient );
|
|
Gradient gradient() const;
|
|
|
|
void writeXml( QDomDocument& doc, QDomElement& parentElem ) const;
|
|
|
|
void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const;
|
|
|
|
QList<int> usesBands() const;
|
|
|
|
private:
|
|
|
|
QgsSingleBandGrayRenderer( const QgsSingleBandGrayRenderer& );
|
|
const QgsSingleBandGrayRenderer& operator=( const QgsSingleBandGrayRenderer& );
|
|
};
|