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
+190
@@ -0,0 +1,190 @@
|
||||
/**
|
||||
* @file pre_dtc.h
|
||||
* @brief DDS-generated Stub-Header für PresentationManagement DTC (Data Transfer Component)
|
||||
*
|
||||
* Dieser Header ist ein Stub für den von RTI DDS Generator erzeugten Header.
|
||||
* Ermöglicht Build ohne echte DDS-Codegenerierung.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QString>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace PresentationManagement
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
struct Presentation;
|
||||
struct PresentationContent;
|
||||
struct GetPresentationContentReply;
|
||||
|
||||
// FileStatus Enum - Status einer Präsentation
|
||||
enum class FileStatus : int { Valid = 0, Deleted = 1 };
|
||||
|
||||
// Presentation - DDS-generierter Typ für Präsentationen
|
||||
struct Presentation
|
||||
{
|
||||
int32_t id = 0;
|
||||
QString name;
|
||||
QString description;
|
||||
int32_t operatorId = 0;
|
||||
qint64 lastModified = 0;
|
||||
FileStatus fileStatus = FileStatus::Valid;
|
||||
};
|
||||
|
||||
// PresentationContent - Inhalt einer Präsentation
|
||||
struct PresentationContent
|
||||
{
|
||||
QString attributes;
|
||||
QString channel;
|
||||
QString description;
|
||||
int32_t duration = 0;
|
||||
double height = 0.0;
|
||||
int32_t id = 0;
|
||||
int32_t index = 0;
|
||||
int32_t presentationId = 0;
|
||||
QString presentationTopicType;
|
||||
qint64 startTime = 0;
|
||||
double width = 0.0;
|
||||
double x = 0.0;
|
||||
double y = 0.0;
|
||||
};
|
||||
|
||||
// GetPresentationContentReply - Reply für GetPresentationContent Request
|
||||
struct GetPresentationContentReply
|
||||
{
|
||||
QList<PresentationContent> content;
|
||||
};
|
||||
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Dtc - Data Transfer Component für Presentation Management
|
||||
*
|
||||
* DDS-generierte Klasse mit Präsentation-Daten und Signalen für Änderungen.
|
||||
*/
|
||||
class Dtc : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Dtc() = default;
|
||||
~Dtc() override = default;
|
||||
|
||||
// Präsentations-Liste abrufen (Callback-basiert)
|
||||
void presentations(const std::function<void(const Presentation&)>& callback) const
|
||||
{
|
||||
for (const auto& p : m_presentations)
|
||||
{
|
||||
callback(p);
|
||||
}
|
||||
}
|
||||
|
||||
// Präsentations-Liste als QList (für direkten Zugriff)
|
||||
QList<Presentation> presentationsList() const
|
||||
{
|
||||
return m_presentations;
|
||||
}
|
||||
|
||||
// Präsentation hinzufügen/entfernen/ändern
|
||||
void addPresentation(const Presentation& p)
|
||||
{
|
||||
m_presentations.append(p);
|
||||
emit presentationChanged(p, 0); // 0 = added
|
||||
}
|
||||
|
||||
void updatePresentation(const Presentation& p)
|
||||
{
|
||||
for (auto& existing : m_presentations)
|
||||
{
|
||||
if (existing.id == p.id)
|
||||
{
|
||||
existing = p;
|
||||
emit presentationChanged(p, 1); // 1 = modified
|
||||
return;
|
||||
}
|
||||
}
|
||||
addPresentation(p);
|
||||
}
|
||||
|
||||
void removePresentation(int id)
|
||||
{
|
||||
for (auto it = m_presentations.begin(); it != m_presentations.end(); ++it)
|
||||
{
|
||||
if (it->id == id)
|
||||
{
|
||||
Presentation removed = *it;
|
||||
m_presentations.erase(it);
|
||||
emit presentationChanged(removed, 2); // 2 = removed
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Content getter/setter für PresentationContent
|
||||
void content(const std::function<void(const PresentationContent&)>& callback) const
|
||||
{
|
||||
for (const auto& c : m_content)
|
||||
{
|
||||
callback(c);
|
||||
}
|
||||
}
|
||||
|
||||
QList<PresentationContent> contentList() const
|
||||
{
|
||||
return m_content;
|
||||
}
|
||||
|
||||
void setContent(const QList<PresentationContent>& content)
|
||||
{
|
||||
m_content = content;
|
||||
}
|
||||
|
||||
signals:
|
||||
// Signal für Präsentations-Änderungen
|
||||
void presentationChanged(const Presentation& presentation, int modificationType);
|
||||
|
||||
private:
|
||||
QList<Presentation> m_presentations;
|
||||
QList<PresentationContent> m_content;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Ftc - Filter Topic Client für Presentation Management
|
||||
*
|
||||
* DDS-generierte Klasse für Presentation-Client-Operationen.
|
||||
*/
|
||||
class Ftc
|
||||
{
|
||||
public:
|
||||
using ModifyTypeReplyHandler = std::function<void(bool success)>;
|
||||
|
||||
virtual ~Ftc() = default;
|
||||
|
||||
/**
|
||||
* @brief Factory-Methode zur Erstellung einer Ftc-Instanz
|
||||
* @param connector DDS-Connector (wird im Stub ignoriert)
|
||||
* @return Shared Pointer zur Ftc-Instanz (nullptr im Stub)
|
||||
*/
|
||||
static std::shared_ptr<Ftc> create(void* /*connector*/)
|
||||
{
|
||||
return nullptr; // Stub returns nullptr - actual implementation requires DDS
|
||||
}
|
||||
|
||||
// PresentationModify Reply Handler
|
||||
virtual void presentationModifyReply(ModifyTypeReplyHandler handler) = 0;
|
||||
|
||||
// PresentationRemove Reply Handler
|
||||
virtual void presentationRemoveReply(ModifyTypeReplyHandler handler) = 0;
|
||||
|
||||
// GetPresentationContent Reply Handler
|
||||
virtual void getPresentationContentReply(const GetPresentationContentReply& reply) = 0;
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
} // namespace PresentationManagement
|
||||
Reference in new issue
Block a user