- 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>
48 lines
1.3 KiB
C++
Executable File
48 lines
1.3 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Routing Test - Watch for Exercises and create routes
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QElapsedTimer>
|
|
#include <QObject>
|
|
#include <QSet>
|
|
#include <QTimer>
|
|
#include <ExerciseManagement/exm_dtc.h>
|
|
#include "logger.h"
|
|
|
|
namespace RoutingService
|
|
{
|
|
class PartitionHandler : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit PartitionHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector,
|
|
QObject *parent = nullptr);
|
|
~PartitionHandler();
|
|
|
|
bool init();
|
|
|
|
private:
|
|
void partitionModified(const QString &partitionName, const ExerciseManagement::ExerciseState &state);
|
|
void partitionRemoved(const QString &partitionName);
|
|
private Q_SLOTS:
|
|
void onExerciseChanged(const ExerciseManagement::Exercise &data, DataModification modType);
|
|
void onDestroyTimerTimeout();
|
|
Q_SIGNALS:
|
|
void createSession(const QString &partitionNameSv, const QString &partitionNameWs);
|
|
void destroySession(const QString &partitionNameSv, const QString &partitionNameWs);
|
|
|
|
private:
|
|
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
|
|
QMap<QString, QElapsedTimer *> m_destroyMap;
|
|
QSet<QString> m_activeSessions;
|
|
QTimer *m_destroyTimer;
|
|
NGL::INGLLogger &m_logger;
|
|
};
|
|
} // namespace RoutingService
|