You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
794 B
C++

#ifndef QWREMOVETRIGGER_H
#define QWREMOVETRIGGER_H
#include "qw_abstractsceneevent.h"
/* QWRemoveTriggerEvent
* Removes a trigger from its location list. */
class QWRemoveTriggerEvent : public QWAbstractSceneEvent
{
private:
std::shared_ptr<QWTrigger> trigger; // What to add.
std::shared_ptr<QWLocation> location; // Where to add.
public:
explicit QWRemoveTriggerEvent(const std::shared_ptr<QWTrigger> &tr);
virtual ~QWRemoveTriggerEvent() override {}
void execute() override;
////////////////////////
void setLocation(const std::shared_ptr<QWLocation> &loc) noexcept;
void setTrigger(const std::shared_ptr<QWTrigger> &tr) noexcept;
////////////////////////
void writeToJson(QJsonObject &event_data) override;
};
#endif // QWREMOVETRIGGER_H