1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #ifndef INCLUDEACE_H
- #define INCLUDEACE_H
- #include <QObject>
- #include <QString>
- #include <QImage>
- #include <vector>
- #include "abstractfactory.h"
- class Unit;
- class Race : public QObject
- {
- Q_OBJECT
- public:
- explicit Race(QString race_name, QObject *parent = nullptr);
- std::shared_ptr<Unit> createUnit(QString unit_name);
- const std::vector<QString> &getAvailableUnitsList();
- const std::vector<std::shared_ptr<Unit>> &getAllUnitsList();
- QString getRaceId();
- QString getRaceName();
- QImage getRaceIcon();
- QString getRaceDescr();
- private:
- QString race_id_;
- QString race_name_;
- QImage race_icon_;
- QString race_descr_;
- ObjectFactory<Unit, QString> units_factory_;
- std::vector<QString> available_units_list_;
- std::vector<std::shared_ptr<Unit>> all_units_list_;
- signals:
- public slots:
- };
- #endif
|