- 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>
60 lines
1.4 KiB
C++
60 lines
1.4 KiB
C++
#include "window.h"
|
|
|
|
#include <LtsWidgets/lts_notification_box.h>
|
|
|
|
#include <QtWidgets/QApplication>
|
|
#include <QtWidgets/QHBoxLayout>
|
|
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
Window::Window(QWidget *parent)
|
|
: QWidget(parent)
|
|
{
|
|
//Q_INIT_RESOURCE(lts_resources);
|
|
|
|
setGeometry(x(), y(), 300, 300);
|
|
|
|
QHBoxLayout *lay = new QHBoxLayout;
|
|
|
|
lay->setContentsMargins(0, 0, 0, 0);
|
|
//lay->setSizeConstraint(QLayout::SetMinimumSize);
|
|
|
|
|
|
auto x1 = new LtsWidgets::LtsNotificationBox;
|
|
lay->addWidget(x1);
|
|
|
|
|
|
if (qApp->arguments().count() < 2)
|
|
abort();
|
|
|
|
|
|
LtsNotificationBox::MessageType type;
|
|
|
|
if (qApp->arguments().at(1) == QStringLiteral("e"))
|
|
type = LtsNotificationBox::MessageType::Error;
|
|
else if (qApp->arguments().at(1) == QStringLiteral("w"))
|
|
type = LtsNotificationBox::MessageType::Warning;
|
|
else if (qApp->arguments().at(1) == QStringLiteral("i"))
|
|
type = LtsNotificationBox::MessageType::Info;
|
|
else if (qApp->arguments().at(1) == QStringLiteral("s"))
|
|
type = LtsNotificationBox::MessageType::Success;
|
|
else
|
|
abort();
|
|
|
|
x1->message(QStringLiteral("Title Message"), QStringLiteral("A text that consists of a lot of characters and also even has<br />two lines."), type);
|
|
connect(x1, &LtsNotificationBox::signalClose, this, &QWidget::close);
|
|
|
|
setLayout(lay);
|
|
|
|
setAttribute(Qt::WA_TranslucentBackground);
|
|
}
|
|
|
|
|
|
Window::~Window()
|
|
{
|
|
//Q_CLEANUP_RESOURCE(lts_resources);
|
|
}
|
|
|
|
} // namespace LtsWidgets
|