Warning, /pim/kube/framework/qml/mailpartview/TextPart.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.7 0020 import QtQuick.Controls 2 0021 0022 import org.kube.framework 1.0 as Kube 0023 0024 Item { 0025 id: root 0026 0027 property string content 0028 property bool embedded: true 0029 property string type 0030 property bool autoLoadImages: false 0031 0032 property string searchString 0033 property int contentHeight: textEdit.height 0034 0035 onSearchStringChanged: { 0036 //This is a workaround because otherwise the view will not take the ViewHighlighter changes into account. 0037 textEdit.text = root.content 0038 } 0039 0040 Kube.TextArea { 0041 id: textEdit 0042 objectName: "textView" 0043 0044 anchors { 0045 top: parent.top 0046 left: parent.left 0047 right: parent.right 0048 } 0049 0050 text: content.substring(0, 100000) //The TextEdit deals poorly with messages that are too large. 0051 color: embedded ? Kube.Colors.disabledTextColor : Kube.Colors.textColor 0052 0053 Kube.ViewHighlighter { 0054 textDocument: textEdit.textDocument 0055 searchString: root.searchString 0056 } 0057 } 0058 }