QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
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
23#include "qgis_gui.h"
24#include "qgis_sip.h"
26#include "qgsrendererwidget.h"
27
29
35
36class GUI_EXPORT QgsPointClusterRendererWidget : public QgsRendererWidget, private Ui::QgsPointClusterRendererWidgetBase
37{
38 Q_OBJECT
39
40 public:
49
57
59
60 QgsFeatureRenderer *renderer() override;
61 void setContext( const QgsSymbolWidgetContext &context ) override;
62
64
65 private:
66 std::unique_ptr<QgsPointClusterRenderer> mRenderer;
67
68 void blockAllSignals( bool block );
69 void setupBlankUi( const QString &layerName );
70
71 private slots:
72
73 void mRendererComboBox_currentIndexChanged( int index );
74 void mDistanceSpinBox_valueChanged( double d );
75 void mDistanceUnitWidget_changed();
76 void mRendererSettingsButton_clicked();
77 void centerSymbolChanged();
78 void updateRendererFromWidget();
79};
80
81#endif // QGSPOINTCLUSTERRENDERERWIDGET_H
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Abstract base class for all 2D vector feature renderers.
QgsPointClusterRendererWidget(QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer)
Constructor for QgsPointClusterRendererWidget.
~QgsPointClusterRendererWidget() override
QgsFeatureRenderer * renderer() override
Returns pointer to the renderer (no transfer of ownership).
static QgsRendererWidget * create(QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer)
Returns a new QgsPointClusterRendererWidget.
A renderer that automatically clusters points with the same geographic position.
QgsRendererWidget(QgsVectorLayer *layer, QgsStyle *style)
virtual void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which the renderer widget is shown, e.g., the associated map canvas and expressio...
virtual QgsFeatureRenderer * renderer()=0
Returns pointer to the renderer (no transfer of ownership).
QgsExpressionContext createExpressionContext() const override
This method needs to be reimplemented in all classes which implement this interface and return an exp...
QgsSymbolWidgetContext context() const
Returns the context in which the renderer widget is shown, e.g., the associated map canvas and expres...
A database of saved style entities, including symbols, color ramps, text formats and others.
Definition qgsstyle.h:88
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Represents a vector layer which manages a vector based dataset.
#define SIP_FACTORY
Definition qgis_sip.h:84