2012-09-24 02:28:15 +02:00
|
|
|
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;
|
|
|
|
|
2016-06-30 18:25:20 +10:00
|
|
|
/** 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();
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QString min( int index = 0 );
|
|
|
|
virtual QString max( int index = 0 );
|
2015-10-07 11:55:34 +11:00
|
|
|
virtual void setMin( const QString& value, int index = 0 );
|
|
|
|
virtual void setMax( const QString& value, int index = 0 );
|
2014-10-20 22:50:15 +02:00
|
|
|
virtual QString stdDev();
|
2015-10-07 11:55:34 +11:00
|
|
|
virtual void setStdDev( const QString& value );
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual int selectedBand( int index = 0 );
|
2016-12-15 01:31:05 +01:00
|
|
|
virtual void doComputations();
|
|
|
|
virtual QgsRasterMinMaxWidget* minMaxWidget();
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2016-05-19 08:38:26 +10:00
|
|
|
signals:
|
|
|
|
/**
|
2016-06-02 19:20:23 +02:00
|
|
|
* Emitted when something on the widget has changed.
|
2016-05-19 08:38:26 +10:00
|
|
|
* All widgets will fire this event to notify of an internal change.
|
|
|
|
*/
|
|
|
|
void widgetChanged();
|
|
|
|
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
protected:
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Returns a band name for display. First choice is color name, otherwise band number*/
|
2012-09-24 02:28:15 +02:00
|
|
|
QString displayBandName( int band ) const;
|
|
|
|
};
|