2023-09-07 23:57:56 +02:00
|
|
|
/*
|
|
|
|
* eventsettings.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
2023-09-09 11:03:19 +02:00
|
|
|
#pragma once
|
2023-09-07 23:57:56 +02:00
|
|
|
|
|
|
|
#include "abstractsettings.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class EventSettings;
|
|
|
|
}
|
|
|
|
|
2024-09-17 20:57:05 +02:00
|
|
|
QString toQString(const PlayerColor & player);
|
2024-07-14 19:06:39 +02:00
|
|
|
QVariant toVariant(const TResources & resources);
|
2024-08-12 12:36:49 +02:00
|
|
|
QVariant toVariant(const std::set<PlayerColor> & players);
|
|
|
|
|
2024-07-14 19:06:39 +02:00
|
|
|
TResources resourcesFromVariant(const QVariant & v);
|
2024-08-12 12:36:49 +02:00
|
|
|
std::set<PlayerColor> playersFromVariant(const QVariant & v);
|
2024-07-14 19:06:39 +02:00
|
|
|
|
2023-09-07 23:57:56 +02:00
|
|
|
class EventSettings : public AbstractSettings
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit EventSettings(QWidget *parent = nullptr);
|
|
|
|
~EventSettings();
|
|
|
|
|
2023-09-11 19:16:24 +02:00
|
|
|
void initialize(MapController & map) override;
|
|
|
|
void update() override;
|
2023-09-07 23:57:56 +02:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_timedEventAdd_clicked();
|
|
|
|
|
|
|
|
void on_timedEventRemove_clicked();
|
|
|
|
|
|
|
|
void on_eventsList_itemActivated(QListWidgetItem *item);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::EventSettings *ui;
|
|
|
|
};
|
|
|
|
|