Skip to content
Permalink
Browse files

Merge ellipse symbollayer branch

  • Loading branch information
mhugent committed Jul 19, 2011
2 parents 4c00456 + ce826f6 commit c4cbcf4ebf8e7bc265c1dd4ddfe809966e9c70c6
Showing with 1,237 additions and 116 deletions.
  1. +7 −4 python/core/symbology-ng-core.sip
  2. +3 −3 python/gui/symbology-ng-gui.sip
  3. +1 −1 src/app/qgsannotationwidget.cpp
  4. +1 −0 src/core/CMakeLists.txt
  5. +19 −5 src/core/symbology-ng/qgscategorizedsymbolrendererv2.cpp
  6. +331 −0 src/core/symbology-ng/qgsellipsesymbollayerv2.cpp
  7. +100 −0 src/core/symbology-ng/qgsellipsesymbollayerv2.h
  8. +3 −3 src/core/symbology-ng/qgsfillsymbollayerv2.cpp
  9. +20 −5 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
  10. +4 −4 src/core/symbology-ng/qgslinesymbollayerv2.cpp
  11. +6 −6 src/core/symbology-ng/qgsrendererv2.cpp
  12. +4 −0 src/core/symbology-ng/qgsrulebasedrendererv2.cpp
  13. +12 −4 src/core/symbology-ng/qgssinglesymbolrendererv2.cpp
  14. +6 −1 src/core/symbology-ng/qgssymbollayerv2.h
  15. +3 −0 src/core/symbology-ng/qgssymbollayerv2registry.cpp
  16. +5 −3 src/core/symbology-ng/qgssymbollayerv2registry.h
  17. +25 −11 src/core/symbology-ng/qgssymbolv2.cpp
  18. +11 −4 src/core/symbology-ng/qgssymbolv2.h
  19. +2 −0 src/gui/CMakeLists.txt
  20. +1 −1 src/gui/qgsannotationitem.cpp
  21. +2 −2 src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp
  22. +278 −0 src/gui/symbology-ng/qgsellipsesymbollayerv2widget.cpp
  23. +48 −0 src/gui/symbology-ng/qgsellipsesymbollayerv2widget.h
  24. +2 −2 src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
  25. +1 −1 src/gui/symbology-ng/qgsrulebasedrendererv2widget.cpp
  26. +1 −1 src/gui/symbology-ng/qgssinglesymbolrendererv2widget.cpp
  27. +2 −2 src/gui/symbology-ng/qgsstylev2managerdialog.cpp
  28. +20 −20 src/gui/symbology-ng/qgssymbollayerv2widget.cpp
  29. +23 −19 src/gui/symbology-ng/qgssymbollayerv2widget.h
  30. +5 −3 src/gui/symbology-ng/qgssymbolv2propertiesdialog.cpp
  31. +4 −1 src/gui/symbology-ng/qgssymbolv2propertiesdialog.h
  32. +3 −3 src/gui/symbology-ng/qgssymbolv2selectordialog.cpp
  33. +3 −1 src/gui/symbology-ng/qgssymbolv2selectordialog.h
  34. +27 −0 src/mapserver/qgswmsserver.cpp
  35. +4 −4 src/plugins/point_displacement_renderer/qgspointdisplacementrenderer.cpp
  36. +1 −1 src/plugins/point_displacement_renderer/qgspointdisplacementrenderer.h
  37. +1 −1 src/plugins/point_displacement_renderer/qgspointdisplacementrendererwidget.cpp
  38. +248 −0 src/ui/symbollayer/widget_ellipse.ui
@@ -626,6 +626,9 @@ class QgsSymbolV2RenderContext
//! @note added in 1.5
void setRenderHints( int hints );

void setFeature( const QgsFeature* f );
const QgsFeature* feature() const;

// Color used for selections
static QColor selectionColor();

@@ -759,7 +762,7 @@ public:
void setSize(double size);
double size();

void renderPoint(const QPointF& point, QgsRenderContext& context, int layer = -1, bool selected = false );
void renderPoint(const QPointF& point, const QgsFeature* f, QgsRenderContext& context, int layer = -1, bool selected = false );

virtual QgsSymbolV2* clone() const /Factory/;
};
@@ -784,7 +787,7 @@ public:
void setWidth(double width);
double width();

void renderPolyline(const QPolygonF& points, QgsRenderContext& context, int layer = -1, bool selected = false );
void renderPolyline(const QPolygonF& points, const QgsFeature* f, QgsRenderContext& context, int layer = -1, bool selected = false );

