#include <kgamecanvas.h>

Public Member Functions | |
| KGameCanvasAbstract () | |
| The constructor. | |
| virtual | ~KGameCanvasAbstract () |
| const QList < KGameCanvasItem * > * | items () const |
| Returns a const pointer to the list holding all the items in the canvas. | |
| KGameCanvasItem * | itemAt (const QPoint &pos) const |
| Helper function to retrieve the topmost item at the given position. | |
| KGameCanvasItem * | itemAt (int x, int y) const |
| Overload, same as above. | |
| QList < KGameCanvasItem * > | itemsAt (const QPoint &pos) const |
| Helper function to retrieve all the items at the given position, starting from the topmost one. | |
| QList < KGameCanvasItem * > | itemsAt (int x, int y) const |
| Overload, same as above. | |
| virtual void | ensureAnimating ()=0 |
| Virtual function to let know the canvas that it has animated items in it. | |
| virtual void | ensurePendingUpdate ()=0 |
| Virtual function to ensure an update is pending, called from children. | |
| virtual void | invalidate (const QRect &r, bool translate=true)=0 |
| Virtual function to update a rect. | |
| virtual void | invalidate (const QRegion &r, bool translate=true)=0 |
| Virtual function to update a region. | |
| virtual class KGameCanvasWidget * | topLevelCanvas ()=0 |
| Returns the toplevel non-group KGameCanvasWidget object. | |
| virtual QPoint | canvasPosition () const =0 |
| |
Protected Attributes | |
| QList < KGameCanvasItem * > | m_items |
| QList < KGameCanvasItem * > | m_animated_items |
Friends | |
| class | KGameCanvasItem |
A KGameCanvasAbstract is a set of canvas items.
Definition at line 52 of file kgamecanvas.h.
| KGameCanvasAbstract::KGameCanvasAbstract | ( | ) |
| KGameCanvasAbstract::~KGameCanvasAbstract | ( | ) | [virtual] |
| const QList<KGameCanvasItem*>* KGameCanvasAbstract::items | ( | ) | const [inline] |
Returns a const pointer to the list holding all the items in the canvas.
Definition at line 67 of file kgamecanvas.h.
| KGameCanvasItem * KGameCanvasAbstract::itemAt | ( | const QPoint & | pos | ) | const |
Helper function to retrieve the topmost item at the given position.
Definition at line 60 of file kgamecanvas.cpp.
References m_items, KGameCanvasItem::m_visible, and KGameCanvasItem::rect().

| KGameCanvasItem* KGameCanvasAbstract::itemAt | ( | int | x, | |
| int | y | |||
| ) | const [inline] |
| QList< KGameCanvasItem * > KGameCanvasAbstract::itemsAt | ( | const QPoint & | pos | ) | const |
Helper function to retrieve all the items at the given position, starting from the topmost one.
Definition at line 69 of file kgamecanvas.cpp.
References m_items, KGameCanvasItem::m_visible, and KGameCanvasItem::rect().

| QList<KGameCanvasItem*> KGameCanvasAbstract::itemsAt | ( | int | x, | |
| int | y | |||
| ) | const [inline] |
| virtual void KGameCanvasAbstract::ensureAnimating | ( | ) | [pure virtual] |
Virtual function to let know the canvas that it has animated items in it.
Referenced by KGameCanvasItem::putInCanvas(), and KGameCanvasItem::setAnimated().
| virtual void KGameCanvasAbstract::ensurePendingUpdate | ( | ) | [pure virtual] |
Virtual function to ensure an update is pending, called from children.
Referenced by KGameCanvasItem::changed().
| virtual void KGameCanvasAbstract::invalidate | ( | const QRect & | r, | |
| bool | translate = true | |||
| ) | [pure virtual] |
Virtual function to update a rect.
Referenced by KGameCanvasItem::putInCanvas(), KGameCanvasItem::setVisible(), and KGameCanvasItem::~KGameCanvasItem().
| virtual void KGameCanvasAbstract::invalidate | ( | const QRegion & | r, | |
| bool | translate = true | |||
| ) | [pure virtual] |
Virtual function to update a region.
| virtual class KGameCanvasWidget* KGameCanvasAbstract::topLevelCanvas | ( | ) | [pure virtual] |
Returns the toplevel non-group KGameCanvasWidget object.
Implemented in KGameCanvasGroup, KGameCanvasWidget, and KGameCanvasAdapter.
| virtual QPoint KGameCanvasAbstract::canvasPosition | ( | ) | const [pure virtual] |
Implemented in KGameCanvasGroup, KGameCanvasWidget, and KGameCanvasAdapter.
Referenced by KGameCanvasItem::absolutePosition().
friend class KGameCanvasItem [friend] |
QList<KGameCanvasItem*> KGameCanvasAbstract::m_items [protected] |
Definition at line 57 of file kgamecanvas.h.
Referenced by itemAt(), itemsAt(), KGameCanvasItem::KGameCanvasItem(), KGameCanvasItem::lower(), KGameCanvasItem::putInCanvas(), KGameCanvasItem::raise(), KGameCanvasGroup::rect(), KGameCanvasAdapter::render(), KGameCanvasItem::stackOver(), KGameCanvasItem::stackUnder(), ~KGameCanvasAbstract(), and KGameCanvasItem::~KGameCanvasItem().
QList<KGameCanvasItem*> KGameCanvasAbstract::m_animated_items [protected] |
Definition at line 58 of file kgamecanvas.h.
Referenced by KGameCanvasGroup::advance(), KGameCanvasItem::putInCanvas(), KGameCanvasItem::setAnimated(), and KGameCanvasItem::~KGameCanvasItem().
1.5.3