parent
478b46f6b5
commit
e7ac242f6f
|
@ -6,46 +6,32 @@ import utils 1.0
|
||||||
import shared.controls 1.0
|
import shared.controls 1.0
|
||||||
|
|
||||||
import StatusQ.Controls 0.1
|
import StatusQ.Controls 0.1
|
||||||
import StatusQ.Popups 0.1
|
import StatusQ.Popups.Dialog 0.1
|
||||||
|
|
||||||
StatusModal {
|
StatusDialog {
|
||||||
|
id: root
|
||||||
id: popup
|
|
||||||
height: 210
|
|
||||||
anchors.centerIn: parent
|
|
||||||
|
|
||||||
header.title: qsTr("Group name")
|
|
||||||
|
|
||||||
property string activeChannelName
|
property string activeChannelName
|
||||||
signal doRename(string groupName)
|
signal doRename(string groupName)
|
||||||
|
|
||||||
|
width: 400
|
||||||
|
title: qsTr("Group name")
|
||||||
|
standardButtons: Dialog.Save
|
||||||
|
|
||||||
onOpened: {
|
onOpened: {
|
||||||
groupName.forceActiveFocus(Qt.MouseFocusReason)
|
groupName.forceActiveFocus(Qt.MouseFocusReason)
|
||||||
groupName.text = popup.activeChannelName;
|
groupName.text = root.activeChannelName
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Item {
|
onAccepted: root.doRename(groupName.text)
|
||||||
width: popup.width
|
|
||||||
implicitHeight: childrenRect.height
|
|
||||||
Input {
|
|
||||||
id: groupName
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: Style.current.padding
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: Style.current.padding
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: Style.current.padding
|
|
||||||
placeholderText: qsTr("Group name")
|
|
||||||
Keys.onEnterPressed: doRename(groupName.text)
|
|
||||||
Keys.onReturnPressed: doRename(groupName.text)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rightButtons: [
|
Input {
|
||||||
StatusButton {
|
id: groupName
|
||||||
id: saveBtn
|
|
||||||
text: qsTr("Save")
|
anchors.fill: parent
|
||||||
onClicked : { doRename(groupName.text) }
|
|
||||||
}
|
placeholderText: qsTr("Group name")
|
||||||
]
|
Keys.onEnterPressed: doRename(groupName.text)
|
||||||
|
Keys.onReturnPressed: doRename(groupName.text)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue