QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
symbology
qgslinesymbol.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslinesymbol.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
16
#ifndef QGSLINESYMBOL_H
17
#define QGSLINESYMBOL_H
18
19
#include "
qgis.h
"
20
#include "qgis_core.h"
21
#include "
qgssymbol.h
"
22
29
class
CORE_EXPORT
QgsLineSymbol
:
public
QgsSymbol
30
{
31
public
:
36
static
std::unique_ptr< QgsLineSymbol >
createSimple
(
const
QVariantMap &properties );
37
43
QgsLineSymbol
(
const
QgsSymbolLayerList
&layers
SIP_TRANSFER
=
QgsSymbolLayerList
() );
44
51
void
setWidth
(
double
width
)
const
;
52
58
void
setWidthUnit
(
Qgis::RenderUnit
unit )
const
;
59
70
double
width
()
const
;
71
83
double
width
(
const
QgsRenderContext
&context )
const
;
84
89
void
setDataDefinedWidth
(
const
QgsProperty
&property )
const
;
90
97
QgsProperty
dataDefinedWidth
()
const
;
98
111
void
renderPolyline
(
const
QPolygonF &points,
const
QgsFeature
*f,
QgsRenderContext
&context,
int
layer
= -1,
bool
selected =
false
);
112
113
QgsLineSymbol
*
clone
()
const
override
SIP_FACTORY
;
114
115
private
:
116
void
renderPolylineUsingLayer(
QgsLineSymbolLayer
*
layer
,
const
QPolygonF &points,
QgsSymbolRenderContext
&context );
117
};
118
119
120
#endif
// QGSLINESYMBOL_H
Qgis::RenderUnit
RenderUnit
Rendering size units.
Definition
qgis.h:5758
QgsFeature
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition
qgsfeature.h:60
QgsLineSymbolLayer
Abstract base class for line symbol layers.
Definition
qgssymbollayer.h:1205
QgsLineSymbol::setWidthUnit
void setWidthUnit(Qgis::RenderUnit unit) const
Sets the width units for the whole symbol (including all symbol layers).
Definition
qgslinesymbol.cpp:84
QgsLineSymbol::setDataDefinedWidth
void setDataDefinedWidth(const QgsProperty &property) const
Set data defined width for whole symbol (including all symbol layers).
Definition
qgslinesymbol.cpp:143
QgsLineSymbol::setWidth
void setWidth(double width) const
Sets the width for the whole line symbol.
Definition
qgslinesymbol.cpp:41
QgsLineSymbol::renderPolyline
void renderPolyline(const QPolygonF &points, const QgsFeature *f, QgsRenderContext &context, int layer=-1, bool selected=false)
Renders the symbol along the line joining points, using the given render context.
Definition
qgslinesymbol.cpp:233
QgsLineSymbol::createSimple
static std::unique_ptr< QgsLineSymbol > createSimple(const QVariantMap &properties)
Create a line symbol with one symbol layer: SimpleLine with specified properties.
Definition
qgslinesymbol.cpp:23
QgsLineSymbol::width
double width() const
Returns the estimated width for the whole symbol, which is the maximum width of all marker symbol lay...
Definition
qgslinesymbol.cpp:97
QgsLineSymbol::QgsLineSymbol
QgsLineSymbol(const QgsSymbolLayerList &layers=QgsSymbolLayerList())
Constructor for QgsLineSymbol, with the specified list of initial symbol layers.
Definition
qgslinesymbol.cpp:34
QgsLineSymbol::dataDefinedWidth
QgsProperty dataDefinedWidth() const
Returns data defined width for whole symbol (including all symbol layers).
Definition
qgslinesymbol.cpp:179
QgsProperty
A store for object properties.
Definition
qgsproperty.h:228
QgsRenderContext
Contains information about the context of a rendering operation.
Definition
qgsrendercontext.h:63
QgsSymbolRenderContext
Encapsulates the context in which a symbol is being rendered.
Definition
qgssymbolrendercontext.h:35
QgsSymbol::clone
virtual QgsSymbol * clone() const =0
Returns a deep copy of this symbol.
QgsSymbol::layer
Q_DECL_DEPRECATED const QgsVectorLayer * layer() const
Definition
qgssymbol.cpp:1527
QgsSymbol::QgsSymbol
QgsSymbol(Qgis::SymbolType type, const QgsSymbolLayerList &layers)
Constructor for a QgsSymbol of the specified type.
Definition
qgssymbol.cpp:161
qgis.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:35
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:83
qgssymbol.h
QgsSymbolLayerList
QList< QgsSymbolLayer * > QgsSymbolLayerList
Definition
qgssymbol.h:30
Generated on
for QGIS API Documentation by
1.17.0