KDEGames
kgamerenderedgraphicsobject.h
52class KDEGAMES_EXPORT KGameRenderedGraphicsObject : public QGraphicsObject, public KGameRendererClient
60 KGameRenderedGraphicsObject(KGameGraphicsViewRenderer *renderer, const QString &spriteKey, QGraphicsItem *parent = nullptr);
96 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
void setFixedSize(QSizeF size)
Sets the fixed size of this item, i.e.
Definition kgamerenderedgraphicsobject.cpp:124
void setPrimaryView(QGraphicsView *view)
Sets the primary view of this item.
Definition kgamerenderedgraphicsobject.cpp:141
QSizeF fixedSize() const
Definition kgamerenderedgraphicsobject.cpp:117
void setOffset(QPointF offset)
Sets the item's offset, which defines the point of the top-left corner of the bounding rect,...
Definition kgamerenderedgraphicsobject.cpp:101
QGraphicsView * primaryView() const
Returns a pointer to the current primary view, or 0 if no primary view has been set (which is the def...
Definition kgamerenderedgraphicsobject.cpp:134
KGameRenderedGraphicsObject(KGameGraphicsViewRenderer *renderer, const QString &spriteKey, QGraphicsItem *parent=nullptr)
Creates a new KGameRenderedGraphicsObject which renders the sprite with the given spriteKey as provid...
Definition kgamerenderedgraphicsobject.cpp:84
QPointF offset() const
Definition kgamerenderedgraphicsobject.cpp:94
KGameRendererClient(KGameRenderer *renderer, const QString &spriteKey)
Creates a new client which receives pixmaps for the sprite with the given spriteKey as provided by th...
Definition kgamerendererclient.cpp:22
virtual void receivePixmap(const QPixmap &pixmap)=0
This method is called when the KGameRenderer has provided a new pixmap for this client (esp.
void setFrame(int frame)
For animated sprites, render another frame.
Definition kgamerendererclient.cpp:77
QGraphicsItem(QGraphicsItem *parent)
virtual QRectF boundingRect() const const=0
virtual bool contains(const QPointF &point) const const
virtual bool isObscuredBy(const QGraphicsItem *item) const const
virtual QPainterPath opaqueArea() const const
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)=0
virtual QPainterPath shape() const const
QGraphicsObject(QGraphicsItem *parent)
parent
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:53:12 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:53:12 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.