5#if !defined(QT_NO_GRAPHICSVIEW)
12#include <QtCore/private/qobject_p.h>
13#include <QtWidgets/private/qgraphicsitem_p.h>
35 q->setMaximumCacheSize(
QSize(1024, 768));
52 q_func()->prepareGeometryChange();
120 d->updateDefaultSize();
128 return d_func()->renderer;
138 return d->boundingRect;
155 if (!
d->renderer->isValid())
158 if (
d->elemId.isEmpty())
159 d->renderer->render(
painter,
d->boundingRect);
161 d->renderer->render(
painter,
d->elemId,
d->boundingRect);
235 d->updateDefaultSize();
266 d->updateDefaultSize();
294#include "moc_qgraphicssvgitem.cpp"
QVariant extra(Extra type) const
@ ExtraMaxDeviceCoordCacheSize
void setExtra(Extra type, const QVariant &value)
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
QScopedPointer< QGraphicsItemPrivate > d_ptr
void update(const QRectF &rect=QRectF())
Schedules a redraw of the area covered by rect in this item.
CacheMode cacheMode() const
void setCacheMode(CacheMode mode, const QSize &cacheSize=QSize())
The QGraphicsObject class provides a base class for all graphics items that require signals,...
QGraphicsObject * parent
the parent of the item
void init(QGraphicsItem *parent)
void setCachingEnabled(bool)
void setElementId(const QString &id)
Sets the XML ID of the element to id.
bool isCachingEnabled() const
QSvgRenderer * renderer() const
Returns the currently use QSvgRenderer.
QGraphicsSvgItem(QGraphicsItem *parentItem=nullptr)
Constructs a new SVG item with the given parent.
void setMaximumCacheSize(const QSize &size)
Sets the maximum device coordinate cache size of the item to size.
void setSharedRenderer(QSvgRenderer *renderer)
Sets renderer to be a shared QSvgRenderer on the item.
QRectF boundingRect() const override
Returns the bounding rectangle of this item.
int type() const override
\reimp
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) override
\reimp
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
The QPainter class performs low-level painting on widgets and other paint devices.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr void setSize(const QSizeF &s) noexcept
Sets the size of the rectangle to the given finite size.
constexpr QSizeF size() const noexcept
Returns the size of the rectangle.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
QRectF boundsOnElement(const QString &id) const
QSize defaultSize() const
Returns the default size of the document contents.
QSize toSize() const
Returns the variant as a QSize if the variant has userType() \l QMetaType::QSize; otherwise returns a...
Combined button and popup list for selecting options.
void Q_WIDGETS_EXPORT qt_graphicsItem_highlightSelected(QGraphicsItem *item, QPainter *painter, const QStyleOptionGraphicsItem *option)
void Q_WIDGETS_EXPORT qt_graphicsItem_highlightSelected(QGraphicsItem *item, QPainter *painter, const QStyleOptionGraphicsItem *option)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLdouble GLdouble GLdouble GLdouble q
QSvgRenderer * renderer
[0]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent