Skip to content

Commit 5cc30e5

Browse files
author
mhugent
committed
added Method QgsRenderer::containsPixmap
git-svn-id: http://svn.osgeo.org/qgis/trunk@5312 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 541e8f5 commit 5cc30e5

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/core/qgsrenderer.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,15 @@ void QgsRenderer::refreshLegend(std::list< std::pair<QString, QPixmap> >* symbol
6060
}
6161
}
6262

63+
bool QgsRenderer::containsPixmap() const
64+
{
65+
//default implementation returns true only for points
66+
switch(mVectorType)
67+
{
68+
case QGis::Point:
69+
return true;
70+
default:
71+
return false;
72+
}
73+
}
74+

src/core/qgsrenderer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ class QgsRenderer
7878
virtual void refreshLegend(std::list< std::pair<QString, QPixmap> >* symbologyList) const;
7979
/**Returns a copy of the renderer (a deep copy on the heap)*/
8080
virtual QgsRenderer* clone() const=0;
81+
/**Returns true if this renderer returns a pixmap in the render method (e.g. for point data or diagrams)*/
82+
virtual bool containsPixmap() const;
8183
/**Color to draw selected features - static so we can change it in proj props and automatically
8284
all renderers are updated*/
8385
static QColor mSelectionColor;

0 commit comments

Comments
 (0)