Files
OpenVR-AdvancedSettings-frame/src/res/qml/SettingsPage.qml
T
Vasily 76507bd602 Move common elements into /common/ and change imports
Elements work like they've always done, this just moves the commonly
used components away from the global namespace.

The qmldir file still does something, although at this point it is
unknown exactly how it's used and whether or not it could be changed to
simplify imports across the block.
2019-02-02 16:09:01 +01:00

49 lines
1.3 KiB
QML

import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import matzman666.advsettings 1.0
import "common"
MyStackViewPage {
headerText: "Application Settings"
content: ColumnLayout {
spacing: 18
MyToggleButton {
id: settingsAutoStartToggle
text: "Autostart"
onCheckedChanged: {
SettingsTabController.setAutoStartEnabled(checked, false)
}
}
MyToggleButton {
id: forceReviveToggle
text: "Force Revive Page"
onCheckedChanged: {
SettingsTabController.setForceRevivePage(checked, true)
}
}
Item {
Layout.fillHeight: true
}
Component.onCompleted: {
settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled
forceReviveToggle.checked = SettingsTabController.forceRevivePage
}
Connections {
target: SettingsTabController
onAutoStartEnabledChanged: {
settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled
}
onForceRevivePageChanged: {
forceReviveToggle.checked = SettingsTabController.forceRevivePage
}
}
}
}