Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/simulation_movement.h
T
torstenandCopilot d5af8b9764 Session 026: Lts/Services Qt5:: to Qt6:: migration
- 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>
2026-08-25 19:23:30 +02:00

76 lines
2.5 KiB
C++
Executable File

/**
* Simulation for Movement
* $Id$
* $HeadURL$
* $Author$
* Created by gr, SLSE, 2017-12-13
*/
#pragma once
#include <CentralEffectSimulation/logger.h>
#include <CentralEffectSimulation/dds_handler.h>
#include <CentralEffectSimulation/handler_participant.h>
#include <CentralEffectSimulation/ces_db.h>
#include <QLineF>
#include <QObject>
#include <QTimer>
namespace CentralEffectSimulationBasic
{
class SimulationMovement : public QObject
{
Q_OBJECT
public:
SimulationMovement(const std::shared_ptr<CentralEffectSimulation::DdsHandler> &ddsHandler,
const std::shared_ptr<CentralEffectSimulation::DatabaseInterface> &db,
const std::shared_ptr<CentralEffectSimulation::HandlerParticipant> &participantHandler,
const CentralEffectSimulation::SimulatedMovement &sml,
QObject *parent = nullptr);
~SimulationMovement();
void setSimulatedMovementRequest(const CentralEffectSimulation::SimulatedMovement &sml);
int id() const { return m_simMovement.id(); }
void setId(int id) { m_simMovement.id(id); }
int participantId() const { return m_simMovement.participantId(); }
void setJump(bool jump);
void setnextPoint(int nextPoint) { m_simMovement.nextPoint(nextPoint); }
int getNextPoint() const { return m_simMovement.nextPoint(); }
void publishSimulatedMovement();
const CentralEffectSimulation::SimulatedMovement &simMovementData() const { return m_simMovement; }
static CentralEffectSimulation::Database::CesSimulatedMovement toDb(const CentralEffectSimulation::SimulatedMovement &ddsSimMovement);
protected Q_SLOTS:
void publishNewPos();
void startNewSegment();
void move();
protected:
void updateNextPointInDb();
private:
std::shared_ptr<CentralEffectSimulation::DdsHandler> m_ddsHandler; ///< Pointer to VOM DDS handler
std::shared_ptr<CentralEffectSimulation::DatabaseInterface> m_db;
std::shared_ptr<CentralEffectSimulation::HandlerParticipant> m_handlerParticipant;
// Input Data
QVector<QPointF> m_points;
QVector<double> m_segSpeed;
QVector<int> m_segDelay;
// Dynamic Data
int m_moveTime; /// Time starts for each segment new
QLineF m_actSegment;
QPointF m_newPos;
bool m_simStart; /// Start of simulation
int m_zone;
QTimer *m_segTimer;
QTimer *m_moveTimer;
CentralEffectSimulation::SimulatedMovement m_simMovement;
CentralEffectSimulation::LOGGER_T &m_logger; ///< Interface to the Logging-Facility
};
}