--- a/QTfrontend/hedgehogerWidget.cpp Sun Jan 21 19:51:02 2007 +0000
+++ b/QTfrontend/hedgehogerWidget.cpp Sun Jan 21 19:53:25 2007 +0000
@@ -47,12 +47,14 @@
if(numHedgehogs < 8 && pOurFrameTeams->overallHedgehogs<18) {
numHedgehogs++;
pOurFrameTeams->overallHedgehogs++;
+ emit hedgehogsNumChanged();
}
} else if (event->button()==Qt::RightButton) {
event->accept();
if(numHedgehogs > 3) {
numHedgehogs--;
pOurFrameTeams->overallHedgehogs--;
+ emit hedgehogsNumChanged();
}
} else {
event->ignore();
@@ -61,6 +63,14 @@
repaint();
}
+void CHedgehogerWidget::setHHNum(unsigned int num)
+{
+ unsigned int diff=numHedgehogs-num;
+ numHedgehogs=num;
+ pOurFrameTeams->overallHedgehogs+=diff;
+ repaint();
+}
+
void CHedgehogerWidget::paintEvent(QPaintEvent* event)
{
QImage image(":/res/hh25x25.png");