QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgspointclusterrendererwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgspointclusterrendererwidget.h
3  -------------------------------
4  begin : February 2016
5  copyright : (C) 2016 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSPOINTCLUSTERRENDERERWIDGET_H
19 #define QGSPOINTCLUSTERRENDERERWIDGET_H
20 
21 #include "ui_qgspointclusterrendererwidgetbase.h"
22 #include "qgis_sip.h"
23 #include "qgsrendererwidget.h"
25 #include "qgis_gui.h"
26 
28 
36 class GUI_EXPORT QgsPointClusterRendererWidget: public QgsRendererWidget, public QgsExpressionContextGenerator, private Ui::QgsPointClusterRendererWidgetBase
37 {
38  Q_OBJECT
39 
40  public:
41 
49  static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY;
50 
58 
60 
61  QgsFeatureRenderer *renderer() override;
62  void setContext( const QgsSymbolWidgetContext &context ) override;
63 
65 
66  private:
67  QgsPointClusterRenderer *mRenderer = nullptr;
68 
69  void blockAllSignals( bool block );
70  void setupBlankUi( const QString &layerName );
71 
72  private slots:
73 
74  void mRendererComboBox_currentIndexChanged( int index );
75  void mDistanceSpinBox_valueChanged( double d );
76  void mDistanceUnitWidget_changed();
77  void mRendererSettingsButton_clicked();
78  void centerSymbolChanged();
79  void updateRendererFromWidget();
80 };
81 
82 #endif // QGSPOINTCLUSTERRENDERERWIDGET_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
QgsPointClusterRendererWidget
Definition: qgspointclusterrendererwidget.h:36
QgsSymbolWidgetContext
Definition: qgssymbolwidgetcontext.h:35
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsPointClusterRenderer
Definition: qgspointclusterrenderer.h:31
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
qgsexpressioncontextgenerator.h
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