mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 13:55:36 +08:00
Ref T131, allow to obtain settings from UI component
Useful if we want to avoid to duplicate the settings, but access existing ones
This commit is contained in:
@@ -31,6 +31,8 @@ using namespace BlackMisc::Aviation;
|
|||||||
using namespace BlackMisc::Audio;
|
using namespace BlackMisc::Audio;
|
||||||
using namespace BlackMisc::PhysicalQuantities;
|
using namespace BlackMisc::PhysicalQuantities;
|
||||||
using namespace BlackMisc::Input;
|
using namespace BlackMisc::Input;
|
||||||
|
using namespace BlackMisc::Simulation;
|
||||||
|
using namespace BlackMisc::Simulation::Settings;
|
||||||
using namespace BlackCore;
|
using namespace BlackCore;
|
||||||
using namespace BlackGui;
|
using namespace BlackGui;
|
||||||
using namespace BlackConfig;
|
using namespace BlackConfig;
|
||||||
@@ -126,6 +128,11 @@ namespace BlackGui
|
|||||||
return ui->comp_AudioSetup->playNotificationSounds();
|
return ui->comp_AudioSetup->playNotificationSounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CSpecializedSimulatorSettings CSettingsComponent::getSimulatorSettings(const CSimulatorInfo &simulator) const
|
||||||
|
{
|
||||||
|
return ui->comp_SettingsSimulatorBasics->getSimulatorSettings(simulator);
|
||||||
|
}
|
||||||
|
|
||||||
void CSettingsComponent::setSettingsTab(CSettingsComponent::SettingTab tab)
|
void CSettingsComponent::setSettingsTab(CSettingsComponent::SettingTab tab)
|
||||||
{
|
{
|
||||||
this->setCurrentIndex(static_cast<int>(tab));
|
this->setCurrentIndex(static_cast<int>(tab));
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#define BLACKGUI_COMPONENTS_SETTINGSCOMPONENT_H
|
#define BLACKGUI_COMPONENTS_SETTINGSCOMPONENT_H
|
||||||
|
|
||||||
#include "blackgui/blackguiexport.h"
|
#include "blackgui/blackguiexport.h"
|
||||||
|
#include "blackmisc/simulation/settings/simulatorsettings.h"
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
@@ -57,6 +58,9 @@ namespace BlackGui
|
|||||||
//! \copydoc CAudioSetupComponent::playNotificationSounds
|
//! \copydoc CAudioSetupComponent::playNotificationSounds
|
||||||
bool playNotificationSounds() const;
|
bool playNotificationSounds() const;
|
||||||
|
|
||||||
|
//! Settings for given simulator
|
||||||
|
BlackMisc::Simulation::Settings::CSpecializedSimulatorSettings getSimulatorSettings(const BlackMisc::Simulation::CSimulatorInfo &simulator) const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
//! Change the windows opacity 0..100
|
//! Change the windows opacity 0..100
|
||||||
void changedWindowsOpacity(int opacity);
|
void changedWindowsOpacity(int opacity);
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ namespace BlackGui
|
|||||||
//! Save data
|
//! Save data
|
||||||
void save();
|
void save();
|
||||||
|
|
||||||
|
//! Settings for given simulator
|
||||||
|
BlackMisc::Simulation::Settings::CSpecializedSimulatorSettings getSimulatorSettings(const BlackMisc::Simulation::CSimulatorInfo &simulator) const { return m_settings.getSpecializedSettings(simulator); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<Ui::CSettingsSimulatorBasicsComponent> ui;
|
QScopedPointer<Ui::CSettingsSimulatorBasicsComponent> ui;
|
||||||
BlackMisc::Simulation::Settings::CMultiSimulatorSettings m_settings { this };
|
BlackMisc::Simulation::Settings::CMultiSimulatorSettings m_settings { this };
|
||||||
|
|||||||
Reference in New Issue
Block a user