17 #ifndef QGSCOMPOSERPICTURE_H
18 #define QGSCOMPOSERPICTURE_H
23 #include <QSvgRenderer>
63 void paint( QPainter* painter,
const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget )
override;
72 Q_DECL_DEPRECATED
void setPictureFile(
const QString& path );
81 Q_DECL_DEPRECATED QString pictureFile()
const;
91 void setPicturePath(
const QString& path );
100 QString picturePath()
const;
111 bool writeXML( QDomElement& elem, QDomDocument & doc )
const override;
117 bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc )
override;
122 Q_DECL_DEPRECATED
double rotation()
const {
return mPictureRotation; }
140 void setRotationMap(
int composerMapId );
149 int rotationMap()
const;
191 Q_DECL_DEPRECATED
bool usePictureExpression()
const;
201 Q_DECL_DEPRECATED QString pictureExpression()
const;
240 virtual void setPictureRotation(
double r );
247 virtual void setResizeMode( ResizeMode mode );
258 virtual void setUsePictureExpression(
bool useExpression );
268 virtual void setPictureExpression( QString expression );
274 void refreshPicture();
286 void recalculateSize();
292 void pictureRotationChanged(
double newRotation );
299 QRectF boundedSVGRect(
double deviceWidth,
double deviceHeight );
301 QRectF boundedImageRect(
double deviceWidth,
double deviceHeight );
304 QSizeF pictureSize();
311 QSize mDefaultSvgSize;
314 double mPictureRotation;
318 double mPictureWidth;
320 double mPictureHeight;
322 ResizeMode mResizeMode;
325 bool mHasExpressionError;
329 void loadPicture(
const QString &path );
337 QRect clippedImageRect(
double &boundRectWidthMM,
double &boundRectHeightMM, QSize imageRectPixels );
341 void loadRemotePicture(
const QString &url );
345 void loadLocalPicture(
const QString &path );
349 void remotePictureLoaded();