QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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 #include "qgsresamplingutils.h"
25 #include "qgis_gui.h"
26 
27 
28 class QgsRasterLayer;
29 class QgsMapCanvas;
31 
36 class GUI_EXPORT QgsRendererRasterPropertiesWidget : public QgsMapLayerConfigWidget, private Ui::QgsRendererRasterPropsWidgetBase
37 {
38  Q_OBJECT
39 
40  public:
41 
48  QgsRendererRasterPropertiesWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent = nullptr );
49 
56  void setMapCanvas( QgsMapCanvas *canvas );
57 
61  QgsRasterRendererWidget *currentRenderWidget() { return mRendererWidget; }
62 
63  public slots:
65  void rendererChanged();
66 
68  void apply() override;
69 
70 
71 #ifdef __clang__
72 #pragma clang diagnostic push
73 #pragma clang diagnostic ignored "-Woverloaded-virtual"
74 #endif
75 
80  void syncToLayer( QgsRasterLayer *layer );
81 #ifdef __clang__
82 #pragma clang diagnostic pop
83 #endif
84 
85  private slots:
87  void mResetColorRenderingBtn_clicked();
88 
90  void toggleSaturationControls( int grayscaleMode );
91 
93  void toggleColorizeControls( bool colorizeEnabled );
94 
95  void refreshAfterStyleChanged();
96 
101  void updateGammaSpinBox( int value );
102 
107  void updateGammaSlider( double value );
108 
109  private:
110  void setRendererWidget( const QString &rendererName );
111 
112  QgsRasterLayer *mRasterLayer = nullptr;
113  QgsRasterRendererWidget *mRendererWidget = nullptr;
114 
115  QgsResamplingUtils mResamplingUtils;
116 };
117 
118 #endif // QGSRENDERERRASTERPROPERTIESDIALOG_H
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:89
QgsMapLayerConfigWidget::apply
virtual void apply()=0
Called when changes to the layer need to be made.
QgsMapLayerConfigWidget
A panel widget that can be shown in the map style dock.
Definition: qgsmaplayerconfigwidget.h:115
QgsRasterLayer
Represents a raster layer.
Definition: qgsrasterlayer.h:76
qgsmaplayerconfigwidget.h
QgsMapLayer
Base class for all map layer types. This is the base class for all map layer types (vector,...
Definition: qgsmaplayer.h:72
QgsMapLayerConfigWidget::syncToLayer
virtual void syncToLayer(QgsMapLayer *layer)
Reset to original (vector layer) values.
Definition: qgsmaplayerconfigwidget.h:142
QgsRendererRasterPropertiesWidget::currentRenderWidget
QgsRasterRendererWidget * currentRenderWidget()
Returns the active render widget.
Definition: qgsrendererrasterpropertieswidget.h:61
QgsRasterRendererWidget
Abstract base class for widgets which configure a QgsRasterRenderer.
Definition: qgsrasterrendererwidget.h:39
QgsRendererRasterPropertiesWidget
Definition: qgsrendererrasterpropertieswidget.h:36
qgsresamplingutils.h