Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
qgsvectoroverlay.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvectoroverlay.h - description
3  ------------------
4  begin : January 2007
5  copyright : (C) 2007 by Marco Hugentobler
6  email : marco dot hugentobler at karto dot baug dot ethz dot ch
7 ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSVECTOROVERLAY_H
19 #define QGSVECTOROVERLAY_H
20 
21 #include <QString>
22 #include "qgsvectorlayer.h"
23 
24 class QgsOverlayObject;
25 class QgsRect;
26 class QgsRenderContext;
27 
33 class CORE_EXPORT QgsVectorOverlay
34 {
35  public:
37  virtual ~QgsVectorOverlay();
38 
44  virtual void createOverlayObjects( const QgsRenderContext& renderContext ) = 0;
45 
47  void removeOverlayObjects();
48 
50  virtual void drawOverlayObjects( QgsRenderContext& context ) const = 0;
51 
53  QMap<int, QgsOverlayObject*>* overlayObjects() {return &mOverlayObjects;}
54 
56  virtual QString typeName() const = 0;
57 
59  void setAttributes( const QgsAttributeList& list ) {mAttributes = list;}
60 
61  bool displayFlag() const {return mDisplayFlag;}
62 
64  void setDisplayFlag( bool flag ) {mDisplayFlag = flag;}
65 
67  virtual bool readXML( const QDomNode& overlayNode ) = 0;
68 
70  virtual bool writeXML( QDomNode& layer_node, QDomDocument& doc ) const = 0;
71 
72  protected:
75 
78 
81 
83  QMap<int, QgsOverlayObject*> mOverlayObjects;
84 
87  QMap<int, QgsPoint> mPositionConstraints;
88 
89  private:
92 };
93 
94 #endif