Files
OpenVR-AdvancedSettings-frame/src/res/qml/audio_page/dialog_boxes/PttNewProfileDialog.qml
T
Vasily cab99041be Rename QML singleton to "ovras.advsettings"
This is more generic and in line with the rest of the renames.
2019-03-11 11:09:19 +01:00

48 lines
1.2 KiB
QML

import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import ovras.advsettings 1.0
import "../../common"
MyDialogOkCancelPopup {
id: pttNewProfileDialog
dialogTitle: "Create New PTT Profile"
dialogWidth: 600
dialogHeight: 220
dialogContentItem: ColumnLayout {
RowLayout {
Layout.topMargin: 16
Layout.leftMargin: 16
Layout.rightMargin: 16
MyText {
text: "Name: "
}
MyTextField {
id: pttNewProfileName
keyBoardUID: 590
color: "#cccccc"
text: ""
Layout.fillWidth: true
font.pointSize: 20
function onInputEvent(input) {
pttNewProfileName.text = input
}
}
}
}
onClosed: {
if (okClicked) {
if (pttNewProfileName.text != "") {
AudioTabController.addPttProfile(pttNewProfileName.text)
} else {
audioMessageDialog.showMessage("Create New Profile", "ERROR: No name given.")
}
}
}
function openPopup() {
pttNewProfileName.text = ""
open()
}
}