KGameCanvasAbstract Class Reference

#include <kgamecanvas.h>

Inheritance diagram for KGameCanvasAbstract:

Inheritance graph
[legend]

List of all members.

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.
KGameCanvasItemitemAt (const QPoint &pos) const
 Helper function to retrieve the topmost item at the given position.
KGameCanvasItemitemAt (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
 
Returns:
Position of the abstract canvas relative to the toplevel canvas.


Protected Attributes

QList
< KGameCanvasItem * > 
m_items
QList
< KGameCanvasItem * > 
m_animated_items

Friends

class KGameCanvasItem


Detailed Description

Container class.

A KGameCanvasAbstract is a set of canvas items.

Definition at line 52 of file kgamecanvas.h.


Constructor & Destructor Documentation

KGameCanvasAbstract::KGameCanvasAbstract (  ) 

The constructor.

Definition at line 50 of file kgamecanvas.cpp.

KGameCanvasAbstract::~KGameCanvasAbstract (  )  [virtual]

Definition at line 54 of file kgamecanvas.cpp.

References m_items.


Member Function Documentation

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().

Here is the call graph for this function:

KGameCanvasItem* KGameCanvasAbstract::itemAt ( int  x,
int  y 
) const [inline]

Overload, same as above.

Definition at line 73 of file kgamecanvas.h.

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().

Here is the call graph for this function:

QList<KGameCanvasItem*> KGameCanvasAbstract::itemsAt ( int  x,
int  y 
) const [inline]

Overload, same as above.

Definition at line 80 of file kgamecanvas.h.

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]

Returns:
Position of the abstract canvas relative to the toplevel canvas.

Implemented in KGameCanvasGroup, KGameCanvasWidget, and KGameCanvasAdapter.

Referenced by KGameCanvasItem::absolutePosition().


Friends And Related Function Documentation

friend class KGameCanvasItem [friend]

Reimplemented in KGameCanvasWidget.

Definition at line 55 of file kgamecanvas.h.


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 08:03:12 2008 for Libkdegames by  doxygen 1.5.3