first commit
[blok] / totemblokitem.cpp
1 #include "totemblokitem.h"
2
3 TotemBlokItem::TotemBlokItem(int width,int height,QObject *parent) :
4         BlokItem(width, height,parent)
5 {
6     setTotem(YELLOW_TOTEM);
7 }
8
9
10 void TotemBlokItem::setTotem(Totem _totem)
11 {
12     mCurrentTotem = _totem;
13
14     if ( mCurrentTotem == YELLOW_TOTEM)
15     {
16         setBrush(QBrush(QPixmap(":sprites/totem1_block.png")));
17     }
18
19     if ( mCurrentTotem == BLUE_TOTEM)
20     {
21         setBrush(QBrush(QPixmap(":sprites/totem2_block.png")));
22
23     }
24
25     if ( mCurrentTotem == RED_TOTEM)
26     {
27         setBrush(QBrush(QPixmap(":sprites/totem3_block.png")));
28
29     }
30
31
32
33 }