- training_area_telegrams.cpp: Fixed QJsonObject initializer syntax (Qt6 requires {{}} not ({}))
- training_area_telegrams.cpp: Fixed fromJson() methods to access m_* members directly
- training_area_telegrams.cpp: Fixed brace mismatches in multiple toJson() methods
- training_area_telegrams.h: Changed Header struct to public members for consistency
- tx_mixin.cpp: Fixed getEquipmentNumber() template for direct member access
- lts_coordinate.cpp: Added missing #include <iomanip>
- MIGRATION_STATUS.md: Added migration progress tracking document
C++17 constraint enforced due to RTI Connext DDS 7.7.0 incompatibility with C++20+
Build status: BUILD_RTI=OFF successful (0 errors, warnings only)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
100 lines
2.3 KiB
C++
100 lines
2.3 KiB
C++
/**
|
|
* @RDE_HEADER@
|
|
* Events provided by LtsWidgets
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "lts_widgets_export.h"
|
|
|
|
#include <QtCore/QEvent>
|
|
#include <QtGui/QPixmap>
|
|
#include <QtCore/QPointer>
|
|
#include <QtWidgets/QWidget>
|
|
#include <QtCore/QUrl>
|
|
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
class LTSWIDGETS_EXPORT LtsLinkEvent : public QEvent
|
|
{
|
|
public:
|
|
explicit LtsLinkEvent(QUrl url, QWidget *sourceBaseLayoutWidget)
|
|
: QEvent(eventTypeId())
|
|
, m_url(std::move(url))
|
|
, m_sourceBaseLayoutWidget(sourceBaseLayoutWidget)
|
|
{}
|
|
|
|
static QEvent::Type eventTypeId();
|
|
QWidget *sourceBaseLayoutWidget() const { return m_sourceBaseLayoutWidget.data(); }
|
|
QUrl url() const { return m_url; }
|
|
private:
|
|
QUrl m_url;
|
|
QPointer<QWidget> m_sourceBaseLayoutWidget;
|
|
};
|
|
|
|
class LTSWIDGETS_EXPORT SaveImageEvent : public QEvent
|
|
{
|
|
public:
|
|
SaveImageEvent(QWidget *w, QPixmap &&pm)
|
|
: QEvent(saveImageEventId()), m_widget(w), m_pix(std::move(pm))
|
|
{}
|
|
|
|
const QPixmap &pixmap() const { return m_pix; }
|
|
QWidget *widget() const { return m_widget.data(); }
|
|
static QEvent::Type saveImageEventId();
|
|
private:
|
|
QPointer<QWidget> m_widget;
|
|
QPixmap m_pix;
|
|
};
|
|
|
|
class LTSWIDGETS_EXPORT AddMarkerEvent : public QEvent
|
|
{
|
|
public:
|
|
AddMarkerEvent()
|
|
: QEvent(addMarkerEventId())
|
|
{}
|
|
static QEvent::Type addMarkerEventId();
|
|
};
|
|
|
|
class LTSWIDGETS_EXPORT SetMarkerEvent : public QEvent
|
|
{
|
|
public:
|
|
SetMarkerEvent(const QString &description)
|
|
: QEvent(setMarkerEventId()), m_description(description)
|
|
{}
|
|
const QString &getDescription() const { return m_description; }
|
|
void setDescription(const QString &description) { m_description = description; }
|
|
static QEvent::Type setMarkerEventId();
|
|
private:
|
|
QString m_description;
|
|
};
|
|
|
|
class LTSWIDGETS_EXPORT AddSnapshotEvent : public QEvent
|
|
{
|
|
public:
|
|
AddSnapshotEvent()
|
|
: QEvent(addSnapshotEventId())
|
|
{}
|
|
static QEvent::Type addSnapshotEventId();
|
|
};
|
|
|
|
class LTSWIDGETS_EXPORT SaveSnapshotEvent : public QEvent
|
|
{
|
|
public:
|
|
SaveSnapshotEvent(const QString &description)
|
|
: QEvent(saveSnapshotEventId()), m_description(description)
|
|
{}
|
|
const QString &getDescription() const { return m_description; }
|
|
void setDescription(const QString &description) { m_description = description; }
|
|
static QEvent::Type saveSnapshotEventId();
|
|
private:
|
|
QString m_description;
|
|
};
|
|
|
|
|
|
} // namespace LtsWidgets
|