1 /***************************************************************************
2                           backgnd.cpp  -  description
3                              -------------------
4     begin                : Wed Jul 18 2001
5     copyright            : (C) 2001-2006 by Gael de Chalendar (aka Kleag)
6     email                : kleag@free.fr
7  ***************************************************************************/
8 
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either either version 2
14    of the License, or (at your option) any later version.of the License, or     *
15  *   (at your option) any later version.                                   *
16  *                                                                         *
17  *   You should have received a copy of the GNU General Public License
18  *   along with this program; if not, write to the Free Software
19  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20  *   02110-1301, USA
21  ***************************************************************************/
22 
23 #define KDE_NO_COMPAT
24 #include "backgnd.h"
25 #include "GameLogic/onu.h"
26 
27 #include <QPixmap>
28 
29 #include "ksirk_debug.h"
30 
31 namespace Ksirk
32 {
33 
34 using namespace GameLogic;
35 
BackGnd(QGraphicsScene * scene,const GameLogic::ONU * theWorld,bool arena)36 BackGnd::BackGnd(QGraphicsScene *scene, const GameLogic::ONU* theWorld, bool arena) :
37     QGraphicsPixmapItem(0), m_theWorld(theWorld), m_bgIsArena(arena)
38 {
39   scene->addItem(this);
40   qCDebug(KSIRK_LOG) << "BackGnd constructor";
41 
42   QPixmap pix;
43   if (arena == false) {
44     pix = theWorld->map();
45     // put the image
46     setPixmap(pix);
47   }
48 
49   setZValue(1);
50   show();
51 }
52 
~BackGnd()53 BackGnd::~BackGnd()
54 {
55 //   m_frame = 0;
56 }
57 
58 
59 
60 }
61