eventsettings.h 983 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * eventsettings.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "abstractsettings.h"
  12. namespace Ui {
  13. class EventSettings;
  14. }
  15. QString toQString(const PlayerColor & player);
  16. QVariant toVariant(const TResources & resources);
  17. QVariant toVariant(const std::set<PlayerColor> & players);
  18. TResources resourcesFromVariant(const QVariant & v);
  19. std::set<PlayerColor> playersFromVariant(const QVariant & v);
  20. class EventSettings : public AbstractSettings
  21. {
  22. Q_OBJECT
  23. public:
  24. explicit EventSettings(QWidget *parent = nullptr);
  25. ~EventSettings();
  26. void initialize(MapController & map) override;
  27. void update() override;
  28. private slots:
  29. void on_timedEventAdd_clicked();
  30. void on_timedEventRemove_clicked();
  31. void on_eventsList_itemActivated(QListWidgetItem *item);
  32. private:
  33. Ui::EventSettings *ui;
  34. };