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 {
|
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 {
|
RowLayout {
|
||||||
spacing: 10
|
spacing: 10
|
||||||
|
|
||||||
@@ -186,18 +168,10 @@ MyStackViewPage {
|
|||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
reloadPttProfiles()
|
reloadPttProfiles()
|
||||||
reloadAudioProfiles()
|
reloadAudioProfiles()
|
||||||
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
|
||||||
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: AudioTabController
|
target: AudioTabController
|
||||||
onMicReversePttChanged: {
|
|
||||||
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
|
||||||
}
|
|
||||||
onPttShowNotificationChanged: {
|
|
||||||
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
|
||||||
}
|
|
||||||
onPttProfilesUpdated: {
|
onPttProfilesUpdated: {
|
||||||
reloadPttProfiles()
|
reloadPttProfiles()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,55 +3,77 @@ import QtQuick.Controls 2.0
|
|||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
import "../.." //common imports
|
import "../.." //common imports
|
||||||
|
ColumnLayout {
|
||||||
|
RowLayout {
|
||||||
|
PttControllerConfigDialog {
|
||||||
|
id: pttControllerConfigDialog
|
||||||
|
pttControllerConfigClass: AudioTabController
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
MyToggleButton {
|
||||||
PttControllerConfigDialog {
|
id: audioPttEnabledToggle
|
||||||
id: pttControllerConfigDialog
|
Layout.preferredWidth: 260
|
||||||
pttControllerConfigClass: AudioTabController
|
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: {
|
Component.onCompleted: {
|
||||||
audioPttEnabledToggle.checked = AudioTabController.pttEnabled
|
audioPttEnabledToggle.checked = AudioTabController.pttEnabled
|
||||||
audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled
|
audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled
|
||||||
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
||||||
|
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
||||||
|
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: AudioTabController
|
target: AudioTabController
|
||||||
@@ -64,5 +86,11 @@ RowLayout {
|
|||||||
onPttRightControllerEnabledChanged: {
|
onPttRightControllerEnabledChanged: {
|
||||||
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
||||||
}
|
}
|
||||||
|
onMicReversePttChanged: {
|
||||||
|
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
||||||
|
}
|
||||||
|
onPttShowNotificationChanged: {
|
||||||
|
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user