Qt6-Migration: Type-Struct, DataModification und Signal/Slot Korrekturen
- ppm.hpp: Type-Methoden von id()/typeClass() zu getId()/getTypeClass() umbenannt (Vermeidung von Namenskonflikt mit Member-Variablen) - ppm.hpp: TypeClass::eUndefined zu TypeClass::eUninitialized geändert - ppm.hpp: operator<< für Type-Struct hinzugefügt (für INGLLogger) - ppm_enums.hpp: DataModification, TypeClass, SymbolAppearance, SymbolVisibility Enums - ppm_enums.hpp: operator<< für TypeClass hinzugefügt - exm_dtc.h: #include ppm_enums.hpp für DataModification - exm_dtc.h: DataModification zu ParticipantManagement::DataModification qualifiziert - gna_dtc.h: Signal-Signaturen auf ParticipantManagement::DataModification angepasst - gna_dtc.h: #include ppm.hpp hinzugefügt - gna_nasat_aircraft_part_model.h/.cpp: Namespace-Korrekturen, Member-Zugriffe korrigiert - gna_nasat_aircraft_part_model.h: onTypeChanged-Slot entfernt (im STUB nicht verfügbar) - pdm_to_string.h/.cpp: DDS-spezifischen Code entfernt (nur STUB) - flm_enums.hpp: AlarmConfig, VulnerabilityState Enums hinzugefügt - pws_vnc_handler.h/.cpp: ProjectionWorkstation Namespace korrigiert - mrk_marker.h: timeStamp() Methode hinzugefügt - exm_exercise.h: Syntaxfehler korrigiert - CMakeLists.txt Anpassungen für BUILD_RTI=ON Support Build mit BUILD_RTI=ON erfolgreich abgeschlossen.
This commit is contained in:
19 files changed
+449
-180
No files matched your search
@@ -2,27 +2,27 @@
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von DDS generiert
|
||||
// Für die Migration erstellen wir minimale Typ-Definitionen
|
||||
|
||||
#include "ppm_enums.hpp"
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
|
||||
namespace ParticipantManagement
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
struct Participant;
|
||||
struct Party;
|
||||
struct ParticipantPosition;
|
||||
struct DynamicParticipantData;
|
||||
struct MainSchedule;
|
||||
|
||||
// DataModification Enum - gibt Art der Datenänderung an
|
||||
enum class DataModification : int {
|
||||
eAdded = 0,
|
||||
eModified = 1,
|
||||
eRemoved = 2
|
||||
// Type - Struct mit id und typeClass (nicht nur Alias!)
|
||||
struct Type {
|
||||
int id = 0;
|
||||
TypeClass typeClass = TypeClass::eUninitialized;
|
||||
|
||||
// Helper methods für Kompatibilität (andere Namen als Member!)
|
||||
int getId() const { return id; }
|
||||
TypeClass getTypeClass() const { return typeClass; }
|
||||
};
|
||||
|
||||
// Participant - Basisdaten eines Teilnehmers
|
||||
@@ -30,6 +30,7 @@ struct Participant {
|
||||
int id = 0;
|
||||
QString internalName;
|
||||
QString externalName;
|
||||
int typeId = 0;
|
||||
int partyId = 0;
|
||||
bool isVerbund = false;
|
||||
int superiorId = 0;
|
||||
@@ -39,6 +40,9 @@ struct Participant {
|
||||
double y = 0.0;
|
||||
double z = 0.0;
|
||||
double heading = 0.0;
|
||||
|
||||
// Helper methods
|
||||
QString name() const { return internalName; }
|
||||
};
|
||||
|
||||
// Party - Gruppe/Organisation von Teilnehmern
|
||||
@@ -46,6 +50,7 @@ struct Party {
|
||||
int id = 0;
|
||||
QString name;
|
||||
QString shortName;
|
||||
int color() const { return 0xFF000000; } // Default schwarz als QRgb
|
||||
};
|
||||
|
||||
// ParticipantPosition - Position eines Teilnehmers
|
||||
@@ -80,6 +85,9 @@ struct MainSchedule {
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
// Using-Declaration für DataModification aus Parent-Namespace
|
||||
using ParticipantManagement::DataModification;
|
||||
|
||||
// Dtc - Data Transfer Component für Participant Management
|
||||
// DDS-generierte Klasse mit participantChanged Signal
|
||||
class Dtc : public QObject {
|
||||
@@ -127,14 +135,39 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Hierarchy-Methoden (STUB)
|
||||
QString hierarchyFromParticipant(int participantId) const {
|
||||
Q_UNUSED(participantId);
|
||||
return QString();
|
||||
}
|
||||
|
||||
// Party-Methoden (STUB)
|
||||
Party party(int partyId) const {
|
||||
Q_UNUSED(partyId);
|
||||
return Party();
|
||||
}
|
||||
|
||||
signals:
|
||||
// Signal für Teilnehmer-Änderungen
|
||||
void participantChanged(const Participant& participant, DataModification modificationType);
|
||||
|
||||
private:
|
||||
QList<Participant> m_participants;
|
||||
QMap<int, QString> m_hierarchies;
|
||||
QMap<int, Party> m_parties;
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
|
||||
// Stream operator for logging
|
||||
inline std::ostream& operator<<(std::ostream& os, const Type& t) {
|
||||
os << "Type(id=" << t.id << ", typeClass=" << t.typeClass << ")";
|
||||
return os;
|
||||
}
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& os, const Participant& p) {
|
||||
os << "Participant(id=" << p.id << ", name=" << p.name().toStdString() << ")";
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace ParticipantManagement
|
||||
@@ -10,6 +10,31 @@ enum class SymbolAppearance : int { Solid = 0, Dashed = 1, Dotted = 2 };
|
||||
|
||||
enum class SymbolVisibility : int { Visible = 0, Hidden = 1 };
|
||||
|
||||
enum class TypeClass : int { Unknown = 0, Aircraft = 1, Ground = 2, Naval = 3 };
|
||||
|
||||
enum class DataModification : int { eAdded = 0, eModified = 1, eRemoved = 2 };
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& os, TypeClass tc)
|
||||
{
|
||||
switch (tc) {
|
||||
case TypeClass::Unknown:
|
||||
os << "Unknown";
|
||||
break;
|
||||
case TypeClass::Aircraft:
|
||||
os << "Aircraft";
|
||||
break;
|
||||
case TypeClass::Ground:
|
||||
os << "Ground";
|
||||
break;
|
||||
case TypeClass::Naval:
|
||||
os << "Naval";
|
||||
break;
|
||||
default:
|
||||
os << "Unknown";
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
struct UnitSymbolPosition
|
||||
{
|
||||
double x = 0.0;
|
||||
|
||||
Reference in new issue
Block a user