Prox sensor re-integration (#220)

* added arbitrary orientation change

* removed commented code

* updated to OVR 1.4.18

* changed two instances using new to init via array

* moved prox sensor action to haptic instead of Misc

* fixed json file, added prox sensor back for mic mute/un-mute

* added proximity sensor to audio and haptic chaperone warnings

* fixed fall-through behavior

* removed bad prox code
This commit is contained in:
ykeara
2019-06-14 12:33:56 -05:00
committed by GitHub
parent 8e34e9edca
commit b473f4d7db
32 changed files with 419 additions and 130 deletions
@@ -4,7 +4,8 @@ import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.2
import ovras.advsettings 1.0
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
import "common"
import "../common"
import "change_orientation"
MyStackViewPage {
headerText: "Chaperone Settings"
@@ -489,15 +490,8 @@ MyStackViewPage {
mainView.push(chaperoneWarningsPage)
}
}
ChangeOrientationGroupBox { }
MyPushButton {
id: chaperoneFlipOrientationButton
text: "Flip Orientation"
Layout.preferredWidth: 250
onClicked: {
ChaperoneTabController.flipOrientation()
}
}
Item { Layout.fillHeight: true; Layout.fillWidth: true}
@@ -0,0 +1,104 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import ovras.advsettings 1.0
import "../../common"
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
GroupBox {
id: changeOrientationGroupBox
Layout.fillWidth: true
label: MyText {
leftPadding: 10
text: "Rotate Orientation (permanent)"
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
}
ColumnLayout {
RowLayout {
MyPushButton2 {
id: spaceRotationMinusButton
Layout.preferredWidth: 40
text: "-"
onClicked: {
var val = spaceRotationSlider.value - 45
if (val <= -180){
val = -180;
}
spaceRotationSlider.value = val
spaceRotationText.text = val
}
}
MySlider {
id: spaceRotationSlider
from: -180
to: 180
stepSize: 1
value: 0
Layout.fillWidth: true
onValueChanged: {
var val = this.value
spaceRotationText.text = val
}
}
MyPushButton2 {
id: spaceRotationPlusButton
Layout.preferredWidth: 40
text: "+"
onClicked: {
var val = spaceRotationSlider.value + 45
if (val >= 180){
val = 180;
}
spaceRotationSlider.value = val
spaceRotationText.text = val
}
}
MyTextField {
id: spaceRotationText
text: "0°"
keyBoardUID: 311
Layout.preferredWidth: 150
Layout.leftMargin: 10
horizontalAlignment: Text.AlignHCenter
function onInputEvent(input) {
var val = parseFloat(input)
if (!isNaN(val)) {
spaceRotationText.text = val + "°"
spaceRotationSlider.value = val
}
}
}
MyPushButton {
id: spaceRotationApplyButton
Layout.preferredWidth: 145
text:"Apply"
onClicked: {
ChaperoneTabController.flipOrientation(spaceRotationSlider.value)
spaceRotationSlider.value = 0
spaceRotationText.text = "0°"
}
}
}
}
}
}
+1
View File
@@ -7,6 +7,7 @@ import "../audio_page"
import "../motion_page"
import "../video_page"
import "../desktop_overlay_page"
import "../chaperone_page"
Rectangle {
id: root