• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

libkdegames/libkdegamesprivate

Public Member Functions | Protected Attributes | List of all members
KGameCanvasAbstract Class Referenceabstract

#include <KGameCanvas>

Inheritance diagram for KGameCanvasAbstract:
Inheritance graph
[legend]

Public Member Functions

 KGameCanvasAbstract ()
 
virtual ~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
 
KGameCanvasItem * itemAt (const QPoint &pos) const
 
KGameCanvasItem * itemAt (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 KGameCanvasWidget * topLevelCanvas ()=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 55 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.

Member Function Documentation

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

Implemented in KGameCanvasAdapter, KGameCanvasWidget, and KGameCanvasGroup.

virtual void KGameCanvasAbstract::ensureAnimating ( )
pure virtual

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

virtual void KGameCanvasAbstract::ensurePendingUpdate ( )
pure virtual

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

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

Virtual function to update a rect.

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

Virtual function to update a region.

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.

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

Overload, same as above.

Definition at line 76 of file kgamecanvas.h.

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

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

Definition at line 70 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.

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

Overload, same as above.

Definition at line 83 of file kgamecanvas.h.

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

Returns the toplevel non-group KGameCanvasWidget object.

Implemented in KGameCanvasAdapter, KGameCanvasWidget, and KGameCanvasGroup.

Member Data Documentation

QList<KGameCanvasItem*> KGameCanvasAbstract::m_animated_items
protected

Definition at line 61 of file kgamecanvas.h.

QList<KGameCanvasItem*> KGameCanvasAbstract::m_items
protected

Definition at line 60 of file kgamecanvas.h.


The documentation for this class was generated from the following files:
  • kgamecanvas.h
  • kgamecanvas.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdegames/libkdegamesprivate

Skip menu "libkdegames/libkdegamesprivate"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal