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,13 +1,20 @@
/**
* @RDE_HEADER@
* ToolBarArea that accepts LtsDragIcons
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include "lts_widgets_export.h"
#include <QMap>
#include <QObject>
#include <QShortcut>
#include <QVector>
#include <QWidget>
#include <QVector>
#include <QShortcut>
#include <QMap>
class QMenu;
class QLabel;
@@ -23,96 +30,91 @@ class LtsDragIcon;
struct ShortCut
{
int key = 0;
QShortcut* shortcut = nullptr;
QString name;
QString identifier;
LtsDragIcon* icon = nullptr;
int key = 0;
QShortcut *shortcut = nullptr;
QString name;
QString identifier;
LtsDragIcon *icon = nullptr;
QString keyName() const {return shortcut ? shortcut->key().toString() : QString();}
void clear();
QString keyName() const
explicit ShortCut(QWidget *parent = nullptr)
: shortcut(new QShortcut(parent))
{}
~ShortCut() { delete shortcut; }
ShortCut(const ShortCut &o)
: key(o.key)
, name(o.name)
, identifier(o.identifier)
, icon(o.icon)
{
if (o.shortcut)
{
return shortcut ? shortcut->key().toString() : QString();
delete shortcut;
shortcut = new QShortcut(o.shortcut->key(), qobject_cast<QWidget*>(o.shortcut->parent()), nullptr, nullptr, o.shortcut->context());
}
}
void clear();
ShortCut &operator=(const ShortCut &o)
{
if (&o == this)
return *this;
explicit ShortCut(QWidget* parent = nullptr) : shortcut(new QShortcut(parent)) {}
~ShortCut()
{
delete shortcut;
}
ShortCut(const ShortCut& o) : key(o.key), name(o.name), identifier(o.identifier), icon(o.icon)
{
if (o.shortcut)
{
delete shortcut;
shortcut = new QShortcut(o.shortcut->key(), qobject_cast<QWidget*>(o.shortcut->parent()), nullptr, nullptr,
o.shortcut->context());
}
}
ShortCut& operator=(const ShortCut& o)
{
if (&o == this)
return *this;
key = o.key;
name = o.name;
identifier = o.identifier;
icon = o.icon;
QWidget* parent = qobject_cast<QWidget*>(shortcut->parent());
delete shortcut;
if (o.shortcut)
shortcut = new QShortcut(o.shortcut->key(), qobject_cast<QWidget*>(o.shortcut->parent()), nullptr, nullptr,
o.shortcut->context());
else
shortcut = new QShortcut(parent);
return *this;
}
key = o.key;
name = o.name;
identifier = o.identifier;
icon = o.icon;
QWidget *parent = qobject_cast<QWidget*>(shortcut->parent());
delete shortcut;
if (o.shortcut)
shortcut = new QShortcut(o.shortcut->key(), qobject_cast<QWidget*>(o.shortcut->parent()), nullptr, nullptr, o.shortcut->context());
else
shortcut = new QShortcut(parent);
return *this;
}
};
class LTSWIDGETS_EXPORT LtsToolBarArea : public QWidget
{
Q_OBJECT
public:
explicit LtsToolBarArea(QWidget* parent = nullptr);
~LtsToolBarArea();
Q_OBJECT
public:
explicit LtsToolBarArea(QWidget *parent = nullptr);
~LtsToolBarArea();
void addMenuEntry(LtsDragIcon* entry, LtsDragIcon* after = nullptr);
void clearToolBarArea();
void addMenuEntry(LtsDragIcon *entry, LtsDragIcon *after = nullptr);
void clearToolBarArea();
void setMenuEntries(const QVector<LtsDragIcon*>& actions);
QStringList menuEntries() const;
void setMenuEntries(const QVector<LtsDragIcon *> &actions);
QStringList menuEntries() const;
bool setFunctionKey(int fkey, const QString& action);
QMap<int, QString> functionKeys() const;
bool setFunctionKey(int fkey, const QString &action);
QMap<int, QString> functionKeys() const;
bool removeFunctionKey(const QString& action);
void removeMenuAction(LtsDragIcon* icon);
bool removeFunctionKey(const QString &action);
void removeMenuAction(LtsDragIcon *icon);
public slots:
void showContextMenu(const QPoint& pos);
void functionKeyMenuTriggered();
public slots:
void showContextMenu(const QPoint &pos);
void functionKeyMenuTriggered();
protected:
void dragEnterEvent(QDragEnterEvent* event) override;
void dropEvent(QDropEvent* event) override;
protected:
void dragEnterEvent(QDragEnterEvent *event) override;
void dropEvent(QDropEvent *event) override;
private:
QMenu* functionKeyMenu(QWidget* parent);
QString m_currentIdentifierForContextMenue;
private:
QMenu* functionKeyMenu(QWidget *parent);
QString m_currentIdentifierForContextMenue;
QVector<LtsDragIcon*> m_buttonMap;
QVector<LtsDragIcon*> m_foreignButtonMap;
QMap<int, ShortCut> m_functionKeys;
QLabel* m_dummyLabel;
QVector<LtsDragIcon *> m_buttonMap;
QVector<LtsDragIcon *> m_foreignButtonMap;
QMap<int, ShortCut> m_functionKeys;
QLabel *m_dummyLabel;
Ui::LtsToolBarArea* m_ui;
Ui::LtsToolBarArea *m_ui;
void saveSettings();
void saveSettings();
};
} // namespace LtsWidgets
} //namespace LtsWidgets