Format every single file using .clang-format
This commit is contained in:
@@ -3,69 +3,88 @@
|
||||
#include "../overlaycontroller.h"
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
|
||||
void SettingsTabController::initStage1() {
|
||||
m_autoStartEnabled = vr::VRApplications()->GetApplicationAutoLaunch(OverlayController::applicationKey);
|
||||
auto settings = OverlayController::appSettings();
|
||||
settings->beginGroup("applicationSettings");
|
||||
auto value = settings->value("forceRevivePage", m_forceRevivePage);
|
||||
settings->endGroup();
|
||||
if (value.isValid() && !value.isNull()) {
|
||||
m_forceRevivePage = value.toBool();
|
||||
}
|
||||
namespace advsettings
|
||||
{
|
||||
void SettingsTabController::initStage1()
|
||||
{
|
||||
m_autoStartEnabled = vr::VRApplications()->GetApplicationAutoLaunch(
|
||||
OverlayController::applicationKey );
|
||||
auto settings = OverlayController::appSettings();
|
||||
settings->beginGroup( "applicationSettings" );
|
||||
auto value = settings->value( "forceRevivePage", m_forceRevivePage );
|
||||
settings->endGroup();
|
||||
if ( value.isValid() && !value.isNull() )
|
||||
{
|
||||
m_forceRevivePage = value.toBool();
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsTabController::initStage2(OverlayController * var_parent, QQuickWindow * var_widget) {
|
||||
this->parent = var_parent;
|
||||
this->widget = var_widget;
|
||||
void SettingsTabController::initStage2( OverlayController* var_parent,
|
||||
QQuickWindow* var_widget )
|
||||
{
|
||||
this->parent = var_parent;
|
||||
this->widget = var_widget;
|
||||
}
|
||||
|
||||
void SettingsTabController::eventLoopTick() {
|
||||
if (settingsUpdateCounter >= 50) {
|
||||
setAutoStartEnabled(vr::VRApplications()->GetApplicationAutoLaunch(OverlayController::applicationKey));
|
||||
settingsUpdateCounter = 0;
|
||||
} else {
|
||||
settingsUpdateCounter++;
|
||||
}
|
||||
void SettingsTabController::eventLoopTick()
|
||||
{
|
||||
if ( settingsUpdateCounter >= 50 )
|
||||
{
|
||||
setAutoStartEnabled( vr::VRApplications()->GetApplicationAutoLaunch(
|
||||
OverlayController::applicationKey ) );
|
||||
settingsUpdateCounter = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
settingsUpdateCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
bool SettingsTabController::autoStartEnabled() const {
|
||||
return m_autoStartEnabled;
|
||||
bool SettingsTabController::autoStartEnabled() const
|
||||
{
|
||||
return m_autoStartEnabled;
|
||||
}
|
||||
|
||||
void SettingsTabController::setAutoStartEnabled(bool value, bool notify) {
|
||||
if (m_autoStartEnabled != value) {
|
||||
m_autoStartEnabled = value;
|
||||
auto apperror = vr::VRApplications()->SetApplicationAutoLaunch(OverlayController::applicationKey, m_autoStartEnabled);
|
||||
if (apperror != vr::VRApplicationError_None) {
|
||||
LOG(ERROR) << "Could not set auto start: " << vr::VRApplications()->GetApplicationsErrorNameFromEnum(apperror);
|
||||
}
|
||||
if (notify) {
|
||||
emit autoStartEnabledChanged(m_autoStartEnabled);
|
||||
}
|
||||
}
|
||||
void SettingsTabController::setAutoStartEnabled( bool value, bool notify )
|
||||
{
|
||||
if ( m_autoStartEnabled != value )
|
||||
{
|
||||
m_autoStartEnabled = value;
|
||||
auto apperror = vr::VRApplications()->SetApplicationAutoLaunch(
|
||||
OverlayController::applicationKey, m_autoStartEnabled );
|
||||
if ( apperror != vr::VRApplicationError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Could not set auto start: "
|
||||
<< vr::VRApplications()
|
||||
->GetApplicationsErrorNameFromEnum( apperror );
|
||||
}
|
||||
if ( notify )
|
||||
{
|
||||
emit autoStartEnabledChanged( m_autoStartEnabled );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool SettingsTabController::forceRevivePage() const {
|
||||
return m_forceRevivePage;
|
||||
bool SettingsTabController::forceRevivePage() const
|
||||
{
|
||||
return m_forceRevivePage;
|
||||
}
|
||||
|
||||
|
||||
void SettingsTabController::setForceRevivePage(bool value, bool notify) {
|
||||
if (m_forceRevivePage != value) {
|
||||
m_forceRevivePage = value;
|
||||
auto settings = OverlayController::appSettings();
|
||||
settings->beginGroup("applicationSettings");
|
||||
settings->setValue("forceRevivePage", m_forceRevivePage);
|
||||
settings->endGroup();
|
||||
settings->sync();
|
||||
if (notify) {
|
||||
emit forceRevivePageChanged(m_forceRevivePage);
|
||||
}
|
||||
}
|
||||
void SettingsTabController::setForceRevivePage( bool value, bool notify )
|
||||
{
|
||||
if ( m_forceRevivePage != value )
|
||||
{
|
||||
m_forceRevivePage = value;
|
||||
auto settings = OverlayController::appSettings();
|
||||
settings->beginGroup( "applicationSettings" );
|
||||
settings->setValue( "forceRevivePage", m_forceRevivePage );
|
||||
settings->endGroup();
|
||||
settings->sync();
|
||||
if ( notify )
|
||||
{
|
||||
emit forceRevivePageChanged( m_forceRevivePage );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace advconfig
|
||||
} // namespace advsettings
|
||||
|
||||
Reference in New Issue
Block a user