Qt: Implement logging settings and signals

This commit is contained in:
spycrab 2017-07-04 15:21:33 +02:00
parent 5b733b8710
commit 962d684ca2
2 changed files with 36 additions and 0 deletions

View File

@ -143,3 +143,31 @@ QVector<QString> Settings::GetProfiles(const InputConfig* config) const
return vec; return vec;
} }
bool Settings::IsLogVisible() const
{
return SConfig::GetInstance().m_InterfaceLogWindow;
}
void Settings::SetLogVisible(bool visible)
{
if (IsLogVisible() != visible)
{
SConfig::GetInstance().m_InterfaceLogWindow = visible;
emit LogVisibilityChanged(visible);
}
}
bool Settings::IsLogConfigVisible() const
{
return SConfig::GetInstance().m_InterfaceLogConfigWindow;
}
void Settings::SetLogConfigVisible(bool visible)
{
if (IsLogConfigVisible() != visible)
{
SConfig::GetInstance().m_InterfaceLogConfigWindow = visible;
emit LogConfigVisibilityChanged(visible);
}
}

View File

@ -30,6 +30,12 @@ public:
QVector<QString> GetProfiles(const InputConfig* config) const; QVector<QString> GetProfiles(const InputConfig* config) const;
QString GetProfileINIPath(const InputConfig* config, const QString& name) const; QString GetProfileINIPath(const InputConfig* config, const QString& name) const;
bool IsInDevelopmentWarningEnabled() const;
bool IsLogVisible() const;
void SetLogVisible(bool visible);
bool IsLogConfigVisible() const;
void SetLogConfigVisible(bool visible);
// GameList // GameList
QStringList GetPaths() const; QStringList GetPaths() const;
void AddPath(const QString& path); void AddPath(const QString& path);
@ -58,6 +64,8 @@ signals:
void HideCursorChanged(); void HideCursorChanged();
void VolumeChanged(int volume); void VolumeChanged(int volume);
void NANDRefresh(); void NANDRefresh();
void LogVisibilityChanged(bool visible);
void LogConfigVisibilityChanged(bool visible);
private: private:
Settings(); Settings();