QTfrontend/ui/widget/selectWeapon.h
changeset 12665 5664ec82aed7
parent 11046 47a8c19ecb60
child 12723 288356c20868
--- a/QTfrontend/ui/widget/selectWeapon.h	Sat Oct 07 01:05:55 2017 +0200
+++ b/QTfrontend/ui/widget/selectWeapon.h	Sat Oct 07 03:43:06 2017 +0200
@@ -52,24 +52,29 @@
         SelWeaponWidget(int numItems, QWidget* parent=0);
         QString getWeaponsString(const QString& name) const;
         QStringList getWeaponNames() const;
+        void deletionDone();
 
     public slots:
         void setDefault();
         void setWeapons(const QString& ammo);
         //sets the name of the current set
         void setWeaponsName(const QString& name);
+        void switchWeapons(const QString& name);
         void deleteWeaponsName();
         void newWeaponsName();
         void save();
         void copy();
 
     signals:
-        void weaponsChanged();
-        void weaponsDeleted();
+        void weaponsDeleted(QString weaponsName);
+        void weaponsAdded(QString weaponsName, QString ammo);
+        void weaponsEdited(QString oldWeaponsName, QString newWeaponsName, QString ammo);
 
     private:
         //the name of the current weapon set
         QString curWeaponsName;
+        //set to true while an entry is deleted. Used to avoid duplicate saving due to combobox change
+        bool isDeleting = false;
 
         QLineEdit* m_name;