Search for usage in LXR

KGameCanvasGroup Class Reference

#include <KGameCanvas>

Inheritance diagram for KGameCanvasGroup:

Public Member Functions

 KGameCanvasGroup (KGameCanvasAbstract *canvas=nullptr)
void advance (int msecs) override
QPoint canvasPosition () const override
void paint (QPainter *p) override
QRect rect () const override
KGameCanvasWidgettopLevelCanvas () override
- Public Member Functions inherited from KGameCanvasItem
 KGameCanvasItem (KGameCanvasAbstract *canvas=nullptr)
QPoint absolutePosition () const
bool animated () const
KGameCanvasAbstractcanvas () const
void hide ()
virtual bool layered () const
void lower ()
void moveTo (const QPoint &newpos)
void moveTo (int x, int y)
int opacity () const
QPoint pos () const
void putInCanvas (KGameCanvasAbstract *canvas)
void raise ()
void setAnimated (bool a)
void setOpacity (int o)
void setVisible (bool v)
void show ()
void stackOver (KGameCanvasItem *ref)
void stackUnder (KGameCanvasItem *ref)
KGameCanvasWidgettopLevelCanvas () const
bool visible () const
- Public Member Functions inherited from KGameCanvasAbstract
 KGameCanvasAbstract ()
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

Additional Inherited Members

- Protected Attributes inherited from KGameCanvasAbstract
QList< KGameCanvasItem * > m_animated_items
QList< KGameCanvasItem * > m_items

Detailed Description

An item containing other items.

A KGameCanvasGroup is an KGameCanvasItem, but it is also a KGameCanvasAbstract, so you can add children items to it. Just an inner canvas, if you prefer.

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

Definition at line 283 of file kgamecanvas.h.

Constructor & Destructor Documentation

◆ KGameCanvasGroup()

KGameCanvasGroup::KGameCanvasGroup ( KGameCanvasAbstract canvas = nullptr)


Definition at line 525 of file kgamecanvas.cpp.

Member Function Documentation

◆ advance()

void KGameCanvasGroup::advance ( int  msecs)

Animations step, updates the animation for the children.

Reimplemented from KGameCanvasItem.

Definition at line 588 of file kgamecanvas.cpp.

◆ canvasPosition()

QPoint KGameCanvasGroup::canvasPosition ( ) const
Position of the abstract canvas relative to the toplevel canvas.

Implements KGameCanvasAbstract.

Definition at line 650 of file kgamecanvas.cpp.

◆ paint()

void KGameCanvasGroup::paint ( QPainter p)

This paints all the children.

Implements KGameCanvasItem.

Definition at line 624 of file kgamecanvas.cpp.

◆ rect()

QRect KGameCanvasGroup::rect ( ) const

This returns the bouding rect of all children.

Implements KGameCanvasItem.

Definition at line 629 of file kgamecanvas.cpp.

◆ topLevelCanvas()

KGameCanvasWidget * KGameCanvasGroup::topLevelCanvas ( )

returns the toplevel canvas (or null if it is in an orphan tree)

Implements KGameCanvasAbstract.

Definition at line 645 of file kgamecanvas.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 22 2023 03:49:06 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.