mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 11:45:40 +08:00
refactor: Remove remaining parts of dynamic splashscreen messages
The splash screen was already refactored with bfc27f6 for better readability
This commit is contained in:
@@ -122,9 +122,6 @@ namespace BlackGui
|
|||||||
// notify when app goes down
|
// notify when app goes down
|
||||||
connect(qGuiApp, &QGuiApplication::lastWindowClosed, this, &CGuiApplication::gracefulShutdown);
|
connect(qGuiApp, &QGuiApplication::lastWindowClosed, this, &CGuiApplication::gracefulShutdown);
|
||||||
|
|
||||||
// follow up on web data services
|
|
||||||
connect(this, &CApplication::webDataServicesStarted, this, &CGuiApplication::onWebDataServicesStarted);
|
|
||||||
|
|
||||||
if (!sGui)
|
if (!sGui)
|
||||||
{
|
{
|
||||||
CGuiApplication::registerMetadata();
|
CGuiApplication::registerMetadata();
|
||||||
@@ -197,19 +194,6 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuiApplication::splashScreen(const QString &resource)
|
|
||||||
{
|
|
||||||
if (m_splashScreen)
|
|
||||||
{
|
|
||||||
m_splashScreen.reset(); // delete old one
|
|
||||||
}
|
|
||||||
if (!resource.isEmpty())
|
|
||||||
{
|
|
||||||
const QPixmap pm(resource);
|
|
||||||
this->splashScreen(pm);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGuiApplication::splashScreen(const QPixmap &pixmap)
|
void CGuiApplication::splashScreen(const QPixmap &pixmap)
|
||||||
{
|
{
|
||||||
if (m_splashScreen)
|
if (m_splashScreen)
|
||||||
@@ -227,29 +211,6 @@ namespace BlackGui
|
|||||||
m_splashScreen->show();
|
m_splashScreen->show();
|
||||||
m_splashScreen->showStatusMessage("Version " + CBuildConfig::getVersionString());
|
m_splashScreen->showStatusMessage("Version " + CBuildConfig::getVersionString());
|
||||||
m_splashScreen->setSplashFont(splashFont);
|
m_splashScreen->setSplashFont(splashFont);
|
||||||
|
|
||||||
this->processEventsToRefreshGui();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGuiApplication::displaySplashMessage(const CStatusMessage &msg)
|
|
||||||
{
|
|
||||||
if (msg.isEmpty()) { return; }
|
|
||||||
if (!m_splashScreen) { return; }
|
|
||||||
if (this->isShuttingDown()) { return; }
|
|
||||||
if (!m_splashScreen->isVisible()) { return; }
|
|
||||||
m_splashScreen->showStatusMessage(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGuiApplication::displaySplashMessages(const CStatusMessageList &msgs)
|
|
||||||
{
|
|
||||||
if (msgs.isEmpty()) { return; }
|
|
||||||
for (const CStatusMessage &m : msgs)
|
|
||||||
{
|
|
||||||
if (!m_splashScreen) { return; }
|
|
||||||
this->displaySplashMessage(m);
|
|
||||||
this->processEventsToRefreshGui();
|
|
||||||
if (!sGui) { return; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuiApplication::processEventsToRefreshGui() const
|
void CGuiApplication::processEventsToRefreshGui() const
|
||||||
@@ -1401,14 +1362,6 @@ namespace BlackGui
|
|||||||
m_fontPointSize = font.pointSize();
|
m_fontPointSize = font.pointSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuiApplication::onWebDataServicesStarted(bool success)
|
|
||||||
{
|
|
||||||
if (success)
|
|
||||||
{
|
|
||||||
connect(this->getWebDataServices(), &CWebDataServices::databaseReaderMessages, this, &CGuiApplication::displaySplashMessages, Qt::QueuedConnection);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGuiApplication::superviseWindowMinSizes()
|
void CGuiApplication::superviseWindowMinSizes()
|
||||||
{
|
{
|
||||||
CGuiUtility::superviseMainWindowMinSizes();
|
CGuiUtility::superviseMainWindowMinSizes();
|
||||||
|
|||||||
@@ -142,18 +142,9 @@ namespace BlackGui
|
|||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
// -------- Splash screen related ---------
|
// -------- Splash screen related ---------
|
||||||
//! Add a splash screen based on resource, empty means remove splash screen
|
|
||||||
void splashScreen(const QString &resource);
|
|
||||||
|
|
||||||
//! Add a splash screen based on resource, empty means remove splash screen
|
//! Add a splash screen based on resource, empty means remove splash screen
|
||||||
void splashScreen(const QPixmap &pixmap);
|
void splashScreen(const QPixmap &pixmap);
|
||||||
|
|
||||||
//! @{
|
|
||||||
//! Display splash screen messages if screen is available and visible
|
|
||||||
void displaySplashMessage(const BlackMisc::CStatusMessage &msg);
|
|
||||||
void displaySplashMessages(const BlackMisc::CStatusMessageList &msgs);
|
|
||||||
//! @}
|
|
||||||
|
|
||||||
// -------- Splash screen related ---------
|
// -------- Splash screen related ---------
|
||||||
|
|
||||||
//! Add menu items for settings and cache
|
//! Add menu items for settings and cache
|
||||||
@@ -381,9 +372,6 @@ namespace BlackGui
|
|||||||
//! Set current font values
|
//! Set current font values
|
||||||
void setCurrentFontValues();
|
void setCurrentFontValues();
|
||||||
|
|
||||||
//! Web data services started
|
|
||||||
void onWebDataServicesStarted(bool success);
|
|
||||||
|
|
||||||
//! \copydoc BlackGui::CGuiUtility::superviseMainWindowMinSizes
|
//! \copydoc BlackGui::CGuiUtility::superviseMainWindowMinSizes
|
||||||
void superviseWindowMinSizes();
|
void superviseWindowMinSizes();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user