mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-04 00:30:59 -05:00
This commit implements a new QgsAnnotationManager class, which handles storage, writing and retrieval of annotations. QgsProject has an annotationManager() attached to it. Map canvases sync their visible QgsMapCanvasAnnotationItems to the annotations contained within the project's annotation manager. This moves all management, storage and retrieval of annotations up to core and out of app/canvas.
29 lines
692 B
Plaintext
29 lines
692 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 );
|
|
|
|
static QgsHtmlAnnotation* create() /Factory/;
|
|
|
|
protected:
|
|
|
|
void renderAnnotation( QgsRenderContext& context, QSizeF size ) const;
|
|
|
|
};
|