Qt: Add controller (overview) window

This commit is contained in:
spycrab
2017-05-09 18:49:10 +02:00
parent a11775396f
commit c8d0b647ac
14 changed files with 708 additions and 27 deletions

View File

@ -2,6 +2,7 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include <QDir>
#include <QSize>
#include "Common/FileUtil.h"
@ -23,6 +24,12 @@ QString Settings::GetThemeDir() const
return QString::fromStdString(File::GetThemeDir(theme_name.toStdString()));
}
QString Settings::GetResourcesDir() const
{
return QString::fromStdString(File::GetSysDirectory().append("Resources"))
.append(QDir::separator());
}
bool Settings::IsInDevelopmentWarningEnabled() const
{
// There's intentionally no way to set this from the UI.
@ -201,6 +208,61 @@ bool& Settings::StateVisible() const
return SConfig::GetInstance().m_showStateColumn;
}
bool Settings::IsBluetoothPassthroughEnabled() const
{
return SConfig::GetInstance().m_bt_passthrough_enabled;
}
void Settings::SetBluetoothPassthroughEnabled(bool enabled)
{
SConfig::GetInstance().m_bt_passthrough_enabled = enabled;
}
bool Settings::IsContinuousScanningEnabled() const
{
return SConfig::GetInstance().m_WiimoteContinuousScanning;
}
void Settings::SetContinuousScanningEnabled(bool enabled)
{
SConfig::GetInstance().m_WiimoteContinuousScanning = enabled;
}
bool Settings::IsBackgroundInputEnabled() const
{
return SConfig::GetInstance().m_BackgroundInput;
}
void Settings::SetBackgroundInputEnabled(bool enabled)
{
SConfig::GetInstance().m_BackgroundInput = enabled;
}
bool Settings::IsWiimoteSpeakerEnabled() const
{
return SConfig::GetInstance().m_WiimoteEnableSpeaker;
}
void Settings::SetWiimoteSpeakerEnabled(bool enabled)
{
SConfig::GetInstance().m_WiimoteEnableSpeaker = enabled;
}
SerialInterface::SIDevices Settings::GetSIDevice(size_t i) const
{
return SConfig::GetInstance().m_SIDevice[i];
}
void Settings::SetSIDevice(size_t i, SerialInterface::SIDevices device)
{
SConfig::GetInstance().m_SIDevice[i] = device;
}
bool Settings::IsWiiGameRunning() const
{
return SConfig::GetInstance().bWii;
}
void Settings::Save()
{
return SConfig::GetInstance().SaveSettings();