Lts/Common: drop the 17 submodules excluded from the RELEASE_BUILD branch of Lts/Common/CMakeLists.txt (CodeGen, LtsAppManager, LtsBotan, LtsCoordinate, LtsElevation, LtsLogin, LtsMultiMonitor, LtsPluginManager, LtsPrinting, LtsProjectionWorkstation, LtsScriptTimeline, LtsSession, LtsTimeline, LtsTimelineClassic, LtsVirtualKeyboard, LtsWidgets, TopicEditorBase). Only the 13 subdirectories actually built remain. TrainingAreaBase: drop sources of targets excluded by IF(NOT RELEASE_BUILD) / IF(BUILD_RTI) (svcTabClient, svcTabServer, svcTrainingAreaBase exe, RecordReplayPlugin customization) and the 7 plugin directories not added in the release path (AdlerJson, ApacheHlaJson, DebugJsonDir, HlaJson, Nmea, UAS, WlsTetra). Only tabTelegrams, svcTabCommon and the TetraJson plugin are compiled. Cross-checked: no kept compiled source includes headers from the removed modules (GuiPluginInterface - the only LtsWidgets consumer - is itself NOT RELEASE_BUILD-guarded).
82 lines
1.4 KiB
C++
82 lines
1.4 KiB
C++
#include "lts_splash.h"
|
|
|
|
#include <LtsWidgets/lts_global_wait_dialog.h>
|
|
|
|
#include <QtCore/QCoreApplication>
|
|
#include <QtCore/QFile>
|
|
#include <QtCore/QEvent>
|
|
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
|
|
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;
|
|
}
|
|
}
|
|
|
|
|
|
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)
|
|
{
|
|
showMessage(message, Qt::AlignRight | Qt::AlignBottom);
|
|
}
|
|
|
|
|
|
void Splash::done()
|
|
{
|
|
if (m_done)
|
|
return;
|
|
m_done = true;
|
|
|
|
hide();
|
|
LtsWidgets::LtsGlobalWaitDialog::getInstance()->setVisible(true); // after the splash has finished, wait dlgs are allowed
|
|
}
|
|
|
|
|
|
static Splash *s_splashInstance = nullptr;
|
|
void Splash::cleanupSplashInstance()
|
|
{
|
|
delete s_splashInstance;
|
|
s_splashInstance = nullptr;
|
|
}
|
|
|
|
|
|
Splash *Splash::getInstance()
|
|
{
|
|
if (!s_splashInstance)
|
|
{
|
|
s_splashInstance = new Splash;
|
|
qAddPostRoutine(&Splash::cleanupSplashInstance);
|
|
}
|
|
return s_splashInstance;
|
|
}
|
|
|
|
} // namespace LtsWidgets
|