2
#ifndef QGSMARKERSYMBOLLAYERV2_H
3
#define QGSMARKERSYMBOLLAYERV2_H
5
#include "qgssymbollayerv2.h"
7
#define DEFAULT_SIMPLEMARKER_NAME "circle"
8
#define DEFAULT_SIMPLEMARKER_COLOR QColor(255,0,0)
9
#define DEFAULT_SIMPLEMARKER_BORDERCOLOR QColor(0,0,0)
10
#define DEFAULT_SIMPLEMARKER_SIZE 9
11
#define DEFAULT_SIMPLEMARKER_ANGLE 0
18
class CORE_EXPORT QgsSimpleMarkerSymbolLayerV2 : public QgsMarkerSymbolLayerV2
21
QgsSimpleMarkerSymbolLayerV2( QString name = DEFAULT_SIMPLEMARKER_NAME,
22
QColor color = DEFAULT_SIMPLEMARKER_COLOR,
23
QColor borderColor = DEFAULT_SIMPLEMARKER_BORDERCOLOR,
24
double size = DEFAULT_SIMPLEMARKER_SIZE,
25
double angle = DEFAULT_SIMPLEMARKER_ANGLE );
29
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
31
// implemented from base classes
33
QString layerType() const;
35
void startRender( QgsRenderContext& context );
37
void stopRender( QgsRenderContext& context );
39
void renderPoint( const QPointF& point, QgsRenderContext& context );
41
QgsStringMap properties() const;
43
QgsSymbolLayerV2* clone() const;
45
QString name() const { return mName; }
46
void setName( QString name ) { mName = name; }
48
QColor borderColor() const { return mBorderColor; }
49
void setBorderColor( QColor color ) { mBorderColor = color; }
53
void drawMarker( QPainter* p );
65
#define DEFAULT_SVGMARKER_NAME "/symbol/Star1.svg"
66
#define DEFAULT_SVGMARKER_SIZE 9
67
#define DEFAULT_SVGMARKER_ANGLE 0
69
class CORE_EXPORT QgsSvgMarkerSymbolLayerV2 : public QgsMarkerSymbolLayerV2
72
QgsSvgMarkerSymbolLayerV2( QString name = DEFAULT_SVGMARKER_NAME,
73
double size = DEFAULT_SVGMARKER_SIZE,
74
double angle = DEFAULT_SVGMARKER_ANGLE );
78
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() );
80
//! Return a list of all available svg files
81
static QStringList listSvgFiles();
83
//! Get symbol's path from its name
84
static QString symbolNameToPath( QString name );
86
//! Get symbols's name from its path
87
static QString symbolPathToName( QString path );
89
// implemented from base classes
91
QString layerType() const;
93
void startRender( QgsRenderContext& context );
95
void stopRender( QgsRenderContext& context );
97
void renderPoint( const QPointF& point, QgsRenderContext& context );
99
QgsStringMap properties() const;
101
QgsSymbolLayerV2* clone() const;
103
QString path() const { return mPath; }
104
void setPath( QString path ) { mPath = path; }