Skip to content
Permalink
Browse files

[API] Removed old symbology's QgsRenderer

  • Loading branch information
wonder-sk committed Apr 7, 2013
1 parent 5a951fc commit 7cc3031f8884d768fe8405b7249cdc18e3c2571b
Showing with 42 additions and 400 deletions.
  1. +0 −2 python/core/core.sip
  2. +0 −87 python/core/renderer/qgsrenderer.sip
  3. +0 −1 src/analysis/CMakeLists.txt
  4. +0 −1 src/analysis/interpolation/qgstininterpolator.cpp
  5. +1 −7 src/app/legend/qgslegend.cpp
  6. +2 −9 src/app/legend/qgslegendlayer.cpp
  7. +1 −1 src/app/legend/qgslegendlayer.h
  8. +2 −3 src/app/qgisapp.cpp
  9. +1 −1 src/app/qgsaddtaborgroup.h
  10. +0 −1 src/app/qgsmaptoolrotatepointsymbols.cpp
  11. +1 −2 src/app/qgsprojectproperties.cpp
  12. +0 −3 src/app/qgsvectorlayerproperties.h
  13. +0 −5 src/core/CMakeLists.txt
  14. +6 −2 src/core/composer/qgscomposerlegend.cpp
  15. +0 −1 src/core/composer/qgscomposerlegenditem.cpp
  16. +0 −1 src/core/composer/qgslegendmodel.cpp
  17. +1 −8 src/core/qgsvectorlayer.cpp
  18. +0 −1 src/core/qgsvectorlayer.h
  19. +0 −67 src/core/renderer/qgsrenderer.cpp
  20. +0 −128 src/core/renderer/qgsrenderer.h
  21. +0 −1 src/core/symbology-ng/qgssymbollayerv2.cpp
  22. +10 −2 src/core/symbology-ng/qgssymbolv2.cpp
  23. +6 −0 src/core/symbology-ng/qgssymbolv2.h
  24. +0 −1 src/gui/CMakeLists.txt
  25. +0 −1 src/gui/qgsattributedialog.cpp
  26. +0 −1 src/gui/qgsattributeeditor.cpp
  27. +0 −1 src/mapserver/CMakeLists.txt
  28. +0 −1 src/mapserver/qgsprojectparser.cpp
  29. +0 −1 src/mapserver/qgswfsserver.cpp
  30. +2 −3 src/mapserver/qgswmsserver.cpp
  31. +1 −1 src/plugins/compass/CMakeLists.txt
  32. +1 −1 src/plugins/delimited_text/CMakeLists.txt
  33. +0 −1 src/plugins/diagram_overlay/CMakeLists.txt
  34. +0 −1 src/plugins/dxf2shp_converter/CMakeLists.txt
  35. +1 −1 src/plugins/georeferencer/CMakeLists.txt
  36. +1 −1 src/plugins/globe/CMakeLists.txt
  37. +0 −1 src/plugins/grass/CMakeLists.txt
  38. +0 −1 src/plugins/interpolation/CMakeLists.txt
  39. +1 −1 src/plugins/offline_editing/CMakeLists.txt
  40. +1 −1 src/plugins/oracle_raster/CMakeLists.txt
  41. +1 −1 src/plugins/plugin_template/CMakeLists.txt
  42. +0 −39 src/plugins/qgsrendererplugin.h
  43. +0 −1 src/plugins/spatialquery/CMakeLists.txt
  44. +1 −1 src/plugins/spit/CMakeLists.txt
  45. +0 −1 src/plugins/sqlanywhere/CMakeLists.txt
  46. +1 −1 src/plugins/topology/CMakeLists.txt
  47. +0 −1 src/python/CMakeLists.txt
  48. +0 −2 tests/src/core/testziplayer.cpp
@@ -163,8 +163,6 @@
%Include raster/qgscubicrasterresampler.sip
%Include raster/qgsmultibandcolorrenderer.sip

%Include renderer/qgsrenderer.sip

%Include symbology-ng/qgsstylev2.sip
%Include symbology-ng/qgssvgcache.sip
%Include symbology-ng/qgssymbolv2.sip

This file was deleted.

@@ -113,7 +113,6 @@ SET(QGIS_ANALYSIS_HDRS ${QGIS_ANALYSIS_HDRS}
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../core/
${CMAKE_CURRENT_SOURCE_DIR}/../core/renderer
${CMAKE_CURRENT_SOURCE_DIR}/../core/raster
${CMAKE_CURRENT_SOURCE_DIR}/../core/symbology-ng
interpolation
@@ -23,7 +23,6 @@
#include "Point3D.h"
#include "qgsfeature.h"
#include "qgsgeometry.h"
#include "qgssinglesymbolrenderer.h"
#include "qgsvectorlayer.h"
#include <QProgressDialog>

@@ -2427,13 +2427,7 @@ void QgsLegend::refreshLayerSymbology( QString key, bool expandItem )
if ( current && current->parent() == theLegendLayer )
current = current->parent();

double widthScale = 1.0;
if ( mMapCanvas && mMapCanvas->map() )
{
widthScale = mMapCanvas->map()->paintDevice().logicalDpiX() / 25.4;
}

theLegendLayer->refreshSymbology( key, widthScale );
theLegendLayer->refreshSymbology( key );

//restore the current item again
setCurrentItem( current );
@@ -23,7 +23,6 @@
#include "qgsmapcanvasmap.h"
#include "qgsmaplayerregistry.h"
#include "qgsrasterlayer.h"
#include "qgsrenderer.h"
#include "qgssymbol.h"
#include "qgsvectorlayer.h"
#include "qgsvectordataprovider.h"
@@ -126,7 +125,7 @@ QgsMapLayer* QgsLegendLayer::layer()
return mLyr.layer();
}

