libkdegames/libkdegamesprivate
kgamecanvas.cpp
Go to the documentation of this file.
698 KGameCanvasRenderedPixmap::KGameCanvasRenderedPixmap(KGameRenderer* renderer, const QString& spriteKey, KGameCanvasAbstract* canvas)
712 KGameCanvasTiledPixmap::KGameCanvasTiledPixmap(const QPixmap& pixmap, const QSize &size, const QPoint &origin,
781 KGameCanvasRectangle::KGameCanvasRectangle(const QColor& color, const QSize &size, KGameCanvasAbstract* KGameCanvas)
void stackUnder(KGameCanvasItem *ref)
Restacks the item immediately under ref.
Definition: kgamecanvas.cpp:473
virtual QRect rect() const
Override this function to return the rect the item will be drawn into.
Definition: kgamecanvas.cpp:694
virtual QRect rect() const
Override this function to return the rect the item will be drawn into.
Definition: kgamecanvas.cpp:819
virtual void paint(QPainter *p)
Override this function to draw the item with the painter.
Definition: kgamecanvas.cpp:690
virtual void paint(QPainter *p)
Override this function to draw the item with the painter.
Definition: kgamecanvas.cpp:815
void setMoveOrigin(bool move_orig)
Sets if the origin of the brush will be moved with the pixmap.
Definition: kgamecanvas.cpp:755
void setAnimationDelay(int d)
Set the delay of the animation, in milliseconds.
Definition: kgamecanvas.cpp:215
Definition: kgamecanvas.h:505
virtual QRect rect() const
This returns the bouding rect of all children.
Definition: kgamecanvas.cpp:618
KGameCanvasPixmap(const QPixmap &pixmap, KGameCanvasAbstract *canvas=NULL)
Constructor, specifying the pixmap to use.
Definition: kgamecanvas.cpp:670
virtual void paint(QPainter *p)
Override this function to draw the item with the painter.
Definition: kgamecanvas.cpp:927
Definition: kgamecanvas.h:497
virtual void ensurePendingUpdate()=0
Virtual function to ensure an update is pending, called from children.
QList< KGameCanvasItem * > itemsAt(const QPoint &pos) const
Helper function to retrieve all the items at the given position, starting from the topmost one...
Definition: kgamecanvas.cpp:69
QList< KGameCanvasItem * > m_animated_items
Definition: kgamecanvas.h:61
virtual QRect rect() const
Override this function to return the rect the item will be drawn into.
Definition: kgamecanvas.cpp:772
KGameCanvasTiledPixmap(const QPixmap &pixmap, const QSize &size, const QPoint &origin, bool move_orig, KGameCanvasAbstract *canvas=NULL)
Constructor, specifying the pixmap and the parameters to use.
Definition: kgamecanvas.cpp:712
virtual void paint(QPainter *p)=0
Override this function to draw the item with the painter.
KGameCanvasWidget * topLevelCanvas()
returns the toplevel canvas (or null if it is in an orphan tree)
Definition: kgamecanvas.cpp:635
virtual bool layered() const
Override this function to specify if the painting operations will paint over each other...
Definition: kgamecanvas.cpp:400
int mSecs()
Return the number of millisecons from the creation of the canvas (see also KGameCanvasItem::advance) ...
Definition: kgamecanvas.cpp:219
KGameCanvasAbstract * canvas() const
Returns the canvas that is actually "owning" the item.
Definition: kgamecanvas.h:192
Definition: kgamecanvas.h:506
Definition: kgamecanvas.h:495
KGameCanvasItem * itemAt(const QPoint &pos) const
Helper function to retrieve the topmost item at the given position.
Definition: kgamecanvas.cpp:60
virtual void paint(QPainter *p)
This function does nothing (of course)
Definition: kgamecanvas.cpp:658
virtual void advance(int msecs)
Animations step, updates the animation for the children.
Definition: kgamecanvas.cpp:577
virtual void paint(QPainter *p)
Override this function to draw the item with the painter.
Definition: kgamecanvas.cpp:764
KGameCanvasText(const QString &text, const QColor &color, const QFont &font, HPos hp, VPos vp, KGameCanvasAbstract *canvas=NULL)
Constructor, specifying the text and the parameters to use.
Definition: kgamecanvas.cpp:827
virtual void paint(QPainter *p)
Override this function to draw the item with the painter.
Definition: kgamecanvas.cpp:966
Definition: kgamecanvas.h:507
KGameCanvasRectangle(const QColor &color, const QSize &size, KGameCanvasAbstract *canvas=NULL)
Constructor, specifying the pixmap and the parameters to use.
Definition: kgamecanvas.cpp:781
virtual ~KGameCanvasTiledPixmap()
Definition: kgamecanvas.cpp:730
void stackOver(KGameCanvasItem *ref)
Restacks the item immediately over ref.
Definition: kgamecanvas.cpp:449
virtual ~KGameCanvasAbstract()
Definition: kgamecanvas.cpp:54
virtual QPoint canvasPosition() const
Definition: kgamecanvas.cpp:227
void putInCanvas(KGameCanvasAbstract *canvas)
Lets you specify the owning canvas.
Definition: kgamecanvas.cpp:336
KGameCanvasPicture(const QPicture &picture, KGameCanvasAbstract *canvas=NULL)
Constructor, specifying the picture to use.
Definition: kgamecanvas.cpp:941
virtual void invalidate(const QRect &r, bool translate=true)=0
Virtual function to update a rect.
Definition: kgamecanvas.h:496
Definition: kgamecanvas.h:494
KGameCanvasRenderedPixmap(KGameRenderer *renderer, const QString &spriteKey, KGameCanvasAbstract *canvas=0)
Definition: kgamecanvas.cpp:698
virtual void advance(int msecs)
Override this function to handle animations, the default function does nothing.
Definition: kgamecanvas.cpp:402
virtual QRect rect() const =0
Override this function to return the rect the item will be drawn into.
void setOpacity(int o)
Set the item's opacity value (int the 0-255 range)
Definition: kgamecanvas.cpp:391
virtual void ensureAnimating()=0
Virtual function to let know the canvas that it has animated items in it.
virtual QPoint canvasPosition() const =0
KGameCanvasItem(KGameCanvasAbstract *canvas=NULL)
Constructor, it allows you to specify the reference canvas or to create an orphan item that will be p...
Definition: kgamecanvas.cpp:234
virtual QRect rect() const
Override this function to return the rect the item will be drawn into.
Definition: kgamecanvas.cpp:933
virtual QPoint canvasPosition() const
Definition: kgamecanvas.cpp:640
virtual void receivePixmap(const QPixmap &pixmap)
Definition: kgamecanvas.cpp:704
virtual QRect rect() const
Override this function to return the rect the item will be drawn into.
Definition: kgamecanvas.cpp:971
virtual void updateParent(const QRect &rect)=0
Notify the parent that the adapter content inside rect needs to be redrawn.
virtual ~KGameCanvasRectangle()
Definition: kgamecanvas.cpp:796
virtual void render(QPainter *p)
Draw the items of the adapter using the specified painter.
Definition: kgamecanvas.cpp:994
void setPicture(const QPicture &picture)
Sets the picture of the sprite.
Definition: kgamecanvas.cpp:958
Definition: kgamecanvas.h:504
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:44:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:44:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.