refs #799, changed components to use settings

* removed update timer
* Removed getter/setters for update times
* used UI component for settings in main settings component
This commit is contained in:
Klaus Basan
2016-11-11 20:41:50 +01:00
parent 5bde36479d
commit df64f31dbf
19 changed files with 141 additions and 383 deletions

View File

@@ -46,11 +46,7 @@ namespace BlackGui
this->setCurrentIndex(0); // 1st tab
ui->comp_DataLoadOverview->setVisibleDbRefreshButtons(false);
this->connect(ui->hs_SettingsGuiAircraftRefreshTime, &QSlider::valueChanged, this, &CSettingsComponent::changedAircraftUpdateInterval);
this->connect(ui->hs_SettingsGuiAtcRefreshTime, &QSlider::valueChanged, this, &CSettingsComponent::changedAtcStationsUpdateInterval);
this->connect(ui->hs_SettingsGuiUserRefreshTime, &QSlider::valueChanged, this, &CSettingsComponent::changedUsersUpdateInterval);
this->connect(ui->comp_SettingsGuiGeneral, &CSettingsGuiComponent::changedWindowsOpacity, this, &CSettingsComponent::changedWindowsOpacity);
connect(ui->comp_SettingsGuiGeneral, &CSettingsGuiComponent::changedWindowsOpacity, this, &CSettingsComponent::changedWindowsOpacity);
connect(ui->pb_Advanced, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
connect(ui->pb_Audio, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
connect(ui->pb_Gui, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
@@ -70,21 +66,6 @@ namespace BlackGui
return ui->comp_AudioSetup->playNotificationSounds();
}
int CSettingsComponent::getAtcUpdateIntervalSeconds() const
{
return ui->hs_SettingsGuiAtcRefreshTime->value();
}
int CSettingsComponent::getAircraftUpdateIntervalSeconds() const
{
return ui->hs_SettingsGuiAircraftRefreshTime->value();
}
int CSettingsComponent::getUsersUpdateIntervalSeconds() const
{
return ui->hs_SettingsGuiUserRefreshTime->value();
}
void CSettingsComponent::setSettingsTab(CSettingsComponent::SettingTab tab)
{
this->setCurrentIndex(static_cast<int>(tab));