QTfrontend/selectWeapon.h
changeset 683 57d624f71e65
parent 681 7a20c50988ec
child 694 436045756181
--- a/QTfrontend/selectWeapon.h	Wed Dec 19 20:54:00 2007 +0000
+++ b/QTfrontend/selectWeapon.h	Thu Dec 20 10:54:42 2007 +0000
@@ -33,6 +33,7 @@
   SelWeaponItem(int iconNum, int wNum, QWidget* parent=0);
 
   unsigned char getItemsNum() const;
+  void setItemsNum(const unsigned char num);
 
  private:
   WeaponItem* item;
@@ -43,12 +44,21 @@
   Q_OBJECT
   
  public:
-  SelWeaponWidget(QWidget* parent=0);
-  int operator [] (unsigned int weaponIndex) const;
+  SelWeaponWidget(int numItems, QWidget* parent=0);
   QString getWeaponsString() const;
+  void setWeapons(QString ammo);
+
+ public slots:
+  void setDefault();
+  void save();
 
  private:
-  std::map<int, SelWeaponItem*> weaponItems;
+  QString currentState;
+  const int m_numItems;
+  int operator [] (unsigned int weaponIndex) const;
+  
+  typedef std::map<int, SelWeaponItem*> twi;
+  twi weaponItems;
   QGridLayout* pLayout;
 };