equal
deleted
inserted
replaced
31 |
31 |
32 public: |
32 public: |
33 SelWeaponItem(int iconNum, int wNum, QWidget* parent=0); |
33 SelWeaponItem(int iconNum, int wNum, QWidget* parent=0); |
34 |
34 |
35 unsigned char getItemsNum() const; |
35 unsigned char getItemsNum() const; |
|
36 void setItemsNum(const unsigned char num); |
36 |
37 |
37 private: |
38 private: |
38 WeaponItem* item; |
39 WeaponItem* item; |
39 }; |
40 }; |
40 |
41 |
41 class SelWeaponWidget : public QWidget |
42 class SelWeaponWidget : public QWidget |
42 { |
43 { |
43 Q_OBJECT |
44 Q_OBJECT |
44 |
45 |
45 public: |
46 public: |
46 SelWeaponWidget(QWidget* parent=0); |
47 SelWeaponWidget(int numItems, QWidget* parent=0); |
47 int operator [] (unsigned int weaponIndex) const; |
|
48 QString getWeaponsString() const; |
48 QString getWeaponsString() const; |
|
49 void setWeapons(QString ammo); |
|
50 |
|
51 public slots: |
|
52 void setDefault(); |
|
53 void save(); |
49 |
54 |
50 private: |
55 private: |
51 std::map<int, SelWeaponItem*> weaponItems; |
56 QString currentState; |
|
57 const int m_numItems; |
|
58 int operator [] (unsigned int weaponIndex) const; |
|
59 |
|
60 typedef std::map<int, SelWeaponItem*> twi; |
|
61 twi weaponItems; |
52 QGridLayout* pLayout; |
62 QGridLayout* pLayout; |
53 }; |
63 }; |
54 |
64 |
55 #endif // _SELECT_WEAPON_INCLUDED |
65 #endif // _SELECT_WEAPON_INCLUDED |