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:
145 files changed
+17700
-14377
No files matched your search
@@ -1,71 +1,81 @@
|
||||
#include "lts_splash.h"
|
||||
|
||||
#include <LtsWidgets/lts_global_wait_dialog.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QEvent>
|
||||
#include <QFile>
|
||||
#include <QEvent>
|
||||
|
||||
|
||||
namespace LtsWidgets
|
||||
{
|
||||
|
||||
Splash::Splash() : QSplashScreen(), m_done(false)
|
||||
Splash::Splash()
|
||||
: QSplashScreen()
|
||||
, m_done(false)
|
||||
{
|
||||
static const auto splashFiles = {
|
||||
QStringLiteral(":/project/splash.png"),
|
||||
QStringLiteral(":/project/splash.jpg"),
|
||||
};
|
||||
for (const QString& f : splashFiles)
|
||||
{
|
||||
if (!QFile::exists(f))
|
||||
continue;
|
||||
setPixmap(QPixmap(f));
|
||||
break;
|
||||
}
|
||||
static const auto splashFiles =
|
||||
{
|
||||
QStringLiteral(":/project/splash.png"),
|
||||
QStringLiteral(":/project/splash.jpg"),
|
||||
};
|
||||
for (const QString &f : splashFiles)
|
||||
{
|
||||
if (!QFile::exists(f))
|
||||
continue;
|
||||
setPixmap(QPixmap(f));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool Splash::event(QEvent* e)
|
||||
{
|
||||
if (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonRelease ||
|
||||
e->type() == QEvent::MouseButtonDblClick)
|
||||
{
|
||||
e->ignore();
|
||||
return false;
|
||||
}
|
||||
|
||||
return QSplashScreen::event(e);
|
||||
bool Splash::event(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::MouseButtonPress ||
|
||||
e->type() == QEvent::MouseButtonRelease ||
|
||||
e->type() == QEvent::MouseButtonDblClick)
|
||||
{
|
||||
e->ignore();
|
||||
return false;
|
||||
}
|
||||
|
||||
return QSplashScreen::event(e);
|
||||
}
|
||||
|
||||
void Splash::setMessage(const QString& message)
|
||||
|
||||
void Splash::setMessage(const QString &message)
|
||||
{
|
||||
showMessage(message, Qt::AlignRight | Qt::AlignBottom);
|
||||
showMessage(message, Qt::AlignRight | Qt::AlignBottom);
|
||||
}
|
||||
|
||||
|
||||
void Splash::done()
|
||||
{
|
||||
if (m_done)
|
||||
return;
|
||||
m_done = true;
|
||||
if (m_done)
|
||||
return;
|
||||
m_done = true;
|
||||
|
||||
hide();
|
||||
LtsWidgets::LtsGlobalWaitDialog::getInstance()->setVisible(true);
|
||||
hide();
|
||||
LtsWidgets::LtsGlobalWaitDialog::getInstance()->setVisible(true); // after the splash has finished, wait dlgs are allowed
|
||||
}
|
||||
|
||||
static Splash* s_splashInstance = nullptr;
|
||||
|
||||
static Splash *s_splashInstance = nullptr;
|
||||
void Splash::cleanupSplashInstance()
|
||||
{
|
||||
delete s_splashInstance;
|
||||
s_splashInstance = nullptr;
|
||||
delete s_splashInstance;
|
||||
s_splashInstance = nullptr;
|
||||
}
|
||||
|
||||
Splash* Splash::getInstance()
|
||||
|
||||
Splash *Splash::getInstance()
|
||||
{
|
||||
if (!s_splashInstance)
|
||||
{
|
||||
s_splashInstance = new Splash;
|
||||
qAddPostRoutine(&Splash::cleanupSplashInstance);
|
||||
}
|
||||
return s_splashInstance;
|
||||
if (!s_splashInstance)
|
||||
{
|
||||
s_splashInstance = new Splash;
|
||||
qAddPostRoutine(&Splash::cleanupSplashInstance);
|
||||
}
|
||||
return s_splashInstance;
|
||||
}
|
||||
|
||||
} // namespace LtsWidgets
|
||||
Reference in new issue
Block a user