QGIS/python/core/annotations/qgshtmlannotation.sip
Nyall Dawson c22f5de690 Port annotation feature handling to QgsAnnotation
Not an ideal implementation (too much logic resides in the
gui QgsMapCanvasAnnotationItem class), but any approach
using current api will be dependant on some hacks.

Ideally we need a QgsVectorDataProvider method for finding
the closest feature(s) to a point(/line/polygon) within a
certain tolerance, with provider specific implementations
which offload this to the data store's spatial indices.
Then this handling could be bumped up to reside in
QgsAnnotation.
2017-01-30 08:39:47 +10:00

27 lines
641 B
Plaintext

class QgsHtmlAnnotation : QgsAnnotation
{
%TypeHeaderCode
#include <qgshtmlannotation.h>
%End
public:
QgsHtmlAnnotation( QObject* parent /TransferThis/ = nullptr );
~QgsHtmlAnnotation();
QSizeF minimumFrameSize() const;
void setSourceFile( const QString& htmlFile );
QString sourceFile() const;
virtual void writeXml( QDomElement& elem, QDomDocument & doc ) const;
virtual void readXml( const QDomElement& itemElem, const QDomDocument& doc );
virtual void setAssociatedFeature( const QgsFeature& feature );
protected:
void renderAnnotation( QgsRenderContext& context, QSizeF size ) const;
};