--- a/QTfrontend/hedgehogerWidget.cpp Sun Sep 03 18:01:34 2006 +0000
+++ b/QTfrontend/hedgehogerWidget.cpp Sat Sep 09 16:59:10 2006 +0000
@@ -4,7 +4,7 @@
#include <QPainter>
CHedgehogerWidget::CHedgehogerWidget(QWidget * parent) :
- QWidget(parent), numHedgedogs(4)
+ QWidget(parent), numHedgehogs(4)
{
}
@@ -12,10 +12,10 @@
{
if(event->button()==Qt::LeftButton) {
event->accept();
- if(numHedgedogs < 8) numHedgedogs++;
+ if(numHedgehogs < 8) numHedgehogs++;
} else if (event->button()==Qt::RightButton) {
event->accept();
- if(numHedgedogs > 3) numHedgedogs--;
+ if(numHedgehogs > 3) numHedgehogs--;
} else {
event->ignore();
return;
@@ -29,8 +29,13 @@
QPainter painter(this);
- for(int i=0; i<numHedgedogs; i++) {
+ for(int i=0; i<numHedgehogs; i++) {
QRect target(11 * i, i % 2, 25, 25);
painter.drawImage(target, image);
}
}
+
+unsigned char CHedgehogerWidget::getHedgehogsNum()
+{
+ return numHedgehogs;
+}