void QgsLegendLayer::refreshSymbology( const QString& key, double widthScale )
void QgsLegendLayer::refreshSymbology( const QString& key )
{
QgsMapLayer* theMapLayer = QgsMapLayerRegistry::instance()->mapLayer( key );
if ( !theMapLayer )
@@ -515,13 +514,7 @@ QString QgsLegendLayer::layerName()

void QgsLegendLayer::updateAfterLayerModification()
{
double widthScale = 1.0;
QgsMapCanvas* canvas = QgisApp::instance()->mapCanvas();
if ( canvas && canvas->map() )
{
widthScale = canvas->map()->paintDevice().logicalDpiX() / 25.4;
}
refreshSymbology( mLyr.layer()->id(), widthScale );
refreshSymbology( mLyr.layer()->id() );
layerNameChanged();
}

@@ -51,7 +51,7 @@ class QgsLegendLayer : public QgsLegendItem
//void updateCheckState();

/**Updates symbology of the layer and copies symbology to other layer files in the group*/
void refreshSymbology( const QString& key, double widthScale = 1.0 );
void refreshSymbology( const QString& key );

/** Helper method to set font characteristics.
* Not to be confused with setFont() which is inherited
@@ -176,7 +176,6 @@
#include "qgsrasterrenderer.h"
#include "qgsrasterlayersaveasdialog.h"
#include "qgsrectangle.h"
#include "qgsrenderer.h"
#include "qgsscalecombobox.h"
#include "qgsshortcutsmanager.h"
#include "qgssinglebandgrayrenderer.h"
@@ -3160,7 +3159,7 @@ void QgisApp::fileNew( bool thePromptToSaveFlag, bool forceBlank )
prj->writeEntry( "Gui", "/SelectionColorGreenPart", myGreen );
prj->writeEntry( "Gui", "/SelectionColorBluePart", myBlue );
prj->writeEntry( "Gui", "/SelectionColorAlphaPart", myAlpha );
QgsRenderer::setSelectionColor( QColor( myRed, myGreen, myBlue, myAlpha ) );
QgsSymbolV2RenderContext::setSelectionColor( QColor( myRed, myGreen, myBlue, myAlpha ) );

//set the canvas to the default background color
//the default can be set in qgisoptions
@@ -3544,7 +3543,7 @@ bool QgisApp::addProject( QString projectFile )
int myGreen = QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorGreenPart", defaultGreen );
int myBlue = QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorBluePart", defaultBlue );
int myAlpha = QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorAlphaPart", defaultAlpha );
QgsRenderer::setSelectionColor( QColor( myRed, myGreen, myBlue, myAlpha ) );
QgsSymbolV2RenderContext::setSelectionColor( QColor( myRed, myGreen, myBlue, myAlpha ) );

//load project scales
bool projectScales = QgsProject::instance()->readBoolEntry( "Scales", "/useProjectScales" );
@@ -21,8 +21,8 @@

#include "ui_qgsaddtaborgroupbase.h"
#include "qgisgui.h"
#include "qgsrenderer.h"

class QgsVectorLayer;

class QgsAddTabOrGroup : public QDialog, private Ui::QgsAddTabOrGroupBase
{
@@ -17,7 +17,6 @@
#include "qgsapplication.h"
#include "qgsmapcanvas.h"
#include "qgspointrotationitem.h"
#include "qgsrenderer.h"
#include "qgsrendererv2.h"
#include "qgssymbol.h"
#include "qgssymbolv2.h"
@@ -32,7 +32,6 @@
#include "qgsmaprenderer.h"
#include "qgsproject.h"
#include "qgsprojectlayergroupdialog.h"
#include "qgsrenderer.h"
#include "qgssnappingdialog.h"
#include "qgsrasterlayer.h"
#include "qgsvectorlayer.h"
@@ -584,7 +583,7 @@ void QgsProjectProperties::apply()
QgsProject::instance()->writeEntry( "Gui", "/SelectionColorGreenPart", myColor.green() );
QgsProject::instance()->writeEntry( "Gui", "/SelectionColorBluePart", myColor.blue() );
QgsProject::instance()->writeEntry( "Gui", "/SelectionColorAlphaPart", myColor.alpha() );
QgsRenderer::setSelectionColor( myColor );
QgsSymbolV2RenderContext::setSelectionColor( myColor );

//set the color for canvas
myColor = pbnCanvasColor->color();
@@ -21,7 +21,6 @@

#include "ui_qgsvectorlayerpropertiesbase.h"
#include "qgisgui.h"
#include "qgsrenderer.h"
#include "qgsaddattrdialog.h"
#include "qgsdelattrdialog.h"
#include "qgsattributetypedialog.h"
@@ -148,8 +147,6 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope

/**Renderer dialog which is shown*/
QDialog* mRendererDialog;
/**Buffer renderer, which is assigned to the vector layer when apply is pressed*/
//QgsRenderer* bufferRenderer;
/**Labeling dialog. If apply is pressed, options are applied to vector's QgsLabel */
QgsLabelingGui* labelingDialog;
/**Label dialog. If apply is pressed, options are applied to vector's QgsLabel */
@@ -214,8 +214,6 @@ SET(QGIS_CORE_SRCS
raster/qgsbrightnesscontrastfilter.cpp
raster/qgshuesaturationfilter.cpp

renderer/qgsrenderer.cpp

symbology/qgsmarkercatalogue.cpp
symbology/qgssymbol.cpp
symbology/qgssymbologyutils.cpp
@@ -376,7 +374,6 @@ QT4_WRAP_CPP(QGIS_CORE_MOC_SRCS ${QGIS_CORE_MOC_HDRS})
SET(QGIS_CORE_HDRS
${CMAKE_BINARY_DIR}/qgsconfig.h
../plugins/qgisplugin.h
../plugins/qgsrendererplugin.h
qgis.h
qgsapplication.h
qgsattributeaction.h
@@ -487,8 +484,6 @@ SET(QGIS_CORE_HDRS
raster/qgsrastershaderfunction.h
raster/qgsrasterviewport.h

renderer/qgsrenderer.h

symbology/qgsmarkercatalogue.h
symbology/qgssymbol.h
symbology/qgssymbologyutils.h
@@ -25,7 +25,6 @@
#include "qgsmaplayer.h"
#include "qgsmaplayerregistry.h"
#include "qgsmaprenderer.h"
#include "qgsrenderer.h" //for brush scaling
#include "qgssymbol.h"
#include "qgssymbolv2.h"
#include <QDomDocument>
@@ -619,7 +618,12 @@ void QgsComposerLegend::drawPolygonSymbol( QPainter* p, QgsSymbol* s, double cur
if ( paintDevice )
{
double rasterScaleFactor = ( paintDevice->logicalDpiX() + paintDevice->logicalDpiY() ) / 2.0 / 25.4;
QgsRenderer::scaleBrush( symbolBrush, rasterScaleFactor );
if ( rasterScaleFactor != 1.0 )
{
QMatrix m;
m.scale( 1.0 / rasterScaleFactor, 1.0 / rasterScaleFactor );
symbolBrush.setMatrix( m );
}
}
p->setBrush( symbolBrush );

@@ -20,7 +20,6 @@
#include "qgscomposerlegend.h"
#include "qgsmaplayerregistry.h"
#include "qgsrasterlayer.h"
#include "qgsrenderer.h"
#include "qgsrendererv2.h"
#include "qgssymbol.h"
#include "qgssymbolv2.h"
@@ -21,7 +21,6 @@
#include "qgsmaplayer.h"
#include "qgsmaplayerregistry.h"
#include "qgsrasterlayer.h"
#include "qgsrenderer.h"
#include "qgsrendererv2.h"
#include "qgssymbollayerv2utils.h"
#include "qgssymbol.h"
@@ -34,13 +34,6 @@

#include "qgsvectorlayer.h"

// renderers
#include "qgscontinuouscolorrenderer.h"
#include "qgsgraduatedsymbolrenderer.h"
#include "qgsrenderer.h"
#include "qgssinglesymbolrenderer.h"
#include "qgsuniquevaluerenderer.h"

#include "qgsattributeaction.h"

#include "qgis.h" //for globals
@@ -479,7 +472,7 @@ void QgsVectorLayer::drawRendererV2Levels( QgsFeatureIterator &fit, QgsRenderCon
if ( !mSelectedFeatureIds.isEmpty() )
{
selRenderer = new QgsSingleSymbolRendererV2( QgsSymbolV2::defaultSymbol( geometryType() ) );
selRenderer->symbol()->setColor( QgsRenderer::selectionColor() );
selRenderer->symbol()->setColor( QgsSymbolV2RenderContext::selectionColor() );
selRenderer->setVertexMarkerAppearance( currentVertexMarkerType(), currentVertexMarkerSize() );
selRenderer->startRender( rendererContext, this );
}
@@ -42,7 +42,6 @@ class QgsGeometryVertexIndex;
class QgsMapToPixel;
class QgsLabel;
class QgsRectangle;
class QgsRenderer;
class QgsVectorDataProvider;
class QgsVectorOverlay;
class QgsSingleSymbolRendererV2;

1 comment on commit 7cc3031

@dakcarto

This comment has been minimized.

Copy link
Member

@dakcarto dakcarto commented on 7cc3031 Apr 10, 2013

Hi Martin,

Do you think something related to the changes the default selection color here are causing http://hub.qgis.org/issues/7549 ?

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