Qt: Implement missing settings
This commit is contained in:
parent
94ba78d717
commit
15243093c4
|
@ -159,18 +159,18 @@ void HotkeyScheduler::Run()
|
|||
if (IsHotkey(HK_EXIT))
|
||||
emit ExitHotkey();
|
||||
|
||||
auto& settings = Settings::Instance();
|
||||
|
||||
// Volume
|
||||
if (IsHotkey(HK_VOLUME_DOWN))
|
||||
AudioCommon::DecreaseVolume(3);
|
||||
settings.DecreaseVolume(3);
|
||||
|
||||
if (IsHotkey(HK_VOLUME_UP))
|
||||
AudioCommon::IncreaseVolume(3);
|
||||
settings.IncreaseVolume(3);
|
||||
|
||||
if (IsHotkey(HK_VOLUME_TOGGLE_MUTE))
|
||||
AudioCommon::ToggleMuteVolume();
|
||||
|
||||
auto& settings = Settings::Instance();
|
||||
|
||||
// Wiimote
|
||||
if (settings.IsBluetoothPassthroughEnabled())
|
||||
{
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <QDir>
|
||||
#include <QSize>
|
||||
|
||||
#include "AudioCommon/AudioCommon.h"
|
||||
#include "Common/FileSearch.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
@ -230,6 +231,32 @@ bool Settings::GetHideCursor() const
|
|||
return SConfig::GetInstance().bHideCursor;
|
||||
}
|
||||
|
||||
int Settings::GetVolume() const
|
||||
{
|
||||
return SConfig::GetInstance().m_Volume;
|
||||
}
|
||||
|
||||
void Settings::SetVolume(int volume)
|
||||
{
|
||||
if (GetVolume() != volume)
|
||||
{
|
||||
SConfig::GetInstance().m_Volume = volume;
|
||||
emit VolumeChanged(volume);
|
||||
}
|
||||
}
|
||||
|
||||
void Settings::IncreaseVolume(int volume)
|
||||
{
|
||||
AudioCommon::IncreaseVolume(volume);
|
||||
emit VolumeChanged(GetVolume());
|
||||
}
|
||||
|
||||
void Settings::DecreaseVolume(int volume)
|
||||
{
|
||||
AudioCommon::DecreaseVolume(volume);
|
||||
emit VolumeChanged(GetVolume());
|
||||
}
|
||||
|
||||
bool& Settings::BannerVisible() const
|
||||
{
|
||||
return SConfig::GetInstance().m_showBannerColumn;
|
||||
|
|
|
@ -75,6 +75,12 @@ public:
|
|||
void SetHideCursor(bool hide_cursor);
|
||||
bool GetHideCursor() const;
|
||||
|
||||
// Audio
|
||||
int GetVolume() const;
|
||||
void SetVolume(int volume);
|
||||
void IncreaseVolume(int volume);
|
||||
void DecreaseVolume(int volume);
|
||||
|
||||
// Columns
|
||||
bool& BannerVisible() const;
|
||||
bool& CountryVisible() const;
|
||||
|
@ -116,6 +122,7 @@ signals:
|
|||
void PathAdded(const QString&);
|
||||
void PathRemoved(const QString&);
|
||||
void HideCursorChanged();
|
||||
void VolumeChanged(int volume);
|
||||
|
||||
private:
|
||||
Settings();
|
||||
|
|
Loading…
Reference in New Issue