QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgsrendererrasterpropertieswidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrendererrasterpropertieswidget.h
3  ---------------------
4  begin : May 2016
5  copyright : (C) 2016 by Nathan Woodrow
6  email : woodrow dot nathan at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 #ifndef QGSRENDERERRASTERPROPERTIESDIALOG_H
16 #define QGSRENDERERRASTERPROPERTIESDIALOG_H
17 
18 #include <QObject>
19 #include <QDialog>
20 
21 #include "ui_qgsrendererrasterpropswidgetbase.h"
22 
24 
25 
26 class QgsRasterLayer;
27 class QgsMapCanvas;
29 
33 class GUI_EXPORT QgsRendererRasterPropertiesWidget : public QgsMapLayerConfigWidget, private Ui::QgsRendererRasterPropsWidgetBase
34 {
35  Q_OBJECT
36 
37  public:
44  QgsRendererRasterPropertiesWidget( QgsMapLayer* layer, QgsMapCanvas *canvas, QWidget *parent = 0 );
46 
52  void setMapCanvas( QgsMapCanvas* canvas );
53 
57  QgsRasterRendererWidget* currentRenderWidget() { return mRendererWidget; }
58 
59  public slots:
61  void rendererChanged();
62 
64  void apply();
65 
70  void syncToLayer( QgsRasterLayer *layer );
71 
72  private slots:
74  void on_mResetColorRenderingBtn_clicked();
75 
77  void toggleSaturationControls( int grayscaleMode );
78 
80  void toggleColorizeControls( bool colorizeEnabled );
81  private:
82  void setRendererWidget( const QString& rendererName );
83 
84  QgsRasterLayer* mRasterLayer;
85  QgsRasterRendererWidget* mRendererWidget;
86 };
87 
88 #endif // QGSRENDERERRASTERPROPERTIESDIALOG_H
A panel widget that can be shown in the map style dock.
Base class for all map layer types.
Definition: qgsmaplayer.h:49
virtual void apply()=0
Called when changes to the layer need to be made.
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:109
QgsRasterRendererWidget * currentRenderWidget()
Return the active render widget.