- cmake/FindRTI.cmake: Add INTERFACE placeholder targets when RTI not found - cmake/FindRTI.cmake: Force BUILD_RTI=OFF when RTI not installed - Lts/Common/LtsSession/CMakeLists.txt: Make LtsSessionDataDds conditional on BUILD_RTI - Lts/Viewer/CMakeLists.txt: Make LtsDataView conditional on BUILD_RTI - Lts/Plugins/*/CMakeLists.txt: 97 plugin files wrapped in BUILD_RTI conditionals - cmake/NGLMacros.cmake: Fix NGL_ADD_BIG_RESOURCES macro (removed premature return()) - Multiple Qt6 API fixes: QLinkedList→std::list, QStringRef→QStringView, etc. - BUILD_RTI_FIXES_SUMMARY.md: Comprehensive documentation of all fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
86 lines
2.3 KiB
C++
Executable File
86 lines
2.3 KiB
C++
Executable File
/**
|
|
* situation replay objects
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hanna E. Rathje, SLSE, 2016-01-13
|
|
*/
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QTimer>
|
|
#include "dds_handler.h"
|
|
#include "db_reader.h"
|
|
#include <Core/core_types.h>
|
|
|
|
// Generated
|
|
#include <SituationReplay/srp_db.h>
|
|
|
|
namespace SituationReplay
|
|
{
|
|
class DatabaseInterface;
|
|
class DbReader;
|
|
|
|
class ObjectSituationReplay : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ObjectSituationReplay(const std::shared_ptr<DdsHandler> &ddsHandler,
|
|
const std::shared_ptr<DatabaseInterface> &db,
|
|
const std::shared_ptr<DbReader> &dbReader,
|
|
int exerciseId);
|
|
~ObjectSituationReplay();
|
|
|
|
Core::FunctionReplyObject createObject(const Database::SrpSituationReplay &data);
|
|
Core::FunctionReplyObject removeObject();
|
|
|
|
qint32 getId() const { return m_data.id; }
|
|
qint32 getExerciseId() const { return m_exerciseId; }
|
|
qint32 getReplayPartitionId() const { return m_data.replayPartitionId; }
|
|
qint64 currentReplayTime() const { return m_currentReplayTime; }
|
|
|
|
SrpState srpState() const { return m_data.srpStateId; }
|
|
double pace() const { return m_data.pace; }
|
|
bool setPace(double newPace);
|
|
|
|
// Used by SrpStateManager (only internal)
|
|
bool setSrpData(const Database::SrpSituationReplay &newData);
|
|
|
|
// Used by Client
|
|
Core::FunctionReplyObject switchToState(SrpState newSrpState);
|
|
|
|
bool isRunning() const;
|
|
bool isStopped() const;
|
|
|
|
bool start();
|
|
bool pause();
|
|
bool resume();
|
|
bool stop();
|
|
|
|
protected Q_SLOTS:
|
|
void onPublishReplayInformation();
|
|
void onPublishReplayTime();
|
|
void onReplayTimerTimeout();
|
|
|
|
private:
|
|
bool checkPublishData();
|
|
|
|
Q_SIGNALS:
|
|
// for thp
|
|
void replayTimeChanged(qint64 currentReplayTime);
|
|
void started(qint64 currentReplayTime);
|
|
void paused();
|
|
void resumed(qint64 currentReplayTime);
|
|
void stopped();
|
|
|
|
private:
|
|
std::shared_ptr<DdsHandler> m_ddsInterface;
|
|
std::shared_ptr<DatabaseInterface> m_db;
|
|
std::shared_ptr<DbReader> m_dbReader;
|
|
Database::SrpSituationReplay m_data;
|
|
int m_exerciseId;
|
|
QTimer *m_replayTimer;
|
|
qint64 m_currentReplayTime;
|
|
};
|
|
}
|