Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FEATURE] Data-defined size and rotation for single symbol renderer i…
…n symbology-ng. (ticket #2585)

Developed by for Faunalia (http://www.faunalia.it) with funding from Regione Toscana - Sistema Informativo per
la Gestione del Territorio e dell' Ambiente [RT-SIGTA]".
For the project: "Sviluppo di prodotti software GIS open-source basati sui prodotti
QuantumGIS e Postgis (CIG 037728516E)



git-svn-id: http://svn.osgeo.org/qgis/trunk@13389 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Apr 25, 2010
1 parent aa18abc commit 02df126
Show file tree
Hide file tree
Showing 12 changed files with 522 additions and 129 deletions.
25 changes: 24 additions & 1 deletion python/core/symbology-ng-core.sip
Expand Up @@ -133,6 +133,12 @@ public:
QgsSymbolV2* symbol() const;
void setSymbol(QgsSymbolV2* s /Transfer/);

void setRotationField(QString fieldName);
QString rotationField() const;

void setSizeScaleField(QString fieldName);
QString sizeScaleField() const;

virtual QString dump();

virtual QgsFeatureRendererV2* clone() /Factory/;
Expand Down Expand Up @@ -453,7 +459,7 @@ class QgsSymbolV2RenderContext
%End

public:
QgsSymbolV2RenderContext( QgsRenderContext& c, QgsSymbolV2::OutputUnit u , qreal alpha = 1.0, bool selected = false );
QgsSymbolV2RenderContext( QgsRenderContext& c, QgsSymbolV2::OutputUnit u , qreal alpha = 1.0, bool selected = false, int renderHints = 0 );
~QgsSymbolV2RenderContext();

QgsRenderContext& renderContext();
Expand All @@ -468,6 +474,11 @@ class QgsSymbolV2RenderContext
bool selected() const;
void setSelected( bool selected ) const;

int renderHints() const;
void setRenderHints( int hints );

// Colour used for selections

static QColor selectionColor();

double outputLineWidth(double width) const;
Expand Down Expand Up @@ -510,6 +521,12 @@ public:
Fill
};

enum RenderHint
{
DataDefinedSizeScale = 1,
DataDefinedRotation = 2
};

virtual ~QgsSymbolV2();

//! return new default symbol for specified geometry type
Expand Down Expand Up @@ -556,6 +573,12 @@ public:
OutputUnit outputUnit() const;
void setOutputUnit( OutputUnit u );

qreal alpha() const;
void setAlpha( qreal alpha );

int renderHints() const;
void setRenderHints( int hints );

protected:
QgsSymbolV2(SymbolType type, QgsSymbolLayerV2List layers /Transfer/); // can't be instantiated

Expand Down

0 comments on commit 02df126

Please sign in to comment.