Warning, /plasma-mobile/raven/src/contents/ui/mailpartview/MailPart.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2016 Michael Bohlender <michael.bohlender@kdemail.net>
0002 // SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu>
0003 // SPDX-License-Identifier: GPL-2.0-or-later
0004 
0005 import QtQuick 2.7
0006 import QtQuick.Controls 2.15 as QQC2
0007 
0008 import org.kde.raven 1.0
0009 import org.kde.kirigami 2.19 as Kirigami
0010 
0011 Item {
0012     id: root
0013     property alias rootIndex: visualModel.rootIndex
0014     property alias model: visualModel.model
0015     property alias searchString: visualModel.searchString
0016     property alias autoLoadImages: visualModel.autoLoadImages
0017     property variant sender
0018     property variant date
0019     height: childrenRect.height
0020 
0021     Rectangle {
0022         id: border
0023         anchors {
0024             top: parent.top
0025             left: parent.left
0026             leftMargin: Kirigami.Units.smallSpacing
0027         }
0028         color: Kirigami.Theme.disabledTextColor
0029         height: partListView.height + sender.height
0030         width: Kirigami.Units.smallSpacing
0031     }
0032 
0033     Text {
0034         id: sender
0035         anchors {
0036             top: parent.top
0037             left: border.right
0038             leftMargin: Kirigami.Units.smallSpacing
0039             right: parent.right
0040         }
0041 
0042         text: i18n("sent by %1 on %2", root.sender, Qt.formatDateTime(root.date, "dd MMM yyyy hh:mm"))
0043         color: "grey"
0044         clip: true
0045     }
0046     ListView {
0047         id: partListView
0048         anchors {
0049             top: sender.bottom
0050             left: border.right
0051             margins: Kirigami.Units.smallSpacing
0052             leftMargin: Kirigami.Units.smallSpacing
0053         }
0054         model: MailPartModel {
0055             id: visualModel
0056         }
0057         spacing: 7
0058         height: contentHeight
0059         width: parent.width - Kirigami.Units.smallSpacing * 3
0060         interactive: false
0061     }
0062 }