QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsheatmaprendererwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsheatmaprendererwidget.h
3  --------------------------
4  begin : November 2014
5  copyright : (C) 2014 Nyall Dawson
6  email : nyall dot dawson 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 QGSHEATMAPRENDERERWIDGET_H
16 #define QGSHEATMAPRENDERERWIDGET_H
17 
18 #include "ui_qgsheatmaprendererwidgetbase.h"
19 #include "qgis_sip.h"
20 #include "qgsrendererwidget.h"
21 #include "qgis_gui.h"
22 
23 class QMenu;
24 class QgsHeatmapRenderer;
25 
30 class GUI_EXPORT QgsHeatmapRendererWidget : public QgsRendererWidget, private Ui::QgsHeatmapRendererWidgetBase, private QgsExpressionContextGenerator
31 {
32  Q_OBJECT
33 
34  public:
35 
42  static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY;
43 
51 
52  QgsFeatureRenderer *renderer() override;
53  void setContext( const QgsSymbolWidgetContext &context ) override;
54 
55  private:
56  QgsHeatmapRenderer *mRenderer = nullptr;
57 
59 
60  private slots:
61 
62  void applyColorRamp();
63  void mRadiusUnitWidget_changed();
64  void mRadiusSpinBox_valueChanged( double d );
65  void mMaxSpinBox_valueChanged( double d );
66  void mQualitySlider_valueChanged( int v );
67  void weightExpressionChanged( const QString &expression );
68 
69 };
70 
71 
72 #endif // QGSHEATMAPRENDERERWIDGET_H
QgsRendererWidget::renderer
virtual QgsFeatureRenderer * renderer()=0
Returns pointer to the renderer (no transfer of ownership)
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition: qgsexpressioncontext.h:369
QgsSymbolWidgetContext
Definition: qgssymbolwidgetcontext.h:35
QgsHeatmapRenderer
A renderer which draws points as a live heatmap.
Definition: qgsheatmaprenderer.h:33
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
qgis_sip.h
QgsExpressionContextGenerator::createExpressionContext
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
QgsRendererWidget
Definition: qgsrendererwidget.h:44
QgsFeatureRenderer
Definition: qgsrenderer.h:102
QgsStyle
Definition: qgsstyle.h:159
QgsVectorLayer
Definition: qgsvectorlayer.h:385
qgsrendererwidget.h
QgsExpressionContextGenerator
Definition: qgsexpressioncontextgenerator.h:36
QgsRendererWidget::setContext
virtual void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which the renderer widget is shown, e.g., the associated map canvas and expressio...
Definition: qgsrendererwidget.cpp:337
QgsHeatmapRendererWidget
Definition: qgsheatmaprendererwidget.h:30