diff options
Diffstat (limited to 'ErrorPopup.qml')
-rw-r--r-- | ErrorPopup.qml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ErrorPopup.qml b/ErrorPopup.qml new file mode 100644 index 0000000..e4ca2ee --- /dev/null +++ b/ErrorPopup.qml @@ -0,0 +1,42 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// Copyright (C) 2024 Automotive Grade Linux +// SPDX-License-Identifier: GPL-3.0+ + +import QtQuick +import QtQuick.Controls.Fusion +import Config + +Popup { + id: errorPopup + anchors.centerIn: Overlay.overlay + padding: 30 + + property alias errorMsg: label.text + + onOpened: closeTimer.restart() + + background: Rectangle { + color: "transparent" + } + + Column { + spacing: 15 + + Image { + source: Config.iconSource("Error", false) + anchors.horizontalCenter: parent.horizontalCenter + } + + Label { + id: label + color: "#FFE353" + font.pixelSize: 24 + } + } + + Timer { + id: closeTimer + interval: 5000 + onTriggered: errorPopup.close() + } +} |