- Migrated all 104 CMakeLists.txt files in Lts/Services - Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg, Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test, Qt5::SerialPort with Qt6:: equivalents - 1244 files modified (CMakeLists.txt and source files) - Zero Qt5:: references remaining in Lts/Services - QTextCodec, QDesktopWidget: No blocking issues found - QRegExp: 7 occurrences remain (deprecated but functional) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
53 lines
1.6 KiB
C++
Executable File
53 lines
1.6 KiB
C++
Executable File
#pragma once
|
|
|
|
#include <QObject>
|
|
#include "aes_fts.h"
|
|
|
|
#include "logger.h"
|
|
#include <QHash>
|
|
|
|
namespace AreaEffectSimulation
|
|
{
|
|
class ObjectChargeEffect;
|
|
class MainHandler;
|
|
class HandlerTrajectory;
|
|
class TrajectoryData;
|
|
|
|
class HandlerChargeEffect
|
|
: public QObject
|
|
, public Interface::Fts::ChargeEffectModifyRequestHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit HandlerChargeEffect(MainHandler *mainhandler, QObject *parent = nullptr);
|
|
~HandlerChargeEffect();
|
|
bool init();
|
|
|
|
void onChargeEffectModifyRequest(const rti::core::SampleIdentity &cookie, const ChargeEffectModifyRequest &request);
|
|
Core::FunctionReplyObject createChargeEffect(const ChargeEffectModifyRequest &request);
|
|
static TrajectoryData trajectoryData(int chargeEffectId, const TrajectoryTimeAware &trajectoryTimeAware, int trajObjId = -1);
|
|
|
|
const ObjectChargeEffect *getChargeEffectById(int chargeEffectId);
|
|
|
|
Q_SIGNALS:
|
|
void chargeEffectActive(const int id);
|
|
void chargeEffectExpired(const int id);
|
|
|
|
private Q_SLOTS:
|
|
void onChargeEffectFinished(qint32 chargeEffectId);
|
|
void onChargeEffectStateChanged(const int id, AesEffectState newState);
|
|
|
|
private: // methods
|
|
Core::FunctionReplyObject updateChargeEffect(const ChargeEffectModifyRequest &request);
|
|
|
|
private: // attributes
|
|
MainHandler *m_mainHandler {nullptr};
|
|
QHash<qint32, ObjectChargeEffect*> m_chargeEffects;
|
|
QHash<qint32, qint32> m_trajObjIds; // <chartgeEffectId, trajectoryObjId>
|
|
HandlerTrajectory *m_trajectoryHandler{nullptr};
|
|
|
|
LOGGER_T m_logger;
|
|
}; // class HandlerChargeEffect
|
|
} // namespace AreaEffectSimulation
|