2
* Hedgewars, a free turn based strategy game
3
* Copyright (c) 2006-2011 Igor Ulyanov <iulyanov@gmail.com>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; version 2 of the License
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
22
#ifndef _ITEM_NUM_INCLUDED
23
#define _ITEM_NUM_INCLUDED
25
class ItemNum : public QFrame
30
void setInfinityState(bool value);
31
void setEnabled(bool value);
32
unsigned char getItemsNum() const;
33
void setItemsNum(const unsigned char num);
42
ItemNum(const QImage& im, const QImage& img, QWidget * parent, unsigned char min=2, unsigned char max=8);
43
virtual QSize sizeHint () const;
47
unsigned char minItems;
48
unsigned char maxItems;
49
unsigned char numItems;
52
virtual void mousePressEvent ( QMouseEvent * event );
53
virtual void paintEvent(QPaintEvent* event);
55
// to be implemented in child
56
virtual void incItems()=0;
57
virtual void decItems()=0;
60
#endif // _ITEM_NUM_INCLUDED