Merge branch 'master' into alpha-kung
This commit is contained in:
@@ -362,39 +362,6 @@ MyStackViewPage {
|
||||
AudioTabController.pttEnabled = checked
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 18
|
||||
|
||||
MyComboBox {
|
||||
Layout.leftMargin: 78
|
||||
id: summaryPttProfileComboBox
|
||||
Layout.maximumWidth: 378
|
||||
Layout.minimumWidth: 378
|
||||
Layout.preferredWidth: 378
|
||||
Layout.fillWidth: true
|
||||
model: [""]
|
||||
onCurrentIndexChanged: {
|
||||
if (currentIndex > 0) {
|
||||
summaryPttProfileApplyButton.enabled = true
|
||||
} else {
|
||||
summaryPttProfileApplyButton.enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: summaryPttProfileApplyButton
|
||||
enabled: false
|
||||
Layout.preferredWidth: 150
|
||||
text: "Apply"
|
||||
onClicked: {
|
||||
if (summaryPttProfileComboBox.currentIndex > 0) {
|
||||
AudioTabController.applyPttProfile(summaryPttProfileComboBox.currentIndex - 1)
|
||||
summaryPttProfileComboBox.currentIndex = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
@@ -417,7 +384,6 @@ MyStackViewPage {
|
||||
Component.onCompleted: {
|
||||
reloadChaperoneProfiles()
|
||||
reloadSteamVRProfiles()
|
||||
reloadPttProfiles()
|
||||
|
||||
summaryVersionText.text = applicationVersion
|
||||
|
||||
@@ -454,9 +420,6 @@ MyStackViewPage {
|
||||
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
onPttProfilesUpdated: {
|
||||
reloadPttProfiles()
|
||||
}
|
||||
onMicVolumeChanged: {
|
||||
summaryMicVolumeSlider.value = AudioTabController.micVolume
|
||||
}
|
||||
@@ -540,14 +503,4 @@ MyStackViewPage {
|
||||
summarySteamVRProfileComboBox.currentIndex = 0
|
||||
summarySteamVRProfileComboBox.model = profiles
|
||||
}
|
||||
|
||||
function reloadPttProfiles() {
|
||||
var profiles = [""]
|
||||
var profileCount = AudioTabController.getPttProfileCount()
|
||||
for (var i = 0; i < profileCount; i++) {
|
||||
profiles.push(AudioTabController.getPttProfileName(i))
|
||||
}
|
||||
summaryPttProfileComboBox.currentIndex = 0
|
||||
summaryPttProfileComboBox.model = profiles
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ RowLayout {
|
||||
setShownAudioDevice(index)
|
||||
}
|
||||
onPlaybackDeviceListChanged: {
|
||||
audioPlaybackNameCombo.devices = getAudioDeviceList()
|
||||
audioMirrorNameCombo.devices = getAudioDeviceList()
|
||||
setShownAudioDevice(AudioTabController.playbackDeviceIndex)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,54 +6,17 @@ import "../../common"
|
||||
|
||||
ColumnLayout {
|
||||
RowLayout {
|
||||
PttControllerConfigDialog {
|
||||
id: pttControllerConfigDialog
|
||||
pttControllerConfigClass: AudioTabController
|
||||
}
|
||||
|
||||
MyToggleButton {
|
||||
id: audioPttEnabledToggle
|
||||
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 +24,7 @@ ColumnLayout {
|
||||
}
|
||||
MyToggleButton {
|
||||
id: audioPttReverseToggle
|
||||
Layout.leftMargin: 118
|
||||
Layout.fillWidth: true
|
||||
text: "Push-to-Mute"
|
||||
onClicked: {
|
||||
AudioTabController.setMicReversePtt(checked, false)
|
||||
@@ -71,8 +34,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 +42,6 @@ ColumnLayout {
|
||||
onPttEnabledChanged: {
|
||||
audioPttEnabledToggle.checked = AudioTabController.pttEnabled
|
||||
}
|
||||
onPttLeftControllerEnabledChanged: {
|
||||
audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled
|
||||
}
|
||||
onPttRightControllerEnabledChanged: {
|
||||
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
||||
}
|
||||
onMicReversePttChanged: {
|
||||
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
||||
}
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import matzman666.advsettings 1.0
|
||||
|
||||
MyDialogOkCancelPopup {
|
||||
id: pttControllerConfigDialog
|
||||
property var pttControllerConfigClass
|
||||
property int controllerIndex: -1
|
||||
dialogTitle: "Controller Configuration"
|
||||
dialogWidth: 600
|
||||
dialogHeight: 620
|
||||
dialogContentItem: ColumnLayout {
|
||||
MyText {
|
||||
text: "Buttons"
|
||||
}
|
||||
Rectangle {
|
||||
color: "#cccccc"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigGripButtonToggle
|
||||
text: "Grip"
|
||||
}
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigMenuButtonToggle
|
||||
text: "Menu"
|
||||
}
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigTriggerButtonToggle
|
||||
text: "Trigger"
|
||||
}
|
||||
|
||||
MyText {
|
||||
Layout.topMargin: 32
|
||||
text: "Touchpad"
|
||||
}
|
||||
Rectangle {
|
||||
color: "#cccccc"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 64
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigPadLeftToggle
|
||||
text: "Left"
|
||||
}
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigPadRightToggle
|
||||
text: "Right"
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 64
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigPadTopToggle
|
||||
text: "Top"
|
||||
}
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigPadBottomToggle
|
||||
text: "Bottom"
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
MyText {
|
||||
text: "Mode:"
|
||||
}
|
||||
MyComboBox {
|
||||
id: pttControllerConfigPadModeCombo
|
||||
Layout.preferredWidth: 250
|
||||
model: ["Disabled", "Touched", "Pressed"]
|
||||
}
|
||||
}
|
||||
}
|
||||
onClosed: {
|
||||
if (okClicked) {
|
||||
var buttons = []
|
||||
if (pttControllerConfigGripButtonToggle.checked) {
|
||||
buttons.push(2)
|
||||
}
|
||||
if (pttControllerConfigMenuButtonToggle.checked) {
|
||||
buttons.push(1)
|
||||
}
|
||||
var triggerMode = 0
|
||||
if (pttControllerConfigTriggerButtonToggle.checked) {
|
||||
triggerMode = 1
|
||||
}
|
||||
var padAreas = 0
|
||||
if (pttControllerConfigPadLeftToggle.checked) {
|
||||
padAreas |= (1 << 0)
|
||||
}
|
||||
if (pttControllerConfigPadTopToggle.checked) {
|
||||
padAreas |= (1 << 1)
|
||||
}
|
||||
if (pttControllerConfigPadRightToggle.checked) {
|
||||
padAreas |= (1 << 2)
|
||||
}
|
||||
if (pttControllerConfigPadBottomToggle.checked) {
|
||||
padAreas |= (1 << 3)
|
||||
}
|
||||
pttControllerConfigClass.setPttControllerConfig(controllerIndex, buttons, triggerMode, pttControllerConfigPadModeCombo.currentIndex, padAreas);
|
||||
}
|
||||
}
|
||||
function openPopup(controller) {
|
||||
if (controller === 0) {
|
||||
dialogTitle = "Left Controller Configuration"
|
||||
controllerIndex = 0
|
||||
} else {
|
||||
dialogTitle = "Right Controller Configuration"
|
||||
controllerIndex = 1
|
||||
}
|
||||
pttControllerConfigGripButtonToggle.checked = false
|
||||
pttControllerConfigMenuButtonToggle.checked = false
|
||||
pttControllerConfigTriggerButtonToggle.checked = false
|
||||
pttControllerConfigPadLeftToggle.checked = false
|
||||
pttControllerConfigPadTopToggle.checked = false
|
||||
pttControllerConfigPadRightToggle.checked = false
|
||||
pttControllerConfigPadBottomToggle.checked = false
|
||||
pttControllerConfigPadModeCombo.currentIndex = pttControllerConfigClass.pttTouchpadMode(controllerIndex)
|
||||
var buttons = pttControllerConfigClass.pttDigitalButtons(controllerIndex)
|
||||
for (var i = 0; i < buttons.length; i++) {
|
||||
if (buttons[i] == 1) {
|
||||
pttControllerConfigMenuButtonToggle.checked = true
|
||||
} else if (buttons[i] == 2) {
|
||||
pttControllerConfigGripButtonToggle.checked = true
|
||||
}
|
||||
}
|
||||
if (pttControllerConfigClass.pttTriggerMode(controllerIndex) > 0) {
|
||||
pttControllerConfigTriggerButtonToggle.checked = true
|
||||
}
|
||||
var padAreas = pttControllerConfigClass.pttTouchpadArea(controllerIndex)
|
||||
if (padAreas & (1 << 0)) {
|
||||
pttControllerConfigPadLeftToggle.checked = true
|
||||
}
|
||||
if (padAreas & (1 << 1)) {
|
||||
pttControllerConfigPadTopToggle.checked = true
|
||||
}
|
||||
if (padAreas & (1 << 2)) {
|
||||
pttControllerConfigPadRightToggle.checked = true
|
||||
}
|
||||
if (padAreas & (1 << 3)) {
|
||||
pttControllerConfigPadBottomToggle.checked = true
|
||||
}
|
||||
open()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user