Skip to content

Commit

Permalink
[FEATURE] Data-defined size and rotation for single symbol renderer i…
Browse files Browse the repository at this point in the history
…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/qgis@13389 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Apr 25, 2010
1 parent 108b373 commit 0c50c98
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit 0c50c98

Please sign in to comment.