mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
refs #485, support splash screen
This commit is contained in:
committed by
Mathew Sutcliffe
parent
90a8368002
commit
45496ce08e
@@ -87,6 +87,9 @@ namespace BlackCore
|
||||
|
||||
this->m_parser.addOptions(this->m_setupReader->getCmdLineOptions());
|
||||
|
||||
// startup done
|
||||
connect(this, &CApplication::startUpCompleted, this, &CApplication::ps_startupCompleted);
|
||||
|
||||
// notify when app goes down
|
||||
connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, this, &CApplication::gracefulShutdown);
|
||||
}
|
||||
@@ -253,6 +256,11 @@ namespace BlackCore
|
||||
return false;
|
||||
}
|
||||
|
||||
void CApplication::signalStartupAutomatically(bool signal)
|
||||
{
|
||||
this->m_signalStartup = signal;
|
||||
}
|
||||
|
||||
QString CApplication::getEnvironmentInfoString(const QString &separator) const
|
||||
{
|
||||
QString env("Beta: ");
|
||||
@@ -536,7 +544,15 @@ namespace BlackCore
|
||||
this->m_started = this->asyncWebAndContextStart();
|
||||
}
|
||||
this->m_startUpCompleted = true;
|
||||
emit this->startUpCompleted(this->m_started);
|
||||
if (this->m_signalStartup)
|
||||
{
|
||||
emit this->startUpCompleted(this->m_started);
|
||||
}
|
||||
}
|
||||
|
||||
void CApplication::ps_startupCompleted()
|
||||
{
|
||||
// void
|
||||
}
|
||||
|
||||
bool CApplication::asyncWebAndContextStart()
|
||||
@@ -575,9 +591,9 @@ namespace BlackCore
|
||||
return l;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
// Parsing
|
||||
// ---------------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------------------
|
||||
// Parsing
|
||||
// ---------------------------------------------------------------------------------
|
||||
|
||||
bool CApplication::addParserOption(const QCommandLineOption &option)
|
||||
{
|
||||
@@ -698,9 +714,9 @@ namespace BlackCore
|
||||
printf("%s %s\n", qPrintable(QCoreApplication::applicationName()), qPrintable(QCoreApplication::applicationVersion()));
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
// Contexts
|
||||
// ---------------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------------------
|
||||
// Contexts
|
||||
// ---------------------------------------------------------------------------------
|
||||
|
||||
bool CApplication::supportsContexts() const
|
||||
{
|
||||
@@ -770,9 +786,9 @@ namespace BlackCore
|
||||
return this->m_coreFacade->getIContextSimulator();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
// Setup
|
||||
// ---------------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------------------
|
||||
// Setup
|
||||
// ---------------------------------------------------------------------------------
|
||||
|
||||
CUrlList CApplication::getVatsimMetarUrls() const
|
||||
{
|
||||
|
||||
@@ -116,6 +116,9 @@ namespace BlackCore
|
||||
//! Running in dev.environment?
|
||||
bool isRunningInDeveloperEnvironment() const;
|
||||
|
||||
//! Signal startup automatically or individually
|
||||
void signalStartupAutomatically(bool signal = false);
|
||||
|
||||
//! Info string
|
||||
QString getEnvironmentInfoString(const QString &separator) const;
|
||||
|
||||
@@ -275,6 +278,9 @@ namespace BlackCore
|
||||
//! Setup read/syncronized
|
||||
void ps_setupSyncronized(bool success);
|
||||
|
||||
//! Startup completed
|
||||
virtual void ps_startupCompleted();
|
||||
|
||||
protected:
|
||||
//! Display help message
|
||||
virtual void cmdLineHelpMessage();
|
||||
@@ -344,6 +350,7 @@ namespace BlackCore
|
||||
std::atomic<bool> m_shutdown { false }; //!< is being shutdown?
|
||||
bool m_useContexts = false; //!< use contexts
|
||||
bool m_useWebData = false; //!< use web data
|
||||
bool m_signalStartup = true; //!< signal startup automatically
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user