mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
Ref T514, signal/slot for model loading progress displayed in UI
This commit is contained in:
committed by
Mat Sutcliffe
parent
f8ee2acf5d
commit
474b1aad6c
@@ -275,9 +275,10 @@ namespace BlackMisc
|
||||
IAircraftModelLoader *CMultiAircraftModelLoaderProvider::initLoader(const CSimulatorInfo &simulator)
|
||||
{
|
||||
IAircraftModelLoader *loader = IAircraftModelLoader::createModelLoader(simulator, this);
|
||||
connect(loader, &IAircraftModelLoader::loadingFinished, this, &CMultiAircraftModelLoaderProvider::loadingFinished);
|
||||
connect(loader, &IAircraftModelLoader::loadingFinished, this, &CMultiAircraftModelLoaderProvider::loadingFinished);
|
||||
connect(loader, &IAircraftModelLoader::diskLoadingStarted, this, &CMultiAircraftModelLoaderProvider::diskLoadingStarted);
|
||||
connect(loader, &IAircraftModelLoader::cacheChanged, this, &CMultiAircraftModelLoaderProvider::cacheChanged);
|
||||
connect(loader, &IAircraftModelLoader::cacheChanged, this, &CMultiAircraftModelLoaderProvider::cacheChanged);
|
||||
connect(loader, &IAircraftModelLoader::loadingProgress, this, &CMultiAircraftModelLoaderProvider::loadingProgress);
|
||||
return loader;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,6 +138,12 @@ namespace BlackMisc
|
||||
//! \remark does to fire if the cache has been changed elsewhere and it has just been reloaded here!
|
||||
void loadingFinished(const BlackMisc::CStatusMessageList &status, const BlackMisc::Simulation::CSimulatorInfo &simulator, BlackMisc::Simulation::IAircraftModelLoader::LoadFinishedInfo info);
|
||||
|
||||
//! Loading progress, normally from disk
|
||||
//! \param simulator corresponding simulator
|
||||
//! \param message a progress message which can be sent by each individual loader implementation as needed
|
||||
//! \param progressPercentage 0-100 or -1 if not available
|
||||
void loadingProgress(const BlackMisc::Simulation::CSimulatorInfo &simulator, const QString &message, int progressPercentage);
|
||||
|
||||
//! Relayed from centralized caches
|
||||
//! \remark this can result from loading, the cache changed elsewhere or clearing data
|
||||
void cacheChanged(const BlackMisc::Simulation::CSimulatorInfo &simulator);
|
||||
@@ -224,6 +230,9 @@ namespace BlackMisc
|
||||
//! \copydoc IAircraftModelLoader::diskLoadingStarted
|
||||
void diskLoadingStarted(const BlackMisc::Simulation::CSimulatorInfo &simulator, BlackMisc::Simulation::IAircraftModelLoader::LoadMode mode);
|
||||
|
||||
//! \copydoc IAircraftModelLoader::loadingProgress
|
||||
void loadingProgress(const BlackMisc::Simulation::CSimulatorInfo &simulator, const QString &message, int progressPercentage);
|
||||
|
||||
//! \copydoc IAircraftModelLoader::cacheChanged
|
||||
void cacheChanged(const BlackMisc::Simulation::CSimulatorInfo &simulator);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user