Added "Force Revive Page" checkbox to application settings.
This commit is contained in:
@@ -8,6 +8,13 @@ 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 * parent, QQuickWindow * widget) {
|
||||
@@ -41,4 +48,24 @@ void SettingsTabController::setAutoStartEnabled(bool value, bool notify) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace advconfig
|
||||
|
||||
Reference in New Issue
Block a user