KGameCanvasAbstract

Search for usage in LXR

KGameCanvasAbstract Class Referenceabstract

#include <KGameCanvas>

Inheritance diagram for KGameCanvasAbstract:

Public Member Functions

 KGameCanvasAbstract ()
 
virtual QPoint canvasPosition () const =0
 
virtual void ensureAnimating ()=0
 
virtual void ensurePendingUpdate ()=0
 
virtual void invalidate (const QRect &r, bool translate=true)=0
 
virtual void invalidate (const QRegion &r, bool translate=true)=0
 
KGameCanvasItemitemAt (const QPoint &pos) const
 
KGameCanvasItemitemAt (int x, int y) const
 
const QList< KGameCanvasItem * > * items () const
 
QList< KGameCanvasItem * > itemsAt (const QPoint &pos) const
 
QList< KGameCanvasItem * > itemsAt (int x, int y) const
 
virtual class KGameCanvasWidgettopLevelCanvas ()=0
 

Protected Attributes

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

Detailed Description

Container class.

A KGameCanvasAbstract is a set of canvas items.

Deprecated:
For new applications, use Qt's Graphics View framework or Qt Quick.

Definition at line 37 of file kgamecanvas.h.

Constructor & Destructor Documentation

◆ KGameCanvasAbstract()

KGameCanvasAbstract::KGameCanvasAbstract ( )

The constructor.

Definition at line 32 of file kgamecanvas.cpp.

Member Function Documentation

◆ canvasPosition()

virtual QPoint KGameCanvasAbstract::canvasPosition ( ) const
pure virtual
Returns
Position of the abstract canvas relative to the toplevel canvas.

Implemented in KGameCanvasAdapter, KGameCanvasWidget, and KGameCanvasGroup.

◆ ensureAnimating()

virtual void KGameCanvasAbstract::ensureAnimating ( )
pure virtual

Virtual function to let know the canvas that it has animated items in it.

◆ ensurePendingUpdate()

virtual void KGameCanvasAbstract::ensurePendingUpdate ( )
pure virtual

Virtual function to ensure an update is pending, called from children.

◆ invalidate() [1/2]

virtual void KGameCanvasAbstract::invalidate ( const QRect r,
bool  translate = true 
)
pure virtual

Virtual function to update a rect.

◆ invalidate() [2/2]

virtual void KGameCanvasAbstract::invalidate ( const QRegion r,
bool  translate = true 
)
pure virtual

Virtual function to update a region.

◆ itemAt() [1/2]

KGameCanvasItem * KGameCanvasAbstract::itemAt ( const QPoint pos) const

Helper function to retrieve the topmost item at the given position.

Definition at line 43 of file kgamecanvas.cpp.

◆ itemAt() [2/2]

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

Overload, same as above.

Definition at line 61 of file kgamecanvas.h.

◆ items()

const QList<KGameCanvasItem *>* KGameCanvasAbstract::items ( ) const
inline

Returns a const pointer to the list holding all the items in the canvas.

Definition at line 52 of file kgamecanvas.h.

◆ itemsAt() [1/2]

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 53 of file kgamecanvas.cpp.

◆ itemsAt() [2/2]

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

Overload, same as above.

Definition at line 71 of file kgamecanvas.h.

◆ topLevelCanvas()

virtual class KGameCanvasWidget* KGameCanvasAbstract::topLevelCanvas ( )
pure virtual

Returns the toplevel non-group KGameCanvasWidget object.

Implemented in KGameCanvasAdapter, KGameCanvasWidget, and KGameCanvasGroup.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Dec 4 2022 03:50:22 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.