Remove the Accessibility Tab completely from the app (#79)

See
https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues/27

The Accessibility tab was made redundant with the implementation of the
new playspace/room/universe tab in
https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues/60

The tab inherited from the PttController class, which required changes
in order to work with the new IVRInput system. See
https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues/51
for more about the IVRInput system.

Removing the page now at an early state is going to make it easier to
refactor the PttController since only one class is inheriting it,
instead of two. Since the Accessibility tab is going to be removed
anyway, it makes sense to remove it now.
This commit is contained in:
username223
2019-02-03 12:33:43 -06:00
committed by ykeara
parent 05fca0e17d
commit ca67502fc5
10 changed files with 0 additions and 420 deletions
-187
View File
@@ -1,187 +0,0 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import matzman666.advsettings 1.0
import "common"
MyStackViewPage {
headerText: "Accessibility Tools"
PttControllerConfigDialog {
id: pttControllerConfigDialog
pttControllerConfigClass: AccessibilityTabController
}
content: ColumnLayout {
spacing: 92
GroupBox {
Layout.fillWidth: true
label: MyText {
leftPadding: 10
text: "Adjust Player Height"
bottomPadding: -10
}
background: Rectangle {
color: "transparent"
border.color: "#ffffff"
radius: 8
}
ColumnLayout {
anchors.fill: parent
Rectangle {
color: "#ffffff"
height: 1
Layout.fillWidth: true
Layout.bottomMargin: 5
}
RowLayout {
MyPushButton2 {
Layout.preferredWidth: 40
text: "-"
onClicked: {
accessibilityMoveYSlider.value -= 0.05
}
}
MySlider {
id: accessibilityMoveYSlider
from: 0
to: 1.5
stepSize: 0.01
value: 0.0
Layout.fillWidth: true
onPositionChanged: {
var val = this.from + ( this.position * (this.to - this.from))
accessibilityMoveYText.text = val.toFixed(2)
}
onValueChanged: {
AccessibilityTabController.heightOffset = this.value.toFixed(2)
}
}
MyPushButton2 {
Layout.preferredWidth: 40
text: "+"
onClicked: {
accessibilityMoveYSlider.value += 0.05
}
}
MyTextField {
id: accessibilityMoveYText
text: "0.00"
keyBoardUID: 700
Layout.preferredWidth: 140
Layout.leftMargin: 10
Layout.rightMargin: 10
horizontalAlignment: Text.AlignHCenter
function onInputEvent(input) {
var val = parseFloat(input)
if (!isNaN(val)) {
if (val >= accessibilityMoveYSlider.from && val <= accessibilityMoveYSlider.to) {
accessibilityMoveYSlider.value = val.toFixed(2);
} else {
AccessibilityTabController.setHeightOffset(val.toFixed(2), false);
}
}
text = AccessibilityTabController.heightOffset.toFixed(2)
}
}
}
RowLayout {
MyToggleButton {
id: heightOffsetPttEnabledToggle
Layout.preferredWidth: 260
text: "Push-to-Toggle:"
onClicked: {
AccessibilityTabController.pttEnabled = checked
}
}
MyToggleButton {
id: heightOffsetPttLeftControllerToggle
text: "Left Controller"
onClicked: {
AccessibilityTabController.setPttLeftControllerEnabled(checked, false)
}
}
MyPushButton {
text: "Configure"
onClicked: {
pttControllerConfigDialog.openPopup(0)
}
}
Item {
Layout.fillWidth: true
}
MyToggleButton {
id: heightOffsetPttRightControllerToggle
text: "Right Controller"
onClicked: {
AccessibilityTabController.setPttRightControllerEnabled(checked, false)
}
}
MyPushButton {
text: "Configure"
onClicked: {
pttControllerConfigDialog.openPopup(1)
}
}
}
}
}
Item { Layout.fillHeight: true; Layout.fillWidth: true}
MyPushButton {
id: accessibilityResetButton
Layout.preferredWidth: 250
text: "Reset"
onClicked: {
AccessibilityTabController.reset()
}
}
Component.onCompleted: {
var heightOffsetFormatted = AccessibilityTabController.heightOffset.toFixed(2)
if (heightOffsetFormatted >= accessibilityMoveYSlider.from && heightOffsetFormatted <= accessibilityMoveYSlider.to) {
accessibilityMoveYSlider.value = heightOffsetFormatted
}
accessibilityMoveYText.text = heightOffsetFormatted
heightOffsetPttEnabledToggle.checked = AccessibilityTabController.pttEnabled
heightOffsetPttLeftControllerToggle.checked = AccessibilityTabController.pttLeftControllerEnabled
heightOffsetPttRightControllerToggle.checked = AccessibilityTabController.pttRightControllerEnabled
}
Connections {
target: AccessibilityTabController
onHeightOffsetChanged: {
var heightOffsetFormatted = AccessibilityTabController.heightOffset.toFixed(2)
if (heightOffsetFormatted >= accessibilityMoveYSlider.from && heightOffsetFormatted <= accessibilityMoveYSlider.to) {
accessibilityMoveYSlider.value = heightOffsetFormatted
}
accessibilityMoveYText.text = heightOffsetFormatted
}
onPttEnabledChanged: {
heightOffsetPttEnabledToggle.checked = AccessibilityTabController.pttEnabled
}
onPttActiveChanged: {
}
onPttLeftControllerEnabledChanged: {
heightOffsetPttLeftControllerToggle.checked = AccessibilityTabController.pttLeftControllerEnabled
}
onPttRightControllerEnabledChanged: {
heightOffsetPttRightControllerToggle.checked = AccessibilityTabController.pttRightControllerEnabled
}
}
}
}
-11
View File
@@ -103,17 +103,6 @@ MyStackViewPage {
}
}
MyPushButton {
id: accessibilityButton
activationSoundEnabled: false
text: "Accessibility"
Layout.fillWidth: true
onClicked: {
MyResources.playFocusChangedSound()
mainView.push(accessibilityPage)
}
}
MyPushButton {
id: statisticsButton
activationSoundEnabled: false
-5
View File
@@ -65,11 +65,6 @@ Rectangle {
visible: false
}
property AccessibilityPage accessibilityPage: AccessibilityPage {
stackView: mainView
visible: false
}
StackView {
id: mainView
anchors.fill: parent