15 * along with this program; if not, write to the Free Software |
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 |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
17 */ |
17 */ |
18 |
18 |
19 #include "itemNum.h" |
19 #include "itemNum.h" |
|
20 #include "hwform.h" |
20 |
21 |
21 #include <QMouseEvent> |
22 #include <QMouseEvent> |
22 #include <QPainter> |
23 #include <QPainter> |
23 |
24 |
24 ItemNum::ItemNum(const QImage& im, QWidget * parent, unsigned char min, unsigned char max) : |
25 ItemNum::ItemNum(const QImage& im, QWidget * parent, unsigned char min, unsigned char max) : |
25 QFrame(parent), m_im(im), infinityState(false), nonInteractive(false), minItems(min), maxItems(max), |
26 QFrame(parent), m_im(im), infinityState(false), nonInteractive(false), minItems(min), maxItems(max), |
26 numItems(min+2 >= max ? min : min+2) |
27 numItems(min+2 >= max ? min : min+2) |
27 { |
28 { |
28 setAttribute(Qt::WA_PaintOnScreen, true); |
29 if(frontendEffects) setAttribute(Qt::WA_PaintOnScreen, true); |
29 } |
30 } |
30 |
31 |
31 ItemNum::~ItemNum() |
32 ItemNum::~ItemNum() |
32 { |
33 { |
33 } |
34 } |