23 Q_INTERFACES(QGraphicsItem)
24 Q_PROPERTY(QString elementId READ elementId WRITE setElementId)
25 Q_PROPERTY(QSize maximumCacheSize READ maximumCacheSize WRITE setMaximumCacheSize)
28 QGraphicsSvgItem(QGraphicsItem *parentItem =
nullptr);
29 QGraphicsSvgItem(
const QString &fileName, QGraphicsItem *parentItem =
nullptr);
30 ~QGraphicsSvgItem() override;
32 void setSharedRenderer(QSvgRenderer *renderer);
33 QSvgRenderer *renderer()
const;
35 void setElementId(
const QString &id);
36 QString elementId()
const;
38 void setCachingEnabled(
bool);
39 bool isCachingEnabled()
const;
41 void setMaximumCacheSize(
const QSize &size);
42 QSize maximumCacheSize()
const;
44 QRectF boundingRect()
const override;
46 void paint(QPainter *painter,
47 const QStyleOptionGraphicsItem *option,
48 QWidget *widget =
nullptr) override;
51 int type()
const override;
54 Q_DISABLE_COPY(QGraphicsSvgItem)
55 Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QGraphicsSvgItem)
57 Q_PRIVATE_SLOT(d_func(),
void _q_repaintItem())