mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-19 04:30:44 +00:00
43 lines
1002 B
QML
43 lines
1002 B
QML
|
import QtQuick 2.1
|
||
|
import QtQuick.Window 2.0
|
||
|
import QtQuick.Controls 1.1
|
||
|
import QtQuick.Layouts 1.1
|
||
|
|
||
|
Window{
|
||
|
id: insertnamedialog
|
||
|
width: 400
|
||
|
height: 100
|
||
|
modality: Qt.ApplicationModal
|
||
|
title: qsTr("Save current profile")
|
||
|
|
||
|
signal nameSelected(string name)
|
||
|
|
||
|
ColumnLayout{
|
||
|
anchors.margins: 10
|
||
|
anchors.fill: parent
|
||
|
RowLayout{
|
||
|
Label{text: qsTr("Name")}
|
||
|
TextField{
|
||
|
id: namefield
|
||
|
Layout.fillWidth: true
|
||
|
Component.onCompleted: forceActiveFocus()
|
||
|
}
|
||
|
}
|
||
|
RowLayout{
|
||
|
anchors.right: parent.right
|
||
|
anchors.bottom: parent.bottom
|
||
|
Button{
|
||
|
text: qsTr("OK")
|
||
|
onClicked: {
|
||
|
nameSelected(namefield.text);
|
||
|
close();
|
||
|
}
|
||
|
}
|
||
|
Button{
|
||
|
text: qsTr("Cancel")
|
||
|
onClicked: close()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|