refactor: Remove unused methods

This commit is contained in:
Lars Toenning
2024-03-17 10:46:06 +01:00
parent dbf37c023e
commit 0b6012f1dc
4 changed files with 3 additions and 34 deletions

View File

@@ -4,7 +4,6 @@
#include "blackgui/components/audionotificationcomponent.h"
#include "blackgui/guiapplication.h"
#include "blackcore/context/contextaudio.h"
#include "blackmisc/audio/audiodeviceinfo.h"
#include "blackmisc/audio/notificationsounds.h"
#include "blackmisc/audio/audiosettings.h"
#include "blackmisc/sequence.h"
@@ -82,15 +81,6 @@ namespace BlackGui::Components
CAudioNotificationComponent::~CAudioNotificationComponent()
{}
bool CAudioNotificationComponent::playNotificationSounds() const
{
return ui->cb_SetupAudioPTTClickDown->isChecked() || ui->cb_SetupAudioPTTClickUp->isChecked() ||
ui->cb_SetupAudioNotificationTextMessageFrequency->isChecked() || ui->cb_SetupAudioNotificationTextMessageUnicom->isChecked() ||
ui->cb_SetupAudioNotificationTextMessagePrivate->isChecked() || ui->cb_SetupAudioNotificationTextMessageSupervisor->isChecked() ||
ui->cb_SetupAudioNotificationTextCallsignMentioned->isChecked() ||
ui->cb_SetupAfvBlocked->isChecked() || ui->cb_SetupAfvClicked->isChecked() || ui->cb_SetupAudioNotificationLogin->isChecked() || ui->cb_SetupAudioNotificationLogoff->isChecked();
}
void CAudioNotificationComponent::reloadSettings()
{
const CSettings as(m_audioSettings.getThreadLocal());

View File

@@ -32,10 +32,7 @@ namespace BlackGui::Components
explicit CAudioNotificationComponent(QWidget *parent = nullptr);
//! Destructor
virtual ~CAudioNotificationComponent() override;
//! Play any sounds?
bool playNotificationSounds() const;
~CAudioNotificationComponent() override;
private:
//! Init

View File

@@ -53,13 +53,7 @@ namespace BlackGui::Components
connect(ui->pb_DataLoadAndCaches, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
}
CSettingsComponent::~CSettingsComponent()
{}
bool CSettingsComponent::playNotificationSounds() const
{
return ui->comp_AudioNotification->playNotificationSounds();
}
CSettingsComponent::~CSettingsComponent() = default; // declared in cpp to avoid incomplete type of Ui::CSettingsComponent
CSpecializedSimulatorSettings CSettingsComponent::getSimulatorSettings(const CSimulatorInfo &simulator) const
{

View File

@@ -49,10 +49,7 @@ namespace BlackGui::Components
explicit CSettingsComponent(QWidget *parent = nullptr);
//! Destructor
virtual ~CSettingsComponent();
//! \copydoc CAudioNotificationComponent::playNotificationSounds
bool playNotificationSounds() const;
~CSettingsComponent() override;
//! Settings for given simulator
BlackMisc::Simulation::Settings::CSpecializedSimulatorSettings getSimulatorSettings(const BlackMisc::Simulation::CSimulatorInfo &simulator) const;
@@ -70,15 +67,6 @@ namespace BlackGui::Components
//! Change the windows opacity 0..100
void changedWindowsOpacity(int opacity);
//! Update interval changed (ATC)
void changedAtcStationsUpdateInterval(int seconds);
//! Update interval changed (aircrafts)
void changedAircraftUpdateInterval(int seconds);
//! Update interval changed (users)
void changedUsersUpdateInterval(int seconds);
private:
//! An overview button was clicked
void onOverviewButtonClicked();