virtual QgsSymbolV2* clone() const /Factory/;
};
@@ -807,7 +810,7 @@ public:
QgsFillSymbolV2(QgsSymbolLayerV2List layers /Transfer/ = QgsSymbolLayerV2List());

void setAngle( double angle );
void renderPolygon(const QPolygonF& points, QList<QPolygonF>* rings, QgsRenderContext& context, int layer = -1, bool selected = false );
void renderPolygon(const QPolygonF& points, QList<QPolygonF>* rings, const QgsFeature* f, QgsRenderContext& context, int layer = -1, bool selected = false );

virtual QgsSymbolV2* clone() const /Factory/;
};
@@ -839,7 +842,7 @@ class QgsSymbolLayerV2AbstractMetadata
/** create a symbol layer of this type given the map of properties. */
virtual QgsSymbolLayerV2* createSymbolLayer( const QgsStringMap& map ) = 0 /Factory/;
/** create widget for symbol layer of this type. Can return NULL if there's no GUI */
virtual QgsSymbolLayerV2Widget* createSymbolLayerWidget() /Factory/;
virtual QgsSymbolLayerV2Widget* createSymbolLayerWidget( const QgsVectorLayer* vl ) /Factory/;
};

//////////
@@ -7,7 +7,7 @@ class QgsSymbolV2PropertiesDialog : QDialog //, private Ui::DlgSymbolV2Propertie
%End

public:
QgsSymbolV2PropertiesDialog(QgsSymbolV2* symbol, QWidget* parent = NULL);
QgsSymbolV2PropertiesDialog(QgsSymbolV2* symbol, const QgsVectorLayer* vl, QWidget* parent = NULL);


public slots:
@@ -75,7 +75,7 @@ class QgsSymbolV2SelectorDialog : QDialog //, private Ui::QgsSymbolV2SelectorDia
%End

public:
QgsSymbolV2SelectorDialog(QgsSymbolV2* symbol, QgsStyleV2* style, QWidget* parent = NULL, bool embedded = false);
QgsSymbolV2SelectorDialog(QgsSymbolV2* symbol, QgsStyleV2* style, const QgsVectorLayer* vl, QWidget* parent = NULL, bool embedded = false);

protected:
void populateSymbolView();
@@ -106,7 +106,7 @@ class QgsSymbolLayerV2Widget : QWidget
%End

public:
QgsSymbolLayerV2Widget( QWidget* parent );
QgsSymbolLayerV2Widget( QWidget* parent, const QgsVectorLayer* vl = 0 );
virtual ~QgsSymbolLayerV2Widget();

virtual void setSymbolLayer( QgsSymbolLayerV2* layer ) = 0;
@@ -87,7 +87,7 @@ void QgsAnnotationWidget::on_mMapMarkerButton_clicked()
return;
}
QgsMarkerSymbolV2* markerSymbol = dynamic_cast<QgsMarkerSymbolV2*>( mMarkerSymbol->clone() );
QgsSymbolV2SelectorDialog dlg( markerSymbol, QgsStyleV2::defaultStyle(), this );
QgsSymbolV2SelectorDialog dlg( markerSymbol, QgsStyleV2::defaultStyle(), 0, this );
if ( dlg.exec() == QDialog::Rejected )
{
delete markerSymbol;
@@ -38,6 +38,7 @@ SET(QGIS_CORE_SRCS
symbology-ng/qgsstylev2.cpp
symbology-ng/qgssymbologyv2conversion.cpp
symbology-ng/qgssvgcache.cpp
symbology-ng/qgsellipsesymbollayerv2.cpp

qgis.cpp
qgsapplication.cpp
@@ -284,13 +284,27 @@ void QgsCategorizedSymbolRendererV2::stopRender( QgsRenderContext& context )

QList<QString> QgsCategorizedSymbolRendererV2::usedAttributes()
{
QList<QString> lst;
lst.append( mAttrName );
QSet<QString> attributes;
attributes.insert( mAttrName );
if ( !mRotationField.isEmpty() )
lst.append( mRotationField );
{
attributes.insert( mRotationField );
}
if ( !mSizeScaleField.isEmpty() )
lst.append( mSizeScaleField );
return lst;
{
attributes.insert( mSizeScaleField );
}

QgsCategoryList::const_iterator catIt = mCategories.constBegin();
for ( ; catIt != mCategories.constEnd(); ++catIt )
{
QgsSymbolV2* catSymbol = catIt->symbol();
if ( catSymbol )
{
attributes.unite( catSymbol->usedAttributes() );
}
}
return attributes.toList();
}

QString QgsCategorizedSymbolRendererV2::dump()

0 comments on commit c4cbcf4

Please sign in to comment.
You can’t perform that action at this time.