Warning, /pim/kube/framework/qml/mailpartview/MailPart.qml is written in an unsupported language. File is not indexed.

0001 /*
0002   Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net>
0003 
0004   This program is free software; you can redistribute it and/or modify
0005   it under the terms of the GNU General Public License as published by
0006   the Free Software Foundation; either version 2 of the License, or
0007   (at your option) any later version.
0008 
0009   This program is distributed in the hope that it will be useful,
0010   but WITHOUT ANY WARRANTY; without even the implied warranty of
0011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0012   GNU General Public License for more details.
0013 
0014   You should have received a copy of the GNU General Public License along
0015   with this program; if not, write to the Free Software Foundation, Inc.,
0016   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0017 */
0018 
0019 import QtQuick 2.4
0020 
0021 import org.kube.framework 1.0 as Kube
0022 
0023 Item {
0024     id: root
0025     property alias rootIndex: visualModel.rootIndex
0026     property alias model: visualModel.model
0027     property alias searchString: visualModel.searchString
0028     property alias autoLoadImages: visualModel.autoLoadImages
0029     property variant sender
0030     property variant date
0031     height: childrenRect.height
0032 
0033     Rectangle {
0034         id: border
0035         anchors {
0036             top: parent.top
0037             left: parent.left
0038             leftMargin: Kube.Units.smallSpacing
0039         }
0040         color: Kube.Colors.lightgrey
0041         height: partListView.height + sender.height
0042         width: Kube.Units.smallSpacing
0043     }
0044 
0045     Text {
0046         id: sender
0047         anchors {
0048             top: parent.top
0049             left: border.right
0050             leftMargin: Kube.Units.smallSpacing
0051             right: parent.right
0052         }
0053 
0054         text: qsTr("sent by %1 on %2").arg(root.sender).arg(Qt.formatDateTime(root.date, "dd MMM yyyy hh:mm"))
0055         color: "grey"
0056         clip: true
0057     }
0058     ListView {
0059         id: partListView
0060         anchors {
0061             top: sender.bottom
0062             left: border.right
0063             margins: Kube.Units.smallSpacing
0064             leftMargin: Kube.Units.smallSpacing
0065         }
0066         model: MailPartModel {
0067             id: visualModel
0068         }
0069         spacing: 7
0070         height: contentHeight
0071         width: parent.width - Kube.Units.smallSpacing * 3
0072         interactive: false
0073     }
0074 }