QGIS/python/gui/raster/qgsrasterrendererwidget.sip
Even Rouault 532eb58d1f [FEATURE] Implement raster auto-stretching when updating canvas
This commit implements the improvements described at:
https://lists.osgeo.org/pipermail/qgis-developer/2016-September/044393.html

The QgsRasterMinMaxWidget now offers a seetting to specify that the statistics
should be computed each time the canvas extent changes.

Other changes:
- the content of the QgsRasterMinMaxWidget is now persistant.
- there is no longer any Load button. The global Apply / OK button of the raster
  properties dialog has this effect.
- the default "limits" for single band raster is now MinMax and not CumulativeCut
- the default "limits" can be configured for single band, multi band single byte and
  multi band multi byte
- "Strech using current extent" honours the "limits" instead of forcing min/max.
2016-12-16 12:36:06 +01:00

52 lines
1.6 KiB
Plaintext

class QgsRasterRendererWidget: QWidget
{
%TypeHeaderCode
#include <qgsrasterrendererwidget.h>
%End
public:
QgsRasterRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent );
virtual ~QgsRasterRendererWidget();
virtual QgsRasterRenderer* renderer() = 0 /Factory/;
void setRasterLayer( QgsRasterLayer* layer );
const QgsRasterLayer* rasterLayer() const;
/** Sets the map canvas associated with the widget. This allows the widget to retrieve the current
* map extent and other properties from the canvas.
* @param canvas map canvas
* @see mapCanvas()
* @note added in QGIS 2.16
*/
virtual void setMapCanvas( QgsMapCanvas* canvas );
/** Returns the map canvas associated with the widget.
* @see setMapCanvas()
* @see canvasExtent()
* @note added in QGIS 2.16
*/
QgsMapCanvas* mapCanvas();
virtual QString min( int index = 0 );
virtual QString max( int index = 0 );
virtual void setMin( const QString& value, int index = 0 );
virtual void setMax( const QString& value, int index = 0 );
virtual QString stdDev();
virtual void setStdDev( const QString& value );
virtual int selectedBand( int index = 0 );
virtual void doComputations();
virtual QgsRasterMinMaxWidget* minMaxWidget();
signals:
/**
* Emitted when something on the widget has changed.
* All widgets will fire this event to notify of an internal change.
*/
void widgetChanged();
protected:
/** Returns a band name for display. First choice is color name, otherwise band number*/
QString displayBandName( int band ) const;
};