2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared.controls 1.0
|
2021-10-20 08:34:05 +00:00
|
|
|
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Popups 0.1
|
|
|
|
|
|
|
|
StatusModal {
|
2020-06-15 16:24:21 +00:00
|
|
|
|
2020-06-15 12:51:04 +00:00
|
|
|
id: popup
|
2020-09-23 18:01:33 +00:00
|
|
|
height: 210
|
2021-10-20 08:34:05 +00:00
|
|
|
anchors.centerIn: parent
|
2020-06-15 12:51:04 +00:00
|
|
|
|
2020-09-23 18:01:33 +00:00
|
|
|
//% "Group name"
|
2021-10-20 08:34:05 +00:00
|
|
|
header.title: qsTrId("group-name")
|
2020-06-15 12:51:04 +00:00
|
|
|
|
2021-10-22 20:49:47 +00:00
|
|
|
property string activeChannelName
|
|
|
|
signal doRename(string groupName)
|
|
|
|
|
2020-06-15 12:51:04 +00:00
|
|
|
onOpened: {
|
|
|
|
groupName.forceActiveFocus(Qt.MouseFocusReason)
|
2021-10-22 20:49:47 +00:00
|
|
|
groupName.text = popup.activeChannelName;
|
2020-06-15 12:51:04 +00:00
|
|
|
}
|
|
|
|
|
2021-10-20 08:34:05 +00:00
|
|
|
contentItem: Item {
|
|
|
|
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
|
|
|
|
//% "Group name"
|
|
|
|
placeholderText: qsTrId("group-name")
|
|
|
|
Keys.onEnterPressed: doRename()
|
|
|
|
Keys.onReturnPressed: doRename()
|
|
|
|
}
|
2020-06-15 12:51:04 +00:00
|
|
|
}
|
|
|
|
|
2021-10-20 08:34:05 +00:00
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
id: saveBtn
|
|
|
|
//% "Save"
|
|
|
|
text: qsTrId("save")
|
2021-10-22 20:49:47 +00:00
|
|
|
onClicked : { doRename(groupName.text); }
|
2021-10-20 08:34:05 +00:00
|
|
|
}
|
|
|
|
]
|
2020-06-15 12:51:04 +00:00
|
|
|
}
|