#include <qgsvectoroverlay.h>
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 | |
QgsVectorLayer * | mVectorLayer |
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, QgsPoint > | mPositionConstraints |
Position constraints that may be set to be persistent after redraws. | |
Private Member Functions | |
QgsVectorOverlay () | |
Default constructor forbidden. |
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.
Definition at line 33 of file qgsvectoroverlay.h.
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.
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] |
bool QgsVectorOverlay::displayFlag | ( | ) | const [inline] |
Definition at line 61 of file qgsvectoroverlay.h.
void QgsVectorOverlay::setDisplayFlag | ( | bool | flag | ) | [inline] |
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.
QgsVectorLayer* QgsVectorOverlay::mVectorLayer [protected] |
bool QgsVectorOverlay::mDisplayFlag [protected] |
QgsAttributeList QgsVectorOverlay::mAttributes [protected] |
A list with attribute indexes that are needed for overlay rendering.
Definition at line 80 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.