- 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>
106 lines
2.3 KiB
C++
Executable File
106 lines
2.3 KiB
C++
Executable File
|
|
|
|
#pragma once
|
|
|
|
#include <QtWidgets/QPushButton>
|
|
|
|
#include "nglwidgets_export.h"
|
|
|
|
|
|
|
|
|
|
class NGLWIDGETS_EXPORT NGLStandardButton : public QPushButton
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(StandardButton standardButton READ type WRITE setType)
|
|
Q_PROPERTY(qint32 layoutPriority READ layoutPriority WRITE setLayoutPriority)
|
|
|
|
public:
|
|
|
|
|
|
enum StandardButton
|
|
{
|
|
NoButton = 0x00000000,
|
|
Ok = 0x00000001,
|
|
Save = 0x00000002,
|
|
Open = 0x00000004,
|
|
Yes = 0x00000008,
|
|
No = 0x00000010,
|
|
Close = 0x00000020,
|
|
Cancel = 0x00000040,
|
|
Help = 0x00000080,
|
|
Apply = 0x00000100,
|
|
Reset = 0x00000200,
|
|
Print = 0x00000400,
|
|
Add = 0x00000800,
|
|
Remove = 0x00002000,
|
|
Edit = 0x00008000,
|
|
Send = 0x00010000,
|
|
New = 0x00020000,
|
|
Delete = 0x00040000,
|
|
Download = 0x00080000,
|
|
Library = 0x00100000,
|
|
Show = 0x00200000,
|
|
ZoomIn = 0x00400000,
|
|
ZoomOut = 0x00800000,
|
|
Modify = 0x01000000,
|
|
Hide = 0x02000000,
|
|
|
|
#ifndef Q_MOC_RUN
|
|
FirstButton = Ok,
|
|
LastButton = Hide
|
|
#endif
|
|
};
|
|
Q_ENUM(StandardButton)
|
|
Q_DECLARE_FLAGS(StandardButtons, StandardButton)
|
|
Q_FLAG(StandardButtons)
|
|
|
|
|
|
|
|
explicit NGLStandardButton(QWidget *parent = nullptr);
|
|
|
|
|
|
explicit NGLStandardButton(StandardButton type, QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
StandardButton type() const;
|
|
|
|
|
|
void setType(StandardButton t);
|
|
|
|
|
|
|
|
void setLayoutPriority(qint32 priority);
|
|
|
|
|
|
|
|
virtual qint32 layoutPriority() const;
|
|
|
|
|
|
|
|
QList<QAction *> actions() const;
|
|
|
|
|
|
|
|
void setDefaultText(const char *text);
|
|
|
|
|
|
|
|
void setDefaultToolTip(const char *toolTip);
|
|
|
|
protected:
|
|
StandardButton m_type;
|
|
qint32 m_layoutPriority;
|
|
QByteArray m_defaultText;
|
|
QByteArray m_defaultToolTip;
|
|
QList<QAction *> m_actionList;
|
|
|
|
virtual void changeEvent(QEvent *e);
|
|
private:
|
|
void init();
|
|
};
|
|
Q_DECLARE_OPERATORS_FOR_FLAGS(NGLStandardButton::StandardButtons)
|
|
|
|
|