29 public: |
29 public: |
30 void setInfinityState(bool value); |
30 void setInfinityState(bool value); |
31 unsigned char getItemsNum() const; |
31 unsigned char getItemsNum() const; |
32 void setItemsNum(const unsigned char num); |
32 void setItemsNum(const unsigned char num); |
33 |
33 |
|
34 private: |
|
35 QImage m_im; |
|
36 bool infinityState; |
|
37 |
34 protected: |
38 protected: |
35 ItemNum(const QImage& im, QWidget * parent, unsigned char min=2, unsigned char max=8); |
39 ItemNum(const QImage& im, QWidget * parent, unsigned char min=2, unsigned char max=8); |
36 virtual QSize sizeHint () const; |
40 virtual QSize sizeHint () const; |
37 virtual ~ItemNum()=0; |
41 virtual ~ItemNum()=0; |
38 |
42 |
39 bool nonInteractive; |
43 bool nonInteractive; |
40 unsigned char numItems; |
|
41 unsigned char minItems; |
44 unsigned char minItems; |
42 unsigned char maxItems; |
45 unsigned char maxItems; |
|
46 unsigned char numItems; |
43 |
47 |
44 // from QWidget |
48 // from QWidget |
45 virtual void mousePressEvent ( QMouseEvent * event ); |
49 virtual void mousePressEvent ( QMouseEvent * event ); |
46 virtual void paintEvent(QPaintEvent* event); |
50 virtual void paintEvent(QPaintEvent* event); |
47 |
51 |
48 // to be implemented in child |
52 // to be implemented in child |
49 virtual void incItems()=0; |
53 virtual void incItems()=0; |
50 virtual void decItems()=0; |
54 virtual void decItems()=0; |
51 |
|
52 private: |
|
53 bool infinityState; |
|
54 QImage m_im; |
|
55 }; |
55 }; |
56 |
56 |
57 #endif // _ITEM_NUM_INCLUDED |
57 #endif // _ITEM_NUM_INCLUDED |