QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
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
28class QgsRasterLayer;
29class QgsMapCanvas;
31
36class GUI_EXPORT QgsRendererRasterPropertiesWidget : public QgsMapLayerConfigWidget, private Ui::QgsRendererRasterPropsWidgetBase
37{
38 Q_OBJECT
39
40 public:
47 QgsRendererRasterPropertiesWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent = nullptr );
48
54 void setMapCanvas( QgsMapCanvas *canvas );
55
59 QgsRasterRendererWidget *currentRenderWidget() { return mRendererWidget; }
60
61 public slots:
63 void rendererChanged();
64
66 void apply() override;
67
68
69#ifdef __GNUC__
70#pragma GCC diagnostic push
71#pragma GCC diagnostic ignored "-Woverloaded-virtual"
72#endif
73
78 void syncToLayer( QgsRasterLayer *layer );
79#ifdef __GNUC__
80#pragma GCC diagnostic pop
81#endif
82
83 private slots:
85 void mResetColorRenderingBtn_clicked();
86
88 void toggleSaturationControls( int grayscaleMode );
89
91 void toggleColorizeControls( bool colorizeEnabled );
92
93 void refreshAfterStyleChanged();
94
99 void updateGammaSpinBox( int value );
100
105 void updateGammaSlider( double value );
106
107 private:
108 static void initRendererWidgetFunctions();
109 void setRendererWidget( const QString &rendererName );
110
111 QgsRasterLayer *mRasterLayer = nullptr;
112 QgsRasterRendererWidget *mRendererWidget = nullptr;
113
114 QgsResamplingUtils mResamplingUtils;
115};
116
117#endif // QGSRENDERERRASTERPROPERTIESDIALOG_H
Map canvas is a class for displaying all GIS data types on a canvas.
A panel widget that can be shown in the map style dock.
virtual void apply()=0
Called when changes to the layer need to be made.
virtual void syncToLayer(QgsMapLayer *layer)
Reset to original (vector layer) values.
Base class for all map layer types.
Definition qgsmaplayer.h:76
Represents a raster layer.
Abstract base class for widgets which configure a QgsRasterRenderer.
QgsRasterRendererWidget * currentRenderWidget()
Returns the active render widget.