QGIS/python/core/annotations/qgshtmlannotation.sip
Nyall Dawson aa14926ca8 Move map layer association for annotations to QgsAnnotation
Previously only some annotations had (incomplete) support for
attaching to a particular vector layer and synchronising their
visibility with the layer's visibility.

This handling has all been moved up to QgsAnnotation, so that
all annotation types can be attached to layers.

This will allow selective annotation visibility based on the
visible layers of a particular canvas, eg in multi-canvas
environments.

Additionally:
- show the attached layer in the annotation properties
dialog, and allow it to be cleared to always show the
annotation
- allow attaching annotations to non-vector layers
- add unit tests for visibility
2017-01-30 08:36:20 +10:00

25 lines
572 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 );
protected:
void renderAnnotation( QgsRenderContext& context, QSizeF size ) const;
};