QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsembeddedsymbolrendererwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsembeddedsymbolrendererwidget.h
3 ---------------------
4 begin : March 2021
5 copyright : (C) 2021 by 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 QGSEMBEDDEDSYMBOLRENDERERWIDGET_H
16#define QGSEMBEDDEDSYMBOLRENDERERWIDGET_H
17
18#include "ui_qgsembeddedsymbolrendererwidgetbase.h"
19
20#include "qgis_gui.h"
21#include "qgis_sip.h"
22#include "qgsrendererwidget.h"
23
24class QMenu;
26
33class GUI_EXPORT QgsEmbeddedSymbolRendererWidget : public QgsRendererWidget, private Ui::QgsEmbeddedSymbolRendererWidgetBase
34{
35 Q_OBJECT
36
37 public:
45
54
55 QgsFeatureRenderer *renderer() override;
56 void setContext( const QgsSymbolWidgetContext &context ) override;
58
59 private:
61 std::unique_ptr<QgsEmbeddedSymbolRenderer> mRenderer;
62};
63
64
65#endif // QGSEMBEDDEDSYMBOLRENDERERWIDGET_H
static QgsRendererWidget * create(QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer)
Static creation method.
QgsEmbeddedSymbolRendererWidget(QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer)
Constructor.
QgsFeatureRenderer * renderer() override
Returns pointer to the renderer (no transfer of ownership).
A vector feature renderer which uses embedded feature symbology to render per-feature symbols.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Abstract base class for all 2D vector feature renderers.
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