Move other PTT buttons into the PttButtons component
The other components were not organized together with the remaining Ptt buttons. This creates unnecessary separation between related buttons.
This commit is contained in:
@@ -49,25 +49,7 @@ MyStackViewPage {
|
||||
}
|
||||
PttButtons {
|
||||
}
|
||||
RowLayout {
|
||||
|
||||
MyToggleButton {
|
||||
id: audioPttShowNotificationToggle
|
||||
Layout.leftMargin: 350
|
||||
text: "Show notification in HMD"
|
||||
onCheckedChanged: {
|
||||
AudioTabController.setPttShowNotification(checked, false)
|
||||
}
|
||||
}
|
||||
MyToggleButton {
|
||||
id: audioPttReverseToggle
|
||||
Layout.leftMargin: 118
|
||||
text: "Push-to-Mute"
|
||||
onClicked: {
|
||||
AudioTabController.setMicReversePtt(checked, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 10
|
||||
|
||||
@@ -186,18 +168,10 @@ MyStackViewPage {
|
||||
Component.onCompleted: {
|
||||
reloadPttProfiles()
|
||||
reloadAudioProfiles()
|
||||
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
||||
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
onMicReversePttChanged: {
|
||||
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
||||
}
|
||||
onPttShowNotificationChanged: {
|
||||
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
||||
}
|
||||
onPttProfilesUpdated: {
|
||||
reloadPttProfiles()
|
||||
}
|
||||
|
||||
@@ -3,55 +3,77 @@ import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import matzman666.advsettings 1.0
|
||||
import "../.." //common imports
|
||||
ColumnLayout {
|
||||
RowLayout {
|
||||
PttControllerConfigDialog {
|
||||
id: pttControllerConfigDialog
|
||||
pttControllerConfigClass: AudioTabController
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
PttControllerConfigDialog {
|
||||
id: pttControllerConfigDialog
|
||||
pttControllerConfigClass: AudioTabController
|
||||
MyToggleButton {
|
||||
id: audioPttEnabledToggle
|
||||
Layout.preferredWidth: 260
|
||||
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
|
||||
text: "Show notification in HMD"
|
||||
onCheckedChanged: {
|
||||
AudioTabController.setPttShowNotification(checked, false)
|
||||
}
|
||||
}
|
||||
MyToggleButton {
|
||||
id: audioPttReverseToggle
|
||||
Layout.leftMargin: 118
|
||||
text: "Push-to-Mute"
|
||||
onClicked: {
|
||||
AudioTabController.setMicReversePtt(checked, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MyToggleButton {
|
||||
id: audioPttEnabledToggle
|
||||
Layout.preferredWidth: 260
|
||||
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)
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
audioPttEnabledToggle.checked = AudioTabController.pttEnabled
|
||||
audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled
|
||||
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
||||
|
||||
audioPttEnabledToggle.checked = AudioTabController.pttEnabled
|
||||
audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled
|
||||
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
||||
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
||||
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
||||
}
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
@@ -64,5 +86,11 @@ RowLayout {
|
||||
onPttRightControllerEnabledChanged: {
|
||||
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
||||
}
|
||||
onMicReversePttChanged: {
|
||||
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
||||
}
|
||||
onPttShowNotificationChanged: {
|
||||
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user