QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgsnullsymbolrendererwidget.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsnullsymbolrendererwidget.cpp
3 ---------------------
4 begin : November 2014
5 copyright : (C) 2014 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 ***************************************************************************/
16#include "moc_qgsnullsymbolrendererwidget.cpp"
17
19#include "qgssymbol.h"
20#include <QLayout>
21#include <QLabel>
22
27
29 : QgsRendererWidget( layer, style )
30{
31 if ( renderer )
32 {
34 }
35 if ( !mRenderer )
36 {
37 mRenderer = std::make_unique< QgsNullSymbolRenderer >();
38 if ( renderer )
40 }
41
42 QGridLayout *layout = new QGridLayout( this );
43 QLabel *label = new QLabel( tr( "No symbols will be rendered for features in this layer." ) );
44 layout->addWidget( label );
45}
46
48
Abstract base class for all 2D vector feature renderers.
void copyRendererData(QgsFeatureRenderer *destRenderer) const
Clones generic renderer data to another renderer.
Blank widget for customizing QgsNullSymbolRenderer.
~QgsNullSymbolRendererWidget() override
QgsNullSymbolRendererWidget(QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer)
Constructor for QgsNullSymbolRendererWidget.
std::unique_ptr< QgsNullSymbolRenderer > mRenderer
Renderer being configured by the widget.
QgsFeatureRenderer * renderer() override
Returns a pointer to the configured renderer.
static QgsRendererWidget * create(QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer)
Creates a new QgsNullSymbolRendererWidget object.
static QgsNullSymbolRenderer * convertFromRenderer(const QgsFeatureRenderer *renderer)
Creates a QgsNullSymbolRenderer from an existing renderer.
Base class for renderer settings widgets.
Represents a vector layer which manages a vector based data sets.