1
/***************************************************************************
6
copyright : (C) 2004 by Marco Hugentobler
7
email : mhugent@geo.unizh.ch
8
***************************************************************************/
10
/***************************************************************************
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
17
***************************************************************************/
18
/* $Id: qgssimarenderer.h,v 1.19 2005/04/02 09:42:53 rabla Exp $ */
20
#ifndef QGSSIMARENDERER_H
21
#define QGSSIMARENDERER_H
23
#include "qgsrenderer.h"
24
#include "qgsrenderitem.h"
25
#include "qgsmarkersymbol.h"
27
class QgsSiMaRenderer: public QgsRenderer
31
virtual ~QgsSiMaRenderer();
32
/**Replaces the current mItem by ri*/
33
void addItem(QgsRenderItem* ri);
34
void initializeSymbology(QgsVectorLayer* layer, QgsDlgVectorLayerProperties* pr=0);
35
void renderFeature(QPainter* p, QgsFeature* f, QPicture* pic, double* scalefactor, bool selected, int oversampling = 1, double widthScale = 1.);
36
/**Reads the renderer configuration from an XML file
37
@param rnode the DOM node to read
38
@param vl the vector layer which will be associated with the renderer*/
39
virtual void readXML(const QDomNode& rnode, QgsVectorLayer& vl);
40
/**Writes the contents of the renderer to a configuration file*/
41
virtual void writeXML(std::ostream& xml);
42
/**Writes the contents of the renderer to a configuration file
43
@ return true in case of success*/
44
virtual bool writeXML( QDomNode & layer_node, QDomDocument & document );
45
bool needsAttributes();
46
/**Returns an empty list, since no classification attributes are used*/
47
virtual std::list<int> classificationAttributes();
48
QgsRenderItem* item();
49
/**Returns the renderers name*/
51
/**Return symbology items*/
52
const std::list<QgsRenderItem*> items() const;
57
inline QgsSiMaRenderer::QgsSiMaRenderer()
59
//call superclass method to set up selection colour
60
initialiseSelectionColor();
62
mItem=new QgsRenderItem(new QgsMarkerSymbol(),"","");
65
inline QgsSiMaRenderer::~QgsSiMaRenderer()
70
inline bool QgsSiMaRenderer::needsAttributes()
75
inline void QgsSiMaRenderer::addItem(QgsRenderItem* ri)
81
inline QgsRenderItem* QgsSiMaRenderer::item()