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

libkdegames

  • sources
  • kde-4.14
  • kdegames
  • libkdegames
kgamerendereditem.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright 2010 Stefan Majewsky <majewsky@gmx.net> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU Library General Public License *
6  * version 2 as published by the Free Software Foundation *
7  * *
8  * This program is distributed in the hope that it will be useful, *
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
11  * GNU Library General Public License for more details. *
12  * *
13  * You should have received a copy of the GNU Library General Public *
14  * License along with this program; if not, write to the *
15  * Free Software Foundation, Inc., *
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
17  ***************************************************************************/
18 
19 #include "kgamerendereditem.h"
20 
21 class KGameRenderedItemPrivate
22 {
23  //NOTE: reserved for later use
24 };
25 
26 KGameRenderedItem::KGameRenderedItem(KGameRenderer* renderer, const QString& spriteKey, QGraphicsItem* parent)
27  : QGraphicsPixmapItem(parent)
28  , KGameRendererClient(renderer, spriteKey)
29  , d(0)
30 {
31  setCacheMode(QGraphicsItem::DeviceCoordinateCache);
32 }
33 
34 KGameRenderedItem::~KGameRenderedItem()
35 {
36  delete d;
37 }
38 
39 void KGameRenderedItem::receivePixmap(const QPixmap& pixmap)
40 {
41  QGraphicsPixmapItem::setPixmap(pixmap);
42 }
kgamerendereditem.h
QGraphicsItem
QGraphicsPixmapItem
KGameRenderer
Cache-enabled rendering of SVG themes.
Definition: kgamerenderer.h:94
QString
QPixmap
KGameRendererClient
An object that receives pixmaps from a KGameRenderer.
Definition: kgamerendererclient.h:50
KGameRenderedItem::KGameRenderedItem
KGameRenderedItem(KGameRenderer *renderer, const QString &spriteKey, QGraphicsItem *parent=0)
Creates a new KGameRenderedItem which renders the sprite with the given spriteKey as provided by the ...
Definition: kgamerendereditem.cpp:26
QGraphicsItem::setCacheMode
void setCacheMode(CacheMode mode, const QSize &logicalCacheSize)
QGraphicsPixmapItem::setPixmap
void setPixmap(const QPixmap &pixmap)
KGameRenderedItem::receivePixmap
virtual void receivePixmap(const QPixmap &pixmap)
This method is called when the KGameRenderer has provided a new pixmap for this client (esp...
Definition: kgamerendereditem.cpp:39
KGameRenderedItem::~KGameRenderedItem
virtual ~KGameRenderedItem()
Definition: kgamerendereditem.cpp:34
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdegames

Skip menu "libkdegames"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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