Improved version of "Allow to delete data directory from application view"

- split functions into dynamic loading and const versions (loading at startup)
- reload other versions from wizard in case they changed
- some renaming/formatting
This commit is contained in:
Klaus Basan
2018-12-02 04:27:59 +01:00
parent d18c763869
commit 7fc6fcb867
13 changed files with 104 additions and 55 deletions

View File

@@ -57,6 +57,9 @@ namespace BlackGui
//! Dtor
virtual ~CCopySettingsAndCachesComponent();
//! Reload other versions
void reloadOtherVersions();
private:
//! Other version has been changed
void onOtherVersionChanged(const BlackMisc::CApplicationInfo &info);
@@ -111,14 +114,14 @@ namespace BlackGui
QScopedPointer<Ui::CCopySettingsAndCachesComponent> ui;
BlackMisc::CSetting<BlackCore::Audio::TInputDevice> m_settingsAudioInputDevice { this };
BlackMisc::CSetting<BlackCore::Audio::TInputDevice> m_settingsAudioInputDevice { this };
BlackMisc::CSetting<BlackCore::Audio::TOutputDevice> m_settingsAudioOutputDevice { this };
BlackMisc::CSetting<Settings::TGeneralGui> m_settingsGuiGeneral { this };
BlackMisc::CSetting<Settings::TDockWidget> m_settingsDockWidget { this };
BlackMisc::CSetting<Settings::TViewUpdateSettings> m_settingsViewUpdate { this };
BlackMisc::CSetting<Settings::TBackgroundConsolidation> m_settingsConsolidation { this }; //!< consolidation time
BlackMisc::CSetting<Settings::TAtcStationsSettings> m_settingsAtcStations { this };
BlackMisc::CSetting<Settings::TextMessageSettings> m_settingsTextMessage { this };
BlackMisc::CSetting<Settings::TextMessageSettings> m_settingsTextMessage { this };
BlackMisc::CSetting<BlackCore::Application::TEnabledSimulators> m_settingsEnabledSimulators { this };
BlackMisc::CSetting<BlackCore::Application::TActionHotkeys> m_settingsActionHotkeys { this };
BlackMisc::CSetting<BlackCore::Audio::TSettings> m_settingsAudio { this };
@@ -127,7 +130,7 @@ namespace BlackGui
BlackMisc::CSetting<BlackMisc::Simulation::Settings::TSimulatorFsx> m_settingsSimulatorFsx { this }; //!< FSX settings
BlackMisc::CSetting<BlackMisc::Simulation::Settings::TSimulatorFs9> m_settingsSimulatorFs9 { this }; //!< FS9 settings
BlackMisc::CSetting<BlackMisc::Simulation::Settings::TSimulatorP3D> m_settingsSimulatorP3D { this }; //!< P3D settings
BlackMisc::CSetting<BlackMisc::Simulation::Settings::TSimulatorXP> m_settingsSimulatorXPlane { this }; //!< XP settings
BlackMisc::CSetting<BlackMisc::Simulation::Settings::TSimulatorXP> m_settingsSimulatorXPlane { this }; //!< XP settings
BlackMisc::CSetting<BlackMisc::Simulation::Settings::TModel> m_settingsModel { this }; //!< model setting
BlackMisc::CData<BlackCore::Data::TVatsimLastServer> m_cacheLastVatsimServer { this }; //!< recently used VATSIM server
@@ -151,6 +154,9 @@ namespace BlackGui
//! Set config
void setConfigComponent(CCopySettingsAndCachesComponent *config) { m_copyCachesAndSettings = config; }
//! \copydoc QWizardPage::initializePage
virtual void initializePage() override;
//! \copydoc QWizardPage::validatePage
virtual bool validatePage() override;