Remove deprecated elements from AudioPage
There are still many elements remaining from the old input system. These have not been removed due to time constraints. They should be removed as part of a general clean up process. The PTT profile buttons have been replaced with a text telling users to use the SteamVR bindings interface. This is for people who don't read changelogs.
This commit is contained in:
@@ -10,18 +10,10 @@ ColumnLayout {
|
||||
id: audioMessageDialog
|
||||
}
|
||||
|
||||
PttDeleteProfileDialog {
|
||||
id: pttDeleteProfileDialog
|
||||
}
|
||||
|
||||
AudioDeleteProfileDialog {
|
||||
id: audioDeleteProfileDialog
|
||||
}
|
||||
|
||||
PttNewProfileDialog {
|
||||
id: pttNewProfileDialog
|
||||
}
|
||||
|
||||
AudioNewProfileDialog {
|
||||
id: audioNewProfileDialog
|
||||
}
|
||||
@@ -61,38 +53,9 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MyText {
|
||||
text: "PTT Profile:"
|
||||
Layout.preferredWidth: 150
|
||||
}
|
||||
|
||||
MyComboBox {
|
||||
id: pttProfileComboBox
|
||||
Layout.preferredWidth: 250
|
||||
model: [""]
|
||||
onCurrentIndexChanged: {
|
||||
if (currentIndex > 0) {
|
||||
pttApplyProfileButton.enabled = true
|
||||
pttDeleteProfileButton.enabled = true
|
||||
} else {
|
||||
pttApplyProfileButton.enabled = false
|
||||
pttDeleteProfileButton.enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: pttApplyProfileButton
|
||||
enabled: true
|
||||
Layout.preferredWidth: 150
|
||||
text: "Apply"
|
||||
onClicked: {
|
||||
if (pttProfileComboBox.currentIndex > 0) {
|
||||
AudioTabController.applyPttProfile(
|
||||
pttProfileComboBox.currentIndex - 1)
|
||||
}
|
||||
}
|
||||
// Text continues in next RowLayout.
|
||||
text: "Change the Push To Talk settings"
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
@@ -117,62 +80,27 @@ ColumnLayout {
|
||||
audioNewProfileDialog.openPopup()
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
MyPushButton {
|
||||
id: pttDeleteProfileButton
|
||||
enabled: true
|
||||
Layout.preferredWidth: 200
|
||||
text: "Delete Profile"
|
||||
onClicked: {
|
||||
if (pttProfileComboBox.currentIndex > 0) {
|
||||
pttDeleteProfileDialog.profileIndex = pttProfileComboBox.currentIndex - 1
|
||||
pttDeleteProfileDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
MyPushButton {
|
||||
Layout.preferredWidth: 200
|
||||
text: "New Profile"
|
||||
onClicked: {
|
||||
pttNewProfileDialog.openPopup()
|
||||
}
|
||||
MyText {
|
||||
// Text continues from RowLayout above.
|
||||
text: "\t\tin the SteamVR bindings menu."
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
reloadPttProfiles()
|
||||
reloadAudioProfiles()
|
||||
}
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
onPttProfilesUpdated: {
|
||||
reloadPttProfiles()
|
||||
}
|
||||
onAudioProfilesUpdated: {
|
||||
reloadAudioProfiles()
|
||||
}
|
||||
onAudioProfileAdded: {
|
||||
audioProfileComboBox.currentIndex = AudioTabController.getAudioProfileCount()
|
||||
}
|
||||
onPttProfileAdded: {
|
||||
pttProfileComboBox.currentIndex = AudioTabController.getPttProfileCount()
|
||||
}
|
||||
onDefaultProfileDisplay: {
|
||||
audioProfileComboBox.currentIndex = AudioTabController.getDefaultAudioProfileIndex(
|
||||
) + 1
|
||||
}
|
||||
}
|
||||
function reloadPttProfiles() {
|
||||
var profiles = [""]
|
||||
var profileCount = AudioTabController.getPttProfileCount()
|
||||
for (var i = 0; i < profileCount; i++) {
|
||||
profiles.push(AudioTabController.getPttProfileName(i))
|
||||
}
|
||||
pttProfileComboBox.currentIndex = 0
|
||||
pttProfileComboBox.model = profiles
|
||||
}
|
||||
|
||||
function reloadAudioProfiles() {
|
||||
var profiles = [""]
|
||||
var profileCount = AudioTabController.getAudioProfileCount()
|
||||
|
||||
@@ -6,6 +6,7 @@ import "../../common"
|
||||
|
||||
ColumnLayout {
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
PttControllerConfigDialog {
|
||||
id: pttControllerConfigDialog
|
||||
pttControllerConfigClass: AudioTabController
|
||||
@@ -13,47 +14,16 @@ ColumnLayout {
|
||||
|
||||
MyToggleButton {
|
||||
id: audioPttEnabledToggle
|
||||
Layout.preferredWidth: 260
|
||||
//Layout.preferredWidth: 260
|
||||
Layout.fillWidth: true
|
||||
text: "Push-to-Talk:"
|
||||
onClicked: {
|
||||
AudioTabController.pttEnabled = checked
|
||||
}
|
||||
}
|
||||
MyToggleButton {
|
||||
id: audioPttLeftControllerToggle
|
||||
text: "Left Controller"
|
||||
onClicked: {
|
||||
AudioTabController.setPttLeftControllerEnabled(checked, false)
|
||||
}
|
||||
}
|
||||
MyPushButton {
|
||||
text: "Configure"
|
||||
onClicked: {
|
||||
pttControllerConfigDialog.openPopup(0)
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
MyToggleButton {
|
||||
id: audioPttRightControllerToggle
|
||||
text: "Right Controller"
|
||||
onClicked: {
|
||||
AudioTabController.setPttRightControllerEnabled(checked, false)
|
||||
}
|
||||
}
|
||||
MyPushButton {
|
||||
text: "Configure"
|
||||
onClicked: {
|
||||
pttControllerConfigDialog.openPopup(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
|
||||
MyToggleButton {
|
||||
id: audioPttShowNotificationToggle
|
||||
Layout.leftMargin: 350
|
||||
Layout.fillWidth: true
|
||||
text: "Show notification in HMD"
|
||||
onCheckedChanged: {
|
||||
AudioTabController.setPttShowNotification(checked, false)
|
||||
@@ -61,7 +31,7 @@ ColumnLayout {
|
||||
}
|
||||
MyToggleButton {
|
||||
id: audioPttReverseToggle
|
||||
Layout.leftMargin: 118
|
||||
Layout.fillWidth: true
|
||||
text: "Push-to-Mute"
|
||||
onClicked: {
|
||||
AudioTabController.setMicReversePtt(checked, false)
|
||||
@@ -71,8 +41,6 @@ ColumnLayout {
|
||||
|
||||
Component.onCompleted: {
|
||||
audioPttEnabledToggle.checked = AudioTabController.pttEnabled
|
||||
audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled
|
||||
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
||||
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
||||
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
||||
}
|
||||
@@ -81,12 +49,6 @@ ColumnLayout {
|
||||
onPttEnabledChanged: {
|
||||
audioPttEnabledToggle.checked = AudioTabController.pttEnabled
|
||||
}
|
||||
onPttLeftControllerEnabledChanged: {
|
||||
audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled
|
||||
}
|
||||
onPttRightControllerEnabledChanged: {
|
||||
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
||||
}
|
||||
onMicReversePttChanged: {
|
||||
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user