QGIS/python/gui/raster/qgsrasterrendererwidget.sip
Nyall Dawson a32314d8b5 Add a new QgsRasterBandComboBox widget
And use wherever custom widgets were being created. Reduces
duplicate code and allows specialised handling for raster
band display/selection to be centralized.
2017-05-09 19:23:08 +10:00

48 lines
1.5 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();
};