Warning, /pim/mimetreeparser/examples/qml/content/main.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2023 Carl Schwan <carl.schwan@gnupg.com> 0002 // SPDX-License-Identifier: LGPL-2.0-or-later 0003 0004 import QtQuick 2.15 0005 import QtQuick.Layouts 1.15 0006 import QtQuick.Dialogs 6.2 0007 import org.kde.kirigami 2.20 as Kirigami 0008 import org.kde.pim.mimetreeparser 1.0 0009 import org.kde.mimetreeparser 1.0 0010 0011 Kirigami.ApplicationWindow { 0012 id: root 0013 0014 readonly property Kirigami.Action openFileAction: Kirigami.Action { 0015 text: i18n("Open File") 0016 shortcut: "Ctrl+O" 0017 onTriggered: fileDialog.open() 0018 } 0019 0020 FileDialog { 0021 id: fileDialog 0022 title: i18n("Choose file") 0023 onAccepted: messageHandler.open(selectedFile) 0024 } 0025 0026 MessageHandler { 0027 id: messageHandler 0028 objectName: "MessageHandler" 0029 onMessageOpened: message => { 0030 pageStack.currentItem.message = message 0031 } 0032 } 0033 0034 pageStack.initialPage: MailViewer { 0035 } 0036 }