73 lines
1.6 KiB
QML
Raw Normal View History

2021-09-24 15:03:57 +03:00
import QtQuick 2.13
2021-09-27 10:36:38 +03:00
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
2021-09-24 15:03:57 +03:00
2021-09-27 10:36:38 +03:00
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
StatusModal {
2021-09-27 16:55:39 +03:00
property var onCancel: function() {}
2021-09-27 10:36:38 +03:00
id: insertCard
anchors.centerIn: parent
showHeader: false
focus: visible
contentItem: Item {
width: insertCard.width
implicitHeight: childrenRect.height
Column {
width: parent.width - 32
anchors.horizontalCenter: parent.horizontalCenter
Item {
width: parent.width
height: 16
}
StatusBaseText {
text: qsTr("Please insert your Keycard to proceed or press the cancel button to cancel the operation")
font.pixelSize: 15
anchors.left: parent.left
anchors.right: parent.right
wrapMode: Text.WordWrap
color: Theme.palette.directColor1
}
Item {
width: parent.width
height: 16
}
}
}
rightButtons: [
StatusButton {
id: cancelButton
text: qsTr("Cancel")
2021-09-27 16:55:39 +03:00
onClicked: {
insertCard.close()
onCancel()
}
2021-09-27 10:36:38 +03:00
}
]
2021-09-27 16:55:39 +03:00
// Not Refactored Yet
// Connections {
// id: connection
// target: keycardModel
// ignoreUnknownSignals: true
2021-09-27 16:55:39 +03:00
// onCardConnected: {
// insertCard.close()
// }
2021-09-27 16:55:39 +03:00
// onCardDisconnected: {
// insertCard.open()
// }
// }
2021-09-27 10:36:38 +03:00
}