Quantum GIS API Documentation  1.8
src/core/qgsvectoroverlay.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                         qgsvectoroverlay.h  -  description
00003                         ------------------
00004    begin                : January 2007
00005    copyright            : (C) 2007 by Marco Hugentobler
00006    email                : marco dot hugentobler at karto dot baug dot ethz dot ch
00007 ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef QGSVECTOROVERLAY_H
00019 #define QGSVECTOROVERLAY_H
00020 
00021 #include <QString>
00022 #include "qgsvectorlayer.h"
00023 
00024 class QgsOverlayObject;
00025 class QgsRect;
00026 class QgsRenderContext;
00027 
00033 class CORE_EXPORT QgsVectorOverlay
00034 {
00035   public:
00036     QgsVectorOverlay( QgsVectorLayer* vl );
00037     virtual ~QgsVectorOverlay();
00038 
00044     virtual void createOverlayObjects( const QgsRenderContext& renderContext ) = 0;
00045 
00047     void removeOverlayObjects();
00048 
00050     virtual void drawOverlayObjects( QgsRenderContext& context ) const = 0;
00051 
00053     QMap<QgsFeatureId, QgsOverlayObject*>* overlayObjects() {return &mOverlayObjects;}
00054 
00056     virtual QString typeName() const = 0;
00057 
00059     void setAttributes( const QgsAttributeList& list ) {mAttributes = list;}
00060 
00061     bool displayFlag() const {return mDisplayFlag;}
00062 
00064     void setDisplayFlag( bool flag ) {mDisplayFlag = flag;}
00065 
00067     virtual bool readXML( const QDomNode& overlayNode ) = 0;
00068 
00070     virtual bool writeXML( QDomNode& layer_node, QDomDocument& doc ) const = 0;
00071 
00072   protected:
00074     QgsVectorLayer* mVectorLayer;
00075 
00077     bool mDisplayFlag;
00078 
00080     QgsAttributeList mAttributes;
00081 
00083     QMap<QgsFeatureId, QgsOverlayObject*> mOverlayObjects;
00084 
00087     QMap<int, QgsPoint> mPositionConstraints;
00088 
00089   private:
00091     QgsVectorOverlay();
00092 };
00093 
00094 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines