race.h 827 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef INCLUDEACE_H
  2. #define INCLUDEACE_H
  3. #include <QObject>
  4. #include <QString>
  5. #include <QImage>
  6. #include <vector>
  7. #include "AbstractFactory.h"
  8. class Unit;
  9. class Race : public QObject
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit Race(QString race_name, QObject *parent = nullptr);
  14. Unit* createUnit(QString unit_name);
  15. const std::vector<QString> &getAvailableUnitsList();
  16. const std::vector<Unit*> &getAllUnitsList();
  17. QString getRaceId();
  18. QString getRaceName();
  19. QImage getRaceIcon();
  20. QString getRaceDescr();
  21. private:
  22. QString race_id_;
  23. QString race_name_;
  24. QImage race_icon_;
  25. QString race_descr_;
  26. ObjectFactory<Unit, QString> units_factory_;
  27. std::vector<QString> available_units_list_;
  28. std::vector<Unit*> all_units_list_;
  29. signals:
  30. public slots:
  31. };
  32. #endif // INCLUDEACE_H