Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/include/MarkerManagement/mrk_dtc.h
T

59 lines
1.2 KiB
C++

#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
#include <cstdint>
#include <functional>
#include <optional>
#include <string>
#include <vector>
#include <QObject>
#include "LtsUtils/LtsUtilsCore/data_modification_enum.h"
#include "mrk_marker.h"
namespace MarkerManagement
{
namespace Interface
{
// Dtc interface class with signals for Qt6 migration STUB
class Dtc : public QObject
{
Q_OBJECT
public:
explicit Dtc(QObject* parent = nullptr) : QObject(parent) {}
~Dtc() override = default;
// Callback registration instead of enableNotification()
void markers(std::function<void(const Marker&)> callback)
{
m_markerCallback = callback;
}
// Trigger marker changed (for STUB testing)
void triggerMarkerChanged(const Marker& marker, DataModification modType)
{
emit markerChanged(marker, modType);
if (m_markerCallback)
{
m_markerCallback(marker);
}
}
signals:
void markerChanged(const Marker& marker, DataModification modType);
private:
std::function<void(const Marker&)> m_markerCallback;
};
class Ftc;
} // namespace Interface
} // namespace MarkerManagement