mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #614, renamed to CAircraftModelSetLoader and detect changes in cache
This commit is contained in:
@@ -26,16 +26,25 @@ namespace BlackMisc
|
||||
/*!
|
||||
* Handling of current set for simulator
|
||||
*/
|
||||
class BLACKMISC_EXPORT CModelSetLoader : public QObject
|
||||
class BLACKMISC_EXPORT CAircraftModelSetLoader :
|
||||
public QObject,
|
||||
public BlackMisc::Simulation::IModelsSetable,
|
||||
public BlackMisc::Simulation::IModelsUpdatable,
|
||||
public BlackMisc::Simulation::IModelsPerSimulatorSetable,
|
||||
public BlackMisc::Simulation::IModelsPerSimulatorUpdatable
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(BlackMisc::Simulation::IModelsSetable)
|
||||
Q_INTERFACES(BlackMisc::Simulation::IModelsUpdatable)
|
||||
Q_INTERFACES(BlackMisc::Simulation::IModelsPerSimulatorSetable)
|
||||
Q_INTERFACES(BlackMisc::Simulation::IModelsPerSimulatorUpdatable)
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
CModelSetLoader(const CSimulatorInfo &info, QObject *parent = nullptr);
|
||||
CAircraftModelSetLoader(const CSimulatorInfo &info, QObject *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CModelSetLoader();
|
||||
virtual ~CAircraftModelSetLoader();
|
||||
|
||||
//! The loaded models
|
||||
//! \threadsafe
|
||||
@@ -60,6 +69,9 @@ namespace BlackMisc
|
||||
//! Simulator has been changed
|
||||
void simulatorChanged(const BlackMisc::Simulation::CSimulatorInfo &simulator);
|
||||
|
||||
//! Cache changed
|
||||
void cacheChanged(const BlackMisc::Simulation::CSimulatorInfo &simulator);
|
||||
|
||||
public slots:
|
||||
//! Set cache from outside, this should only be used in special cases.
|
||||
//! But it allows to modify data elsewhere and update the cache with manipulated data.
|
||||
@@ -85,7 +97,7 @@ namespace BlackMisc
|
||||
//! Clear cache
|
||||
BlackMisc::CStatusMessage clearCache();
|
||||
|
||||
BlackMisc::Simulation::CSimulatorInfo m_simulatorInfo; //!< Corresponding simulator
|
||||
BlackMisc::Simulation::CSimulatorInfo m_simulatorInfo; //!< Corresponding simulator
|
||||
BlackMisc::Simulation::Data::CModelSetCaches m_caches { this }; //!< caches
|
||||
};
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user