Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | Private Member Functions
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

bool QgsVectorOverlay::displayFlag ( ) const
inline

Definition at line 61 of file qgsvectoroverlay.h.

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 bool QgsVectorOverlay::readXML ( const QDomNode &  overlayNode)
pure virtual

Restore from project file.

void QgsVectorOverlay::removeOverlayObjects ( )

Remove the overlay objects and release their memory.

Definition at line 31 of file qgsvectoroverlay.cpp.

References mOverlayObjects.

void QgsVectorOverlay::setAttributes ( const QgsAttributeList list)
inline

Set attribute indices necessary to fetch.

Definition at line 59 of file qgsvectoroverlay.h.

void QgsVectorOverlay::setDisplayFlag ( bool  flag)
inline

Display yes/no.

Definition at line 64 of file qgsvectoroverlay.h.

virtual QString QgsVectorOverlay::typeName ( ) const
pure virtual

Describes the overlay type (e.g.

"diagram" or "label")

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

Save to project file.


Member Data Documentation

QgsAttributeList QgsVectorOverlay::mAttributes
protected

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

Definition at line 80 of file qgsvectoroverlay.h.

bool QgsVectorOverlay::mDisplayFlag
protected

True if overlay should be displayed.

Definition at line 77 of file qgsvectoroverlay.h.

QMap<int, QgsOverlayObject*> QgsVectorOverlay::mOverlayObjects
protected

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().

QMap<int, QgsPoint> QgsVectorOverlay::mPositionConstraints
protected

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.

QgsVectorLayer* QgsVectorOverlay::mVectorLayer
protected

Pointer to the vector layer for this overlay.

Definition at line 74 of file qgsvectoroverlay.h.


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