QgsVectorOverlay Class Reference

Base class for vector layer overlays (e.g. More...

#include <qgsvectoroverlay.h>

Collaboration diagram for QgsVectorOverlay:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 QgsVectorOverlay (QgsVectorLayer *vl)
virtual ~QgsVectorOverlay ()
virtual void createOverlayObjects (const QgsRenderContext &renderContext)=0
 Create the overlay objects contained in a view extent.
void removeOverlayObjects ()
 Remove the overlay objects and release their memory.
virtual void drawOverlayObjects (QgsRenderContext &context) const =0
 Draw the overlay objects.
QMap< int, QgsOverlayObject * > * overlayObjects ()
 Gives direct access to oberlay objects.
virtual QString typeName () const =0
 Describes the overlay type (e.g.
void setAttributes (const QgsAttributeList &list)
 Set attribute indices necessary to fetch.
bool displayFlag () const
void setDisplayFlag (bool flag)
 Display yes/no.
virtual bool readXML (const QDomNode &overlayNode)=0
 Restore from project file.
virtual bool writeXML (QDomNode &layer_node, QDomDocument &doc) const =0
 Save to project file.

Protected Attributes

QgsVectorLayermVectorLayer
 Pointer to the vector layer for this overlay.
bool mDisplayFlag
 True if overlay should be displayed.
QgsAttributeList mAttributes
 A list with attribute indexes that are needed for overlay rendering.
QMap< int, QgsOverlayObject * > mOverlayObjects
 Key: feature ids, value: the corresponding overlay objects.
QMap< int, QgsPointmPositionConstraints
 Position constraints that may be set to be persistent after redraws.

Private Member Functions

 QgsVectorOverlay ()
 Default constructor forbidden.


Detailed Description

Base class for vector layer overlays (e.g.

diagrams, labels, etc.). For each object, the position of the bounding box is stored in a QgsOverlayObject. The vector overlays are drawn on top of all layers.

Note:
This class has been added in version 1.1

Definition at line 33 of file qgsvectoroverlay.h.


Constructor & Destructor Documentation

QgsVectorOverlay::QgsVectorOverlay ( QgsVectorLayer vl  ) 

Definition at line 21 of file qgsvectoroverlay.cpp.

QgsVectorOverlay::~QgsVectorOverlay (  )  [virtual]

Definition at line 26 of file qgsvectoroverlay.cpp.

QgsVectorOverlay::QgsVectorOverlay (  )  [private]

Default constructor forbidden.


Member Function Documentation

virtual void QgsVectorOverlay::createOverlayObjects ( const QgsRenderContext renderContext  )  [pure virtual]

Create the overlay objects contained in a view extent.

Subclasses need to implement this method and assign width/height information to the overlay objects

void QgsVectorOverlay::removeOverlayObjects (  ) 

Remove the overlay objects and release their memory.

Definition at line 31 of file qgsvectoroverlay.cpp.

References mOverlayObjects.

virtual void QgsVectorOverlay::drawOverlayObjects ( QgsRenderContext context  )  const [pure virtual]

Draw the overlay objects.

QMap<int, QgsOverlayObject*>* QgsVectorOverlay::overlayObjects (  )  [inline]

Gives direct access to oberlay objects.

Definition at line 53 of file qgsvectoroverlay.h.

Referenced by QgsCentralPointPositionManager::findObjectPositions().

virtual QString QgsVectorOverlay::typeName (  )  const [pure virtual]

Describes the overlay type (e.g.

"diagram" or "label")

void QgsVectorOverlay::setAttributes ( const QgsAttributeList list  )  [inline]

Set attribute indices necessary to fetch.

Definition at line 59 of file qgsvectoroverlay.h.

bool QgsVectorOverlay::displayFlag (  )  const [inline]

Definition at line 61 of file qgsvectoroverlay.h.

void QgsVectorOverlay::setDisplayFlag ( bool  flag  )  [inline]

Display yes/no.

Definition at line 64 of file qgsvectoroverlay.h.

virtual bool QgsVectorOverlay::readXML ( const QDomNode &  overlayNode  )  [pure virtual]

Restore from project file.

virtual bool QgsVectorOverlay::writeXML ( QDomNode &  layer_node,
QDomDocument &  doc 
) const [pure virtual]

Save to project file.


Member Data Documentation

Pointer to the vector layer for this overlay.

Definition at line 74 of file qgsvectoroverlay.h.

True if overlay should be displayed.

Definition at line 77 of file qgsvectoroverlay.h.

A list with attribute indexes that are needed for overlay rendering.

Definition at line 80 of file qgsvectoroverlay.h.

Key: feature ids, value: the corresponding overlay objects.

Normally, they are created for each redraw and deleted before the next redraw

Definition at line 83 of file qgsvectoroverlay.h.

Referenced by removeOverlayObjects().

Position constraints that may be set to be persistent after redraws.

Key is the feature id, value the map point where the feature should be placed

Definition at line 87 of file qgsvectoroverlay.h.


The documentation for this class was generated from the following files:

Generated on Sat Feb 4 19:17:58 2012 for Quantum GIS API Documentation by  doxygen 1.5.6