QTfrontend/ui/widget/hedgehogerWidget.cpp
changeset 6616 f77bb02b669f
parent 6060 fdfc01419815
child 6700 e04da46ee43c
--- a/QTfrontend/ui/widget/hedgehogerWidget.cpp	Mon Jan 30 23:20:28 2012 +0100
+++ b/QTfrontend/ui/widget/hedgehogerWidget.cpp	Mon Jan 30 17:32:18 2012 -0500
@@ -24,53 +24,53 @@
 CHedgehogerWidget::CHedgehogerWidget(const QImage& im, const QImage& img, QWidget * parent) :
     ItemNum(im, img, parent, 1)
 {
-  // TODO: maxHedgehogsPerGame doesn't reset properly and won't match map limits for now
-  /*if(parent) {
-    pOurFrameTeams = dynamic_cast<FrameTeams*>(parent->parentWidget());
-  }
-  if(pOurFrameTeams->overallHedgehogs + 4 > pOurFrameTeams->maxHedgehogsPerGame) {
-    numItems = pOurFrameTeams->maxHedgehogsPerGame - pOurFrameTeams->overallHedgehogs;
-  } else numItems = 4;
-  pOurFrameTeams->overallHedgehogs += numItems;*/
+    // TODO: maxHedgehogsPerGame doesn't reset properly and won't match map limits for now
+    /*if(parent) {
+      pOurFrameTeams = dynamic_cast<FrameTeams*>(parent->parentWidget());
+    }
+    if(pOurFrameTeams->overallHedgehogs + 4 > pOurFrameTeams->maxHedgehogsPerGame) {
+      numItems = pOurFrameTeams->maxHedgehogsPerGame - pOurFrameTeams->overallHedgehogs;
+    } else numItems = 4;
+    pOurFrameTeams->overallHedgehogs += numItems;*/
 }
 
 void CHedgehogerWidget::incItems()
 {
-  //if (pOurFrameTeams->overallHedgehogs < pOurFrameTeams->maxHedgehogsPerGame) {
+    //if (pOurFrameTeams->overallHedgehogs < pOurFrameTeams->maxHedgehogsPerGame) {
     numItems++;
     //pOurFrameTeams->overallHedgehogs++;
     emit hedgehogsNumChanged();
-  //}
+    //}
 }
 
 void CHedgehogerWidget::decItems()
 {
-  numItems--;
-  //pOurFrameTeams->overallHedgehogs--;
-  emit hedgehogsNumChanged();
+    numItems--;
+    //pOurFrameTeams->overallHedgehogs--;
+    emit hedgehogsNumChanged();
 }
 
 CHedgehogerWidget::~CHedgehogerWidget()
 {
-  // TODO: not called?
-  //pOurFrameTeams->overallHedgehogs-=numItems;
+    // TODO: not called?
+    //pOurFrameTeams->overallHedgehogs-=numItems;
 }
 
 void CHedgehogerWidget::setNonInteractive()
 {
-  nonInteractive=true;
+    nonInteractive=true;
 }
 
 void CHedgehogerWidget::setHHNum(unsigned int num)
 {
-  /*unsigned int diff = num - numItems;
-  numItems += diff;
-  pOurFrameTeams->overallHedgehogs += diff;*/
-  numItems = num;
-  repaint();
+    /*unsigned int diff = num - numItems;
+    numItems += diff;
+    pOurFrameTeams->overallHedgehogs += diff;*/
+    numItems = num;
+    repaint();
 }
 
 unsigned char CHedgehogerWidget::getHedgehogsNum() const
 {
-  return numItems;
+    return numItems;
 }