Files
qt5-legatus-legacy/Lts/Services/AreaEffectSimulation/object_bccontamination.h
T
2026-08-13 18:33:10 +02:00

55 lines
1.5 KiB
C++
Executable File

/**
* Exercise object
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include "aes_db.h"
#include "object_base.h"
namespace AreaEffectSimulation
{
class ObjectBCContamination final : public ObjectBaseTmpl<Database::AesBCContamination>
{
Q_OBJECT
public:
explicit ObjectBCContamination(MainHandler *mainHandler,
QObject *parent = nullptr);
~ObjectBCContamination();
Core::FunctionReplyObject createObject(const Database::AesBCContamination &data);
Core::FunctionReplyObject updateObject(const Database::AesBCContamination &data) override;
/*!
* \brief removeObjectFromDb
* \details Removes the object from db, Used if the object is created but there are too much objects (amount border)
* \author Niklas Schmidt
* \return bool if the deletion was working
*/
bool removeObjectFromDb();
std::vector<Core::GeoPosition> form() const override { return m_aiv.form(); }
QPolygonF generateForm() override;
AesType aesType() const override { return AesType::AtBCContamination; }
bool isCentral() const override { return m_data.isCentral; }
void removeTopics();
protected:
ProjectDataManagement::VolatilityType volatilityType() const;
double expansionFactor() const;
void setEffectState(AesEffectState newState) override;
void publishAiv();
protected Q_SLOTS:
void onUpdateWeatherData();
void onUpdateAiv();
void onPublishData() override;
private:
QTimer *m_weatherTimer;
QTimer *m_aivUpdateTimer;
AesItemView m_aiv;
AesItemView m_aiv2;
};
}