libkdegames
kgamerenderedobjectitem.cpp
Go to the documentation of this file.
29 bool adjustRenderSize(); //returns whether an adjustment was made; WARNING: only call when m_primaryView != 0
36 virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
88 t.scale(m_fixedSize.width() / m_correctRenderSize.width(), m_fixedSize.height() / m_correctRenderSize.height());
95 KGameRenderedObjectItem::KGameRenderedObjectItem(KGameRenderer* renderer, const QString& spriteKey, QGraphicsItem* parent)
214 void KGameRenderedObjectItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
244 void KGameRenderedObjectItemPrivate::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
void setTransform(const QTransform &transform, bool combine)
int width() const
virtual void receivePixmap(const QPixmap &pixmap)
This method is called when the KGameRenderer has provided a new pixmap for this client (esp...
Definition: kgamerenderedobjectitem.cpp:173
virtual ~KGameRenderedObjectItem()
Definition: kgamerenderedobjectitem.cpp:103
QPoint map(const QPoint &point) const
KGameRenderedObjectItem(KGameRenderer *renderer, const QString &spriteKey, QGraphicsItem *parent=0)
Creates a new KGameRenderedObjectItem which renders the sprite with the given spriteKey as provided b...
Definition: kgamerenderedobjectitem.cpp:95
A QGraphicsObject which displays pixmaps from a KGameRenderer.
Definition: kgamerenderedobjectitem.h:60
void setFixedSize(const QSizeF &size)
Sets the fixed size of this item, i.e.
Definition: kgamerenderedobjectitem.cpp:133
QSizeF fixedSize() const
Definition: kgamerenderedobjectitem.cpp:128
void save()
const QTransform & transform() const
QSizeF expandedTo(const QSizeF &otherSize) const
bool isAncestorOf(const QWidget *child) const
void update(const QRectF &rect)
qreal x() const
qreal y() const
QTransform & scale(qreal sx, qreal sy)
virtual bool isObscuredBy(const QGraphicsItem *item) const
QGraphicsView * defaultPrimaryView() const
Definition: kgamerenderer.cpp:101
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
QPointF topLeft() const
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
virtual bool contains(const QPointF &point) const
QPointF topRight() const
virtual bool isObscuredBy(const QGraphicsItem *item) const
Definition: kgamerenderedobjectitem.cpp:204
void prepareGeometryChange()
virtual QRectF boundingRect() const
Definition: kgamerenderedobjectitem.cpp:194
void restore()
An object that receives pixmaps from a KGameRenderer.
Definition: kgamerendererclient.h:50
bool isRotating() const
virtual bool contains(const QPointF &point) const
Definition: kgamerenderedobjectitem.cpp:199
virtual QPainterPath opaqueArea() const
virtual QPainterPath shape() const
virtual QPainterPath shape() const
Definition: kgamerenderedobjectitem.cpp:219
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: kgamerenderedobjectitem.cpp:142
QPointF bottomLeft() const
int height() const
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: kgamerenderedobjectitem.cpp:214
void setPrimaryView(QGraphicsView *view)
Sets the primary view of this item.
Definition: kgamerenderedobjectitem.cpp:147
void setOffset(const QPointF &offset)
Sets the item's offset, which defines the point of the top-left corner of the bounding rect...
Definition: kgamerenderedobjectitem.cpp:113
virtual QPainterPath opaqueArea() const
Definition: kgamerenderedobjectitem.cpp:209
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.