Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
qgssinglesymbolrendererv2.h
Go to the documentation of this file.
1 #ifndef QGSSINGLESYMBOLRENDERERV2_H
2 #define QGSSINGLESYMBOLRENDERERV2_H
3 
4 #include "qgsrendererv2.h"
5 
7 {
8  public:
9 
11 
12  virtual ~QgsSingleSymbolRendererV2();
13 
14  virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature );
15 
16  virtual void startRender( QgsRenderContext& context, const QgsVectorLayer *vlayer );
17 
18  virtual void stopRender( QgsRenderContext& context );
19 
20  virtual QList<QString> usedAttributes();
21 
22  QgsSymbolV2* symbol() const;
23  void setSymbol( QgsSymbolV2* s );
24 
26  void setRotationField( QString fieldName ) { mRotationField = fieldName; }
28  QString rotationField() const { return mRotationField; }
29 
31  void setSizeScaleField( QString fieldName ) { mSizeScaleField = fieldName; }
33  QString sizeScaleField() const { return mSizeScaleField; }
34 
35  virtual QString dump();
36 
37  virtual QgsFeatureRendererV2* clone();
38 
39  virtual QgsSymbolV2List symbols();
40 
42  static QgsFeatureRendererV2* create( QDomElement& element );
43 
45  virtual QDomElement save( QDomDocument& doc );
46 
48  virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );
49 
53 
54  protected:
56  QString mRotationField;
57  QString mSizeScaleField;
58 
59  // temporary stuff for rendering
60  int mRotationFieldIdx, mSizeScaleFieldIdx;
62  double mOrigSize;
63 };
64 
65 
66 #endif // QGSSINGLESYMBOLRENDERERV2_H