Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Common/LtsMultiMonitor/lts_screen_base.cpp
T
torstenandCopilot 7a6be7474e Qt6 migration: Fix BUILD_RTI=OFF build errors in TrainingAreaBase
- 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>
2026-08-23 20:49:23 +02:00

53 lines
1.6 KiB
C++

#include "lts_screen_base.h"
#include "lts_dummy_widget.h"
#include <LtsUtils/LtsUtilsCore/promise.h>
#include <LtsWidgets/lts_base_layout_widget.h>
#include <QtGui/QCloseEvent>
#include <QtCore/QDebug>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QSplitter>
#ifdef Q_OS_WIN
#include <QtPlatformHeaders/qwindowswindowfunctions.h>
#endif
class NoCloseWidget : public QWidget
{
void closeEvent(QCloseEvent* event) override
{
event->ignore();
}
};
namespace LtsMultiMonitor
{
LtsScreenBase::LtsScreenBase(QRect screenGeo, int screenId, bool debugMargins, const QString& serial)
: m_screenDialog(new NoCloseWidget()), m_screenId(screenId), m_serial(serial), m_screenRect(screenGeo)
{
connect(this, &LtsScreenBase::destroyed, m_screenDialog, &QWidget::deleteLater);
if (debugMargins)
{
qWarning() << "LtsScreenBase: screen rect adjusted for dev machines!";
m_screenRect.adjust(+50, +50, -100, -100);
}
m_screenDialog->setWindowFlags(Qt::FramelessWindowHint);
m_screenDialog->setGeometry(m_screenRect);
m_screenDialog->setMinimumSize(m_screenRect.width(), m_screenRect.height());
m_screenDialog->setMaximumSize(m_screenRect.width(), m_screenRect.height());
m_screenDialog->setContentsMargins(0, 0, 0, 0);
m_screenDialog->setWindowFlag(Qt::WindowType::WindowStaysOnBottomHint);
#ifdef Q_OS_WIN
m_screenDialog->winId();
QWindowsWindowFunctions::setHasBorderInFullScreen(m_screenDialog->windowHandle(), true);
#endif
m_screenDialog->activateWindow();
m_screenDialog->show();
}
} // namespace LtsMultiMonitor