Ref T292, Ref T285 added signal in loader for "disk loading" and fixed displaying of "already loading" messages

This commit is contained in:
Klaus Basan
2018-07-25 02:28:26 +02:00
parent 74fa7d7289
commit 94bf4b2249
4 changed files with 34 additions and 4 deletions

View File

@@ -255,6 +255,7 @@ namespace BlackMisc
{
IAircraftModelLoader *loader = IAircraftModelLoader::createModelLoader(simulator, this);
connect(loader, &IAircraftModelLoader::loadingFinished, this, &CMultiAircraftModelLoaderProvider::loadingFinished);
connect(loader, &IAircraftModelLoader::diskLoadingStarted, this, &CMultiAircraftModelLoaderProvider::diskLoadingStarted);
return loader;
}
} // ns

View File

@@ -129,6 +129,10 @@ namespace BlackMisc
static IAircraftModelLoader *createModelLoader(const CSimulatorInfo &simulator, QObject *parent = nullptr);
signals:
//! Disk loading started
//! \remark will only indicate loading from disk, not cache loading
void diskLoadingStarted(const CSimulatorInfo &simulator, LoadMode loadMode);
//! Parsing is finished or cache has been loaded
//! \remark does to fire if the cache has been changed elsewhere and it has just been reloaded here!
void loadingFinished(const CStatusMessageList &status, const CSimulatorInfo &simulator, LoadFinishedInfo info);
@@ -186,6 +190,9 @@ namespace BlackMisc
//! \copydoc IAircraftModelLoader::loadingFinished
void loadingFinished(const CStatusMessageList &status, const CSimulatorInfo &simulator, IAircraftModelLoader::LoadFinishedInfo info);
//! \copydoc IAircraftModelLoader::diskLoadingStarted
void diskLoadingStarted(const CSimulatorInfo &simulator, IAircraftModelLoader::LoadMode mode);
private:
IAircraftModelLoader *m_loaderFsx = nullptr;
IAircraftModelLoader *m_loaderP3D = nullptr;