Merge feature/qt6-migration-basis-modules-services into feature/qt6-migration-basis-modules
Resolves 17 conflicts against legacy Qt5 semantics; validates with BUILD_RTI=ON BUILD_GRANTLEE=ON.
This commit is contained in:
1200 files changed
+20421
-18259
No files matched your search
@@ -0,0 +1,137 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Typ-Definitionen
|
||||
|
||||
#include "gna_nasat_aircraft.h"
|
||||
#include "gna_nasat_aircraft_participant.h"
|
||||
#include <ParticipantManagement/ppm_enums.hpp>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <LtsUtils/LtsUtilsCore/data_modification_enum.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QMap>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
// Forward declarations
|
||||
namespace ExerciseManagement { namespace Interface { class Dtc; } }
|
||||
namespace ParticipantManagement { namespace Interface { class Dtc; class ForeignGuiComboboxInterface; } }
|
||||
namespace LtsSession { class LtsSession; }
|
||||
|
||||
namespace GuezNasat
|
||||
{
|
||||
|
||||
// NasatAircraftParticipant und NasatAircraft sind bereits in gna_nasat_aircraft.h definiert
|
||||
// Diese Datei enthält nur die Dtc-Klasse
|
||||
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
// Dtc - Data Transfer Component für GuezNasat
|
||||
class Dtc : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Dtc() = default;
|
||||
~Dtc() override = default;
|
||||
|
||||
// NasatAircraftParticipant-Liste abrufen (Callback-basiert)
|
||||
void forEachNasatAircraftParticipant(const std::function<void(const NasatAircraftParticipant&)>& callback) const {
|
||||
for (const auto& nap : m_nasatAircraftParticipants) {
|
||||
callback(nap);
|
||||
}
|
||||
}
|
||||
|
||||
// NasatAircraftParticipant-Liste als QMap (für Model)
|
||||
QMap<qint32, NasatAircraftParticipant> nasatAircraftParticipants() const {
|
||||
QMap<qint32, NasatAircraftParticipant> result;
|
||||
for (const auto& nap : m_nasatAircraftParticipants) {
|
||||
result[nap.id()] = nap;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// NasatAircraft-Liste abrufen (Callback-basiert)
|
||||
void forEachNasatAircraft(const std::function<void(const NasatAircraft&)>& callback) const {
|
||||
for (const auto& na : m_nasatAircrafts) {
|
||||
callback(na);
|
||||
}
|
||||
}
|
||||
|
||||
// NasatAircraft-Liste als QMap
|
||||
QMap<qint32, NasatAircraft> nasatAircrafts() const {
|
||||
QMap<qint32, NasatAircraft> result;
|
||||
for (const auto& na : m_nasatAircrafts) {
|
||||
result[na.id()] = na;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// Daten hinzufügen/entfernen/ändern
|
||||
void addNasatAircraftParticipant(const NasatAircraftParticipant& nap) {
|
||||
m_nasatAircraftParticipants.append(nap);
|
||||
emit nasatAircraftParticipantChanged(nap, DataModification::eAdded);
|
||||
}
|
||||
|
||||
void updateNasatAircraftParticipant(const NasatAircraftParticipant& nap) {
|
||||
for (auto& existing : m_nasatAircraftParticipants) {
|
||||
if (existing.id() == nap.id()) {
|
||||
existing = nap;
|
||||
emit nasatAircraftParticipantChanged(nap, DataModification::eModified);
|
||||
return;
|
||||
}
|
||||
}
|
||||
addNasatAircraftParticipant(nap);
|
||||
}
|
||||
|
||||
void removeNasatAircraftParticipant(int id) {
|
||||
for (auto it = m_nasatAircraftParticipants.begin(); it != m_nasatAircraftParticipants.end(); ++it) {
|
||||
if (it->id() == id) {
|
||||
NasatAircraftParticipant removed = *it;
|
||||
m_nasatAircraftParticipants.erase(it);
|
||||
emit nasatAircraftParticipantChanged(removed, DataModification::eRemoved);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void addNasatAircraft(const NasatAircraft& na) {
|
||||
m_nasatAircrafts.append(na);
|
||||
emit nasatAircraftChanged(na, DataModification::eAdded);
|
||||
}
|
||||
|
||||
void updateNasatAircraft(const NasatAircraft& na) {
|
||||
for (auto& existing : m_nasatAircrafts) {
|
||||
if (existing.id() == na.id()) {
|
||||
existing = na;
|
||||
emit nasatAircraftChanged(na, DataModification::eModified);
|
||||
return;
|
||||
}
|
||||
}
|
||||
addNasatAircraft(na);
|
||||
}
|
||||
|
||||
void removeNasatAircraft(int id) {
|
||||
for (auto it = m_nasatAircrafts.begin(); it != m_nasatAircrafts.end(); ++it) {
|
||||
if (it->id() == id) {
|
||||
NasatAircraft removed = *it;
|
||||
m_nasatAircrafts.erase(it);
|
||||
emit nasatAircraftChanged(removed, DataModification::eRemoved);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signals:
|
||||
void nasatAircraftParticipantChanged(const NasatAircraftParticipant& participant, DataModification modificationType);
|
||||
void nasatAircraftChanged(const NasatAircraft& aircraft, DataModification modificationType);
|
||||
|
||||
private:
|
||||
QList<NasatAircraftParticipant> m_nasatAircraftParticipants;
|
||||
QList<NasatAircraft> m_nasatAircrafts;
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
} // namespace GuezNasat
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "gna_export.h"
|
||||
|
||||
namespace GuezNasat
|
||||
{
|
||||
using LOGGER_T = NGL::INGLLogger &;
|
||||
|
||||
GNA_COMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
inline LOGGER_T getLogger(const QString &loggerName)
|
||||
{
|
||||
return getLogger(loggerName.toUtf8().constData());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user