2 Mancala - A Historical Board Game
3 Copyright (C) 2009-2010 A.H.M.Mahfuzur Rahman 65mahfuz90@gmail.com
4 Copyright (c) 2010 Reto Zingg g.d0b3rm4n@gmail.com
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation; either version 2 of
9 the License, or (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include <QtSvg/QGraphicsSvgItem>
24 #include <QGraphicsSimpleTextItem>
32 class Cup : public QGraphicsSvgItem{
35 Cup(GameInfo* info, int cupNumber, QGraphicsSvgItem *parent);
38 void drawTextInitially(int numStone);
39 void updateStoneList(Stone* stoneItem);
40 Stone* updateStoneList();
41 QPointF* calculateStonePosition(Stone *stone);
42 void addStone(Stone* stone);
44 //void setIdentifier(int num){ m_identifier = num;}
45 void setPosition(QPointF pos){ m_pos = pos;}
46 void setSize(QSizeF size){ m_size = size;}
49 int index() const{ return m_index; }
50 QSizeF size() const{ return m_size;}
51 QPointF middlePoint() const{ return m_mid_point;}
52 QPointF position() const{return m_pos;}
53 QPainterPath shape() const;
58 void slotChangeText();
61 //int m_identifier; //only for debugging
69 QList <Stone*> m_stone;
70 QGraphicsSimpleTextItem *m_text;