unfinished audio settings
This commit is contained in:
+117
-6
@@ -24,7 +24,7 @@ MyStackViewPage {
|
|||||||
id: pttDeleteProfileDialog
|
id: pttDeleteProfileDialog
|
||||||
property int profileIndex: -1
|
property int profileIndex: -1
|
||||||
dialogTitle: "Delete Profile"
|
dialogTitle: "Delete Profile"
|
||||||
dialogText: "Do you really want to delete this profile?"
|
dialogText: "Do you really want to delete this ptt profile?"
|
||||||
onClosed: {
|
onClosed: {
|
||||||
if (okClicked) {
|
if (okClicked) {
|
||||||
AudioTabController.deletePttProfile(profileIndex)
|
AudioTabController.deletePttProfile(profileIndex)
|
||||||
@@ -32,6 +32,19 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MyDialogOkCancelPopup {
|
||||||
|
id: audioDeleteProfileDialog
|
||||||
|
property int profileIndex: -1
|
||||||
|
dialogTitle: "Delete Profile"
|
||||||
|
dialogText: "Do you really want to delete this audio profile?"
|
||||||
|
onClosed: {
|
||||||
|
//TODO audio delete profile
|
||||||
|
if (okClicked) {
|
||||||
|
//AudioTabController.deletePttProfile(profileIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PttControllerConfigDialog {
|
PttControllerConfigDialog {
|
||||||
id: pttControllerConfigDialog
|
id: pttControllerConfigDialog
|
||||||
pttControllerConfigClass: AudioTabController
|
pttControllerConfigClass: AudioTabController
|
||||||
@@ -39,7 +52,7 @@ MyStackViewPage {
|
|||||||
|
|
||||||
MyDialogOkCancelPopup {
|
MyDialogOkCancelPopup {
|
||||||
id: pttNewProfileDialog
|
id: pttNewProfileDialog
|
||||||
dialogTitle: "Create New Profile"
|
dialogTitle: "Create New PTT Profile"
|
||||||
dialogWidth: 600
|
dialogWidth: 600
|
||||||
dialogHeight: 220
|
dialogHeight: 220
|
||||||
dialogContentItem: ColumnLayout {
|
dialogContentItem: ColumnLayout {
|
||||||
@@ -78,6 +91,49 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
MyDialogOkCancelPopup {
|
||||||
|
id: audioNewProfileDialog
|
||||||
|
dialogTitle: "Create New Audio Profile"
|
||||||
|
dialogWidth: 600
|
||||||
|
dialogHeight: 220
|
||||||
|
dialogContentItem: ColumnLayout {
|
||||||
|
RowLayout {
|
||||||
|
Layout.topMargin: 16
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
MyText {
|
||||||
|
text: "Name: "
|
||||||
|
}
|
||||||
|
MyTextField {
|
||||||
|
id: audioNewProfileName
|
||||||
|
keyBoardUID: 590
|
||||||
|
color: "#cccccc"
|
||||||
|
text: ""
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.pointSize: 20
|
||||||
|
function onInputEvent(input) {
|
||||||
|
audioNewProfileName.text = input
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onClosed: {
|
||||||
|
if (okClicked) {
|
||||||
|
if (audioNewProfileName.text != "") {
|
||||||
|
//TODO call AUDIO add profile
|
||||||
|
//AudioTabController.addPttProfile(pttNewProfileName.text)
|
||||||
|
} else {
|
||||||
|
audioMessageDialog.showMessage("Create New Profile", "ERROR: No name given.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function openPopup() {
|
||||||
|
audioNewProfileName.text = ""
|
||||||
|
open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
content: ColumnLayout {
|
content: ColumnLayout {
|
||||||
spacing: 24
|
spacing: 24
|
||||||
|
|
||||||
@@ -329,16 +385,51 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 18
|
spacing: 10
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
Layout.preferredWidth: 150
|
||||||
|
text: "Audio Profile:"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
MyComboBox {
|
||||||
|
id: audioProfileComboBox
|
||||||
|
Layout.preferredWidth: 250
|
||||||
|
model: [""]
|
||||||
|
onCurrentIndexChanged: {
|
||||||
|
if (currentIndex > 0) {
|
||||||
|
audioApplyProfileButton.enabled = true
|
||||||
|
audioDeleteProfileButton.enabled = true
|
||||||
|
} else {
|
||||||
|
audioApplyProfileButton.enabled = false
|
||||||
|
audioDeleteProfileButton.enabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton {
|
||||||
|
id: audioApplyProfileButton
|
||||||
|
enabled: true
|
||||||
|
Layout.preferredWidth: 150
|
||||||
|
text: "Apply"
|
||||||
|
onClicked: {
|
||||||
|
if (audioProfileComboBox.currentIndex > 0) {
|
||||||
|
//TODO
|
||||||
|
// AudioTabController.applyPttProfile(pttProfileComboBox.currentIndex - 1)
|
||||||
|
audioProfileComboBox.currentIndex = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MyText {
|
MyText {
|
||||||
Layout.leftMargin: 270
|
|
||||||
text: "PTT Profile:"
|
text: "PTT Profile:"
|
||||||
|
Layout.preferredWidth: 150
|
||||||
}
|
}
|
||||||
|
|
||||||
MyComboBox {
|
MyComboBox {
|
||||||
id: pttProfileComboBox
|
id: pttProfileComboBox
|
||||||
Layout.fillWidth: true
|
Layout.preferredWidth: 250
|
||||||
model: [""]
|
model: [""]
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
if (currentIndex > 0) {
|
if (currentIndex > 0) {
|
||||||
@@ -354,7 +445,7 @@ MyStackViewPage {
|
|||||||
MyPushButton {
|
MyPushButton {
|
||||||
id: pttApplyProfileButton
|
id: pttApplyProfileButton
|
||||||
enabled: true
|
enabled: true
|
||||||
Layout.preferredWidth: 200
|
Layout.preferredWidth: 150
|
||||||
text: "Apply"
|
text: "Apply"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (pttProfileComboBox.currentIndex > 0) {
|
if (pttProfileComboBox.currentIndex > 0) {
|
||||||
@@ -366,6 +457,26 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 18
|
spacing: 18
|
||||||
|
|
||||||
|
MyPushButton {
|
||||||
|
id: audioDeleteProfileButton
|
||||||
|
enabled: true
|
||||||
|
Layout.preferredWidth: 200
|
||||||
|
text: "Delete Profile"
|
||||||
|
onClicked: {
|
||||||
|
if (audioProfileComboBox.currentIndex > 0) {
|
||||||
|
audioDeleteProfileDialog.profileIndex = audioProfileComboBox.currentIndex - 1
|
||||||
|
audioDeleteProfileDialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyPushButton {
|
||||||
|
Layout.preferredWidth: 200
|
||||||
|
text: "New Profile"
|
||||||
|
onClicked: {
|
||||||
|
audioNewProfileDialog.openPopup()
|
||||||
|
}
|
||||||
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user