2009-05-14 15:58:24 +00:00
|
|
|
class QgsVectorOverlay
|
2009-04-08 09:59:33 +00:00
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsvectoroverlay.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
QgsVectorOverlay( QgsVectorLayer* vl );
|
|
|
|
virtual ~QgsVectorOverlay();
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/**Create the overlay objects contained in a view extent. Subclasses need
|
|
|
|
* to implement this method and assign width/height information to the
|
|
|
|
* overlay objects
|
|
|
|
*/
|
2009-04-08 09:59:33 +00:00
|
|
|
|
|
|
|
virtual void createOverlayObjects( const QgsRenderContext& renderContext ) = 0;
|
|
|
|
|
|
|
|
/**Remove the overlay objects and release their memory*/
|
|
|
|
void removeOverlayObjects();
|
|
|
|
|
|
|
|
/**Draw the overlay objects*/
|
|
|
|
virtual void drawOverlayObjects( QgsRenderContext& context ) const = 0;
|
|
|
|
|
|
|
|
/**Gives direct access to oberlay objects*/
|
2011-06-16 02:24:26 +02:00
|
|
|
QMap<qint64, QgsOverlayObject*>* overlayObjects();
|
2009-04-08 09:59:33 +00:00
|
|
|
|
|
|
|
/**Describes the overlay type (e.g. "diagram" or "label")*/
|
|
|
|
virtual QString typeName() const = 0;
|
|
|
|
|
|
|
|
/**Set attribute indices necessary to fetch*/
|
2009-05-14 15:58:24 +00:00
|
|
|
void setAttributes( const QList<int>& list );
|
2009-04-08 09:59:33 +00:00
|
|
|
|
2009-05-14 15:58:24 +00:00
|
|
|
bool displayFlag() const;
|
2009-04-08 09:59:33 +00:00
|
|
|
|
|
|
|
/**Display yes/no*/
|
2009-05-14 15:58:24 +00:00
|
|
|
void setDisplayFlag( bool flag );
|
2009-04-08 09:59:33 +00:00
|
|
|
|
|
|
|
/**Restore from project file*/
|
|
|
|
virtual bool readXML( const QDomNode& overlayNode ) = 0;
|
|
|
|
|
|
|
|
/**Save to project file*/
|
|
|
|
virtual bool writeXML( QDomNode& layer_node, QDomDocument& doc ) const = 0;
|
|
|
|
};
|