20 #include <QDomDocument>    21 #include <QDomElement>    37   if ( documentElem.
isNull() )
    53   if ( !annotationElem.
isNull() )
    78     double renderWidth = 0;
    79     double renderHeight = 0;
    80     if ( widthRatio <= heightRatio )
   103   mSvgRenderer.
load( mFilePath );
 
void _readXML(const QDomDocument &doc, const QDomElement &annotationElem)
 
QDomNode appendChild(const QDomNode &newChild)
 
void render(QPainter *painter)
 
QString attribute(const QString &name, const QString &defValue) const
 
QPointF mOffsetFromReferencePoint
Describes the shift of the item content box to the reference point. 
 
void setFilePath(const QString &file)
 
QgsSvgAnnotationItem(QgsMapCanvas *canvas)
 
void writeXML(QDomDocument &doc) const override
 
void drawMarkerSymbol(QPainter *p) const
Draws the map position marker symbol to a destination painter. 
 
QDomElement documentElement() const
 
void drawSelectionBoxes(QPainter *p) const
Draws selection handles around the item. 
 
Map canvas is a class for displaying all GIS data types on a canvas. 
 
void readXML(const QDomDocument &doc, const QDomElement &itemElem) override
 
bool load(const QString &filename)
 
void setAttribute(const QString &name, const QString &value)
 
void _writeXML(QDomDocument &doc, QDomElement &itemElem) const
 
void paint(QPainter *painter) override
function to be implemented by derived classes 
 
An annotation item can be either placed either on screen corrdinates or on map coordinates. 
 
bool mMapPositionFixed
True: the item stays at the same map position, False: the item stays on same screen position...
 
QString readPath(QString filename, const QString &relativeBasePath=QString()) const
Turn filename read from the project file to an absolute path. 
 
static QgsProject * instance()
Returns the QgsProject singleton instance. 
 
QDomElement firstChildElement(const QString &tagName) const
 
QDomElement createElement(const QString &tagName)
 
QSizeF mFrameSize
Size of the frame (without balloon) 
 
void drawFrame(QPainter *p) const
Draws the annotation frame to a destination painter.