Qt6 Migration: LtsWidgets, BUILD_RTI Guards, externe Dependencies dokumentiert

- LtsWidgets Verzeichnis vollständig migriert (Qt5→Qt6)
- BUILD_RTI Guards für RTI-spezifische Module hinzugefügt
- Externe Dependencies in EXTERNAL_DEPS.md dokumentiert
- Qt6 API-Änderungen: QRegExp→QRegularExpression, enterEvent(QEnterEvent*)
- AutoUic-Fehler bei ui_requirement behoben (SKIP_AUTOUIC)
- Include-Pfade korrigiert (LtsElevation, LtsMultiMonitor, LtsUtilsCore)
- MOC-Fehler behoben (Q_INTERFACES entfernt wo nicht benötigt)
- CMakeLists.txt Anpassungen für Qt6 (PUBLIC statt INTERFACE)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-21 10:29:34 +02:00
1 parent 27fe03a03a
commit d890b11c5f
145 files changed
+17700 -14377

No files matched your search

@@ -1,4 +1,10 @@
/**
* @RDE_HEADER@
* ToolBox for Menus
* $Id$
* $HeadURL$
* $Author$
*/
#include "lts_tool_box.h"
@@ -6,65 +12,79 @@
#include "lts_grid_layout.h"
#include <QMenu>
#include <QScrollArea>
#include <QScroller>
#include <QScrollArea>
using namespace LtsWidgets;
LtsToolBox::LtsToolBox(QWidget* parent) : QToolBox(parent)
LtsToolBox::LtsToolBox(QWidget *parent)
: QToolBox(parent)
{
setMinimumSize(17, 200);
setContextMenuPolicy(Qt::CustomContextMenu);
connect(this, &LtsToolBox::customContextMenuRequested, this, &LtsToolBox::showContextMenu);
setMinimumSize(17, 200);
setContextMenuPolicy(Qt::CustomContextMenu);
connect(this, &LtsToolBox::customContextMenuRequested,
this, &LtsToolBox::showContextMenu);
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
}
LtsToolBox::~LtsToolBox() {}
void LtsToolBox::resizeEvent(QResizeEvent* e)
LtsToolBox::~LtsToolBox()
{
emit resized(e);
QToolBox::resizeEvent(e);
}
void LtsToolBox::addItem(QWidget* widget, const QString& text)
void LtsToolBox::resizeEvent(QResizeEvent *e)
{
setMinimumSize(120, 100);
QToolBox::addItem(widget, text);
emit resized(e);
QToolBox::resizeEvent(e);
}
void LtsToolBox::showContextMenu(const QPoint& pos)
void LtsToolBox::addItem(QWidget *widget, const QString &text)
{
setMinimumSize(120, 100);
QToolBox::addItem(widget, text);
}
void LtsToolBox::showContextMenu(const QPoint &pos)
{
QPoint globalPos = this->mapToGlobal(pos);
// for most widgets
QPoint globalPos = this->mapToGlobal(pos);
// for QAbstractScrollArea and derived classes you would use:
// QPoint globalPos = myWidget->viewport()->mapToGlobal(pos);
QMenu myMenu;
myMenu.addAction(tr("Icon and Text"));
QAction* to = myMenu.addAction(tr("Text Only"));
QAction* io = myMenu.addAction(tr("Icon Only"));
QMenu myMenu;
myMenu.addAction(tr("Icon and Text"));
QAction *to = myMenu.addAction(tr("Text Only"));
QAction *io = myMenu.addAction(tr("Icon Only"));
QAction* selectedItem = myMenu.exec(globalPos);
if (selectedItem)
QAction *selectedItem = myMenu.exec(globalPos); // TODO: use popup, use signals & slots
if (selectedItem)
{
ButtonStyle newStyle = ButtonStyle::eTextNextToIcon;
if (selectedItem == to)
newStyle = ButtonStyle::eTextOnly;
if (selectedItem == io)
newStyle = ButtonStyle::eIconOnly;
for (int i = 0; i < count(); i++)
{
ButtonStyle newStyle = ButtonStyle::eTextNextToIcon;
if (selectedItem == to)
newStyle = ButtonStyle::eTextOnly;
if (selectedItem == io)
newStyle = ButtonStyle::eIconOnly;
const QList<LtsDragIcon *> list = widget(i)->findChildren<LtsDragIcon *>();
for (LtsDragIcon *icon : list)
icon->setButtonStyle(newStyle);
LtsGridLayout *lay = qobject_cast<LtsGridLayout *>(widget(i)->layout());
if (lay)
lay->setAutoSize((newStyle == ButtonStyle::eIconOnly));
}
for (int i = 0; i < count(); i++)
{
const QList<LtsDragIcon*> list = widget(i)->findChildren<LtsDragIcon*>();
for (LtsDragIcon* icon : list)
icon->setButtonStyle(newStyle);
LtsGridLayout* lay = qobject_cast<LtsGridLayout*>(widget(i)->layout());
if (lay)
lay->setAutoSize((newStyle == ButtonStyle::eIconOnly));
}
}
else
{
}
}
else
{
// nothing was chosen
}
}