QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
c
e
f
g
h
k
l
m
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Functions
3
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
Files
File List
File Members
All
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
n
o
p
q
r
s
t
u
w
Typedefs
3
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
c
l
s
t
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
x
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
gui
symbology
qgsrendererwidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsrendererwidget.h
3
---------------------
4
begin : November 2009
5
copyright : (C) 2009 by Martin Dobias
6
email : wonder dot sk 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 QGSRENDERERWIDGET_H
16
#define QGSRENDERERWIDGET_H
17
18
#include <QWidget>
19
#include <QMenu>
20
#include <QStackedWidget>
21
#include "
qgspanelwidget.h
"
22
#include "
qgssymbolwidgetcontext.h
"
23
24
class
QgsDataDefinedSizeLegend
;
25
class
QgsDataDefinedSizeLegendWidget
;
26
class
QgsVectorLayer
;
27
class
QgsStyle
;
28
class
QgsFeatureRenderer
;
29
class
QgsMapCanvas
;
30
class
QgsMarkerSymbol
;
31
class
QgsLegendSymbolItem
;
32
45
class
GUI_EXPORT
QgsRendererWidget
:
public
QgsPanelWidget
46
{
47
Q_OBJECT
48
public
:
49
QgsRendererWidget
(
QgsVectorLayer
*layer,
QgsStyle
*style );
50
52
virtual
QgsFeatureRenderer
*renderer() = 0;
53
57
void
showSymbolLevelsDialog(
QgsFeatureRenderer
*r );
58
65
virtual
void
setContext(
const
QgsSymbolWidgetContext
&context );
66
72
QgsSymbolWidgetContext
context()
const
;
73
78
const
QgsVectorLayer
*
vectorLayer
()
const
{
return
mLayer; }
79
83
void
applyChanges();
84
85
void
setDockMode
(
bool
dockMode )
override
;
86
93
virtual
void
disableSymbolLevels()
SIP_SKIP
;
94
95
signals:
96
102
void
layerVariablesChanged();
103
109
Q_DECL_DEPRECATED
void
symbolLevelsChanged()
SIP_DEPRECATED
;
110
111
protected:
112
QgsVectorLayer
*mLayer =
nullptr
;
113
QgsStyle
*mStyle =
nullptr
;
114
QMenu *contextMenu =
nullptr
;
115
QAction *mCopyAction =
nullptr
;
116
QAction *mPasteAction =
nullptr
;
117
122
QAction *mCopySymbolAction =
nullptr
;
123
128
QAction *mPasteSymbolAction =
nullptr
;
129
131
QgsSymbolWidgetContext
mContext;
132
137
virtual QList<
QgsSymbol
*> selectedSymbols() {
return
QList<QgsSymbol *>(); }
138
virtual
void
refreshSymbolView
() {}
139
145
QgsDataDefinedSizeLegendWidget *createDataDefinedSizeLegendWidget(
const
QgsMarkerSymbol
*symbol,
const
QgsDataDefinedSizeLegend
*ddsLegend )
SIP_FACTORY
;
146
156
virtual
void
setSymbolLevels(
const
QList< QgsLegendSymbolItem > &levels,
bool
enabled );
157
158
protected
slots:
159
void
contextMenuViewCategories( QPoint p );
161
void
changeSymbolColor();
163
void
changeSymbolOpacity();
165
void
changeSymbolUnit();
167
void
changeSymbolWidth();
169
void
changeSymbolSize();
171
void
changeSymbolAngle();
172
173
174
virtual
void
copy
() {}
175
virtual
void
paste
() {}
176
182
virtual
void
pasteSymbolToSelection();
183
184
private
slots:
185
186
void
copySymbol();
187
188
private
:
189
194
virtual
void
apply()
SIP_FORCE
;
195
196
197
};
198
199
201
202
#include <QObject>
203
204
class
QMenu;
205
class
QgsField
;
206
class
QgsFields
;
207
208
#include "ui_widget_set_dd_value.h"
209
#include "qgis_gui.h"
210
211
216
class
GUI_EXPORT
QgsDataDefinedValueDialog
:
public
QDialog,
public
Ui::QgsDataDefinedValueBaseDialog,
private
QgsExpressionContextGenerator
217
{
218
219
Q_OBJECT
220
221
public
:
222
229
QgsDataDefinedValueDialog
(
const
QList<QgsSymbol *> &symbolList,
QgsVectorLayer
*layer,
const
QString &label );
230
237
void
setContext(
const
QgsSymbolWidgetContext
&context );
238
244
QgsSymbolWidgetContext
context()
const
;
245
250
const
QgsVectorLayer
*
vectorLayer
()
const
{
return
mLayer; }
251
252
public
slots:
253
void
dataDefinedChanged();
254
255
protected
:
256
262
void
init(
int
propertyKey );
// needed in children ctor to call virtual
263
264
private
:
265
QgsProperty
symbolDataDefined() const
SIP_FORCE
;
266
267
virtual
QgsProperty
symbolDataDefined( const
QgsSymbol
* ) const = 0
SIP_FORCE
;
268
virtual
double
value( const
QgsSymbol
* ) const = 0
SIP_FORCE
;
269
virtual
void
setDataDefined(
QgsSymbol
*symbol, const
QgsProperty
&dd ) = 0
SIP_FORCE
;
270
271
QList<
QgsSymbol
*> mSymbolList;
272
QgsVectorLayer
*mLayer =
nullptr
;
273
274
QgsSymbolWidgetContext
mContext;
275
276
QgsExpressionContext
createExpressionContext() const override;
277
};
278
283
class GUI_EXPORT
QgsDataDefinedSizeDialog
: public
QgsDataDefinedValueDialog
284
{
285
Q_OBJECT
286
public
:
287
QgsDataDefinedSizeDialog
(
const
QList<QgsSymbol *> &symbolList,
QgsVectorLayer
*layer );
288
289
protected
:
290
QgsProperty
symbolDataDefined(
const
QgsSymbol
*symbol )
const override
;
291
292
double
value(
const
QgsSymbol
*symbol )
const override
;
293
294
void
setDataDefined(
QgsSymbol
*symbol,
const
QgsProperty
&dd )
override
;
295
296
private
:
297
298
std::shared_ptr< QgsMarkerSymbol > mAssistantSymbol;
299
};
300
305
class
GUI_EXPORT
QgsDataDefinedRotationDialog
:
public
QgsDataDefinedValueDialog
306
{
307
Q_OBJECT
308
public
:
309
QgsDataDefinedRotationDialog
(
const
QList<QgsSymbol *> &symbolList,
QgsVectorLayer
*layer );
310
311
protected
:
312
QgsProperty
symbolDataDefined(
const
QgsSymbol
*symbol )
const override
;
313
314
double
value(
const
QgsSymbol
*symbol )
const override
;
315
316
void
setDataDefined(
QgsSymbol
*symbol,
const
QgsProperty
&dd )
override
;
317
};
318
323
class
GUI_EXPORT
QgsDataDefinedWidthDialog
:
public
QgsDataDefinedValueDialog
324
{
325
Q_OBJECT
326
public
:
327
QgsDataDefinedWidthDialog
(
const
QList<QgsSymbol *> &symbolList,
QgsVectorLayer
*layer );
328
329
protected
:
330
QgsProperty
symbolDataDefined(
const
QgsSymbol
*symbol )
const override
;
331
332
double
value(
const
QgsSymbol
*symbol )
const override
;
333
334
void
setDataDefined(
QgsSymbol
*symbol,
const
QgsProperty
&dd )
override
;
335
};
336
337
338
339
#endif // QGSRENDERERWIDGET_H
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition:
qgsexpressioncontext.h:406
QgsDataDefinedSizeDialog
Definition:
qgsrendererwidget.h:283
QgsRendererWidget::refreshSymbolView
virtual void refreshSymbolView()
Definition:
qgsrendererwidget.h:138
QgsProperty
A store for object properties.
Definition:
qgsproperty.h:230
QgsPanelWidget::setDockMode
virtual void setDockMode(bool dockMode)
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
Definition:
qgspanelwidget.cpp:44
QgsFields
Container of fields for a vector layer.
Definition:
qgsfields.h:44
QgsDataDefinedValueDialog::vectorLayer
const QgsVectorLayer * vectorLayer() const
Returns the vector layer associated with the widget.
Definition:
qgsrendererwidget.h:250
QgsSymbolWidgetContext
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Definition:
qgssymbolwidgetcontext.h:35
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition:
qgsmapcanvas.h:89
QgsDataDefinedSizeLegend
Object that keeps configuration of appearance of marker symbol's data-defined size in legend.
Definition:
qgsdatadefinedsizelegend.h:42
QgsDataDefinedSizeLegendWidget::QgsDataDefinedSizeLegendWidget
QgsDataDefinedSizeLegendWidget(const QgsDataDefinedSizeLegend *ddsLegend, const QgsProperty &ddSize, QgsMarkerSymbol *overrideSymbol, QgsMapCanvas *canvas=nullptr, QWidget *parent=nullptr)
Creates the dialog and initializes the content to what is passed in the legend configuration (may be ...
Definition:
qgsdatadefinedsizelegendwidget.cpp:36
QgsSymbol
Abstract base class for all rendered symbols.
Definition:
qgssymbol.h:92
qgssymbolwidgetcontext.h
QgsRendererWidget::vectorLayer
const QgsVectorLayer * vectorLayer() const
Returns the vector layer associated with the widget.
Definition:
qgsrendererwidget.h:78
SIP_FACTORY
#define SIP_FACTORY
Definition:
qgis_sip.h:76
SIP_DEPRECATED
#define SIP_DEPRECATED
Definition:
qgis_sip.h:106
QgsLegendSymbolItem
The class stores information about one class/rule of a vector layer renderer in a unified way that ca...
Definition:
qgslegendsymbolitem.h:36
SIP_SKIP
#define SIP_SKIP
Definition:
qgis_sip.h:126
QgsPanelWidget
Base class for any widget that can be shown as a inline panel.
Definition:
qgspanelwidget.h:29
QgsRendererWidget::copy
virtual void copy()
Definition:
qgsrendererwidget.h:174
QgsDataDefinedValueDialog
Utility classes for "en masse" size definition.
Definition:
qgsrendererwidget.h:216
QgsMarkerSymbol
A marker symbol type, for rendering Point and MultiPoint geometries.
Definition:
qgsmarkersymbol.h:30
QgsDataDefinedRotationDialog
Definition:
qgsrendererwidget.h:305
QgsRendererWidget
Base class for renderer settings widgets.
Definition:
qgsrendererwidget.h:45
QgsFeatureRenderer
Definition:
qgsrenderer.h:101
QgsRendererWidget::paste
virtual void paste()
Definition:
qgsrendererwidget.h:175
SIP_FORCE
#define SIP_FORCE
Definition:
qgis_sip.h:131
QgsStyle
Definition:
qgsstyle.h:159
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition:
qgsvectorlayer.h:391
qgspanelwidget.h
QgsExpressionContextGenerator
Abstract interface for generating an expression context.
Definition:
qgsexpressioncontextgenerator.h:36
QgsDataDefinedWidthDialog
Definition:
qgsrendererwidget.h:323
QgsField
Encapsulate a field in an attribute table or data source.
Definition:
qgsfield.h:50
Generated on Sun Sep 11 2022 00:03:17 for QGIS API Documentation by
1.8.17