From f29e0ca5670bb683548e158c9ca5d0a7b05555a2 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Mon, 5 Sep 2016 16:26:34 +0200 Subject: mailviewer: move qml files to dedicated folder --- components/mailviewer/qml/EmbededPart.qml | 36 +++++++++++++++ components/mailviewer/qml/EncryptedPart.qml | 51 ++++++++++++++++++++ components/mailviewer/qml/MailModel.qml | 32 +++++++++++++ components/mailviewer/qml/MailPart.qml | 61 ++++++++++++++++++++++++ components/mailviewer/qml/TextPart.qml | 10 ++++ components/mailviewer/qml/bordergreen.png | Bin 0 -> 1821 bytes components/mailviewer/qml/bordergrey.png | Bin 0 -> 646 bytes components/mailviewer/qml/dummyapp.qml | 69 ++++++++++++++++++++++++++++ 8 files changed, 259 insertions(+) create mode 100644 components/mailviewer/qml/EmbededPart.qml create mode 100644 components/mailviewer/qml/EncryptedPart.qml create mode 100644 components/mailviewer/qml/MailModel.qml create mode 100644 components/mailviewer/qml/MailPart.qml create mode 100644 components/mailviewer/qml/TextPart.qml create mode 100644 components/mailviewer/qml/bordergreen.png create mode 100644 components/mailviewer/qml/bordergrey.png create mode 100644 components/mailviewer/qml/dummyapp.qml (limited to 'components/mailviewer/qml') diff --git a/components/mailviewer/qml/EmbededPart.qml b/components/mailviewer/qml/EmbededPart.qml new file mode 100644 index 00000000..11d1081c --- /dev/null +++ b/components/mailviewer/qml/EmbededPart.qml @@ -0,0 +1,36 @@ +import QtQuick 2.4 + +Item { + + height: mailPart.height + width: mailPart.width + + + Rectangle { + id: border + color: "lightgrey" + height: mailPart.height + width: 5 + } + + Text { + id: sender + + anchors { + left: border.right + leftMargin: 15 + } + + text: "sent by " + model.sender + " on " + model.date + color: "grey" + } + + MailPart { + id: mailPart + + anchors.top: sender.bottom + + } + +} + diff --git a/components/mailviewer/qml/EncryptedPart.qml b/components/mailviewer/qml/EncryptedPart.qml new file mode 100644 index 00000000..9f4b984e --- /dev/null +++ b/components/mailviewer/qml/EncryptedPart.qml @@ -0,0 +1,51 @@ +import QtQuick 2.4 +import QtQuick.Controls 1.5 + +Item { + + height: mailPart.height + width: mailPart.width + + // Rectangle { + // id: border + + // border.width: 5 + // border.color: "lightgreen" + //} + + BorderImage { + + anchors.fill: parent + border { left: 40; top: 40; right: 40; bottom: 40 } + horizontalTileMode: BorderImage.Repeat + verticalTileMode: BorderImage.Repeat + + source: model.trusted ? "bordergreen.png" : "bordergrey.png" + } + + MailPart { + id: mailPart + + } + + Rectangle { + + anchors { + top: parent.top + right: parent.right + } + + height: 50 + width: 50 + + radius: 100 + + color: model.trusted ? "lightgreen" : "lightgrey" + + ToolButton { + anchors.fill: parent + + iconName: "document-encrypt" + } + } +} diff --git a/components/mailviewer/qml/MailModel.qml b/components/mailviewer/qml/MailModel.qml new file mode 100644 index 00000000..8177b9d4 --- /dev/null +++ b/components/mailviewer/qml/MailModel.qml @@ -0,0 +1,32 @@ +import QtQuick 2.4 + +ListModel { + + ListElement { + type: "encrypted" + trusted: true + content: [ + ListElement { + type: "plaintext" + textContent: "Moin, \n find the forwarded mail below. \n \n - M" + embeded: false + }, + ListElement { + type: "embeded" + sender: "Senderson" + date: "05/05/2055" + content: [ + ListElement{ + type: "plaintext" + textContent: "sender mc senderson is a sender. sender mc senderson is a sender. sender mc senderson is a mc senderson is a sender sender mc senderson is a sender sender mc senderson is a sender sender mc senderson is a sender sender mc senderson is a sender sender mc a sender sender mc is a sender sender mc senderson is a sendersender mc senderson is a sender" + embeded: true + }] + } + ] + } + ListElement { + type: "plaintext" + textContent: "footer mc footerson" + embeded: false + } +} diff --git a/components/mailviewer/qml/MailPart.qml b/components/mailviewer/qml/MailPart.qml new file mode 100644 index 00000000..d7ae425f --- /dev/null +++ b/components/mailviewer/qml/MailPart.qml @@ -0,0 +1,61 @@ +import QtQuick 2.4 + +Item { + id: root + + height: partColumn.height + 40 + width: delegateRoot.width + + Column { + id: partColumn + + anchors { + top: parent.top + left: parent.left + right: parent.right + margins: 20 + } + + spacing: 10 + + Repeater { + model: content + + delegate: Column { + id: delegateRoot + + width: partColumn.width + + Loader { + id: loader + } + + Component.onCompleted: { + + switch (model.type) { + case "encrypted": + loader.source = "EncryptedPart.qml"; + break; + case "embeded": + loader.source = "EmbededPart.qml"; + break; + case "frame": + loader.source = "Frame.qml" + break; + case "plaintext": + loader.source = "TextPart.qml"; + break; + } + } + } + } + + + Item { + id: footer + + height: 5 + width: 10 + } + } +} diff --git a/components/mailviewer/qml/TextPart.qml b/components/mailviewer/qml/TextPart.qml new file mode 100644 index 00000000..3a4c8d22 --- /dev/null +++ b/components/mailviewer/qml/TextPart.qml @@ -0,0 +1,10 @@ +import QtQuick 2.4 + +Text { + width: delegateRoot.width + + text: model.textContent + wrapMode: Text.WordWrap + + color: embeded ? "grey" : "black" +} diff --git a/components/mailviewer/qml/bordergreen.png b/components/mailviewer/qml/bordergreen.png new file mode 100644 index 00000000..9071d809 Binary files /dev/null and b/components/mailviewer/qml/bordergreen.png differ diff --git a/components/mailviewer/qml/bordergrey.png b/components/mailviewer/qml/bordergrey.png new file mode 100644 index 00000000..1baa8345 Binary files /dev/null and b/components/mailviewer/qml/bordergrey.png differ diff --git a/components/mailviewer/qml/dummyapp.qml b/components/mailviewer/qml/dummyapp.qml new file mode 100644 index 00000000..878b77ed --- /dev/null +++ b/components/mailviewer/qml/dummyapp.qml @@ -0,0 +1,69 @@ +import QtQuick 2.4 + +Rectangle { + id: app + + width: 1200 + height: 700 + + Rectangle { + anchors.fill: parent + + color: "black" + + opacity: 0.8 + + } + + Rectangle { + + anchors.centerIn: parent + + height: mainColumn.height + 50 + width: parent.width * 0.9 + + Column { + id: mainColumn + + anchors.centerIn: parent + + width: parent.width - 50 + + spacing: 10 + + Repeater { + model: MailModel {} + + delegate: Column { + id: delegateRoot + + width: mainColumn.width + + Loader { + id: loader + } + + Component.onCompleted: { + switch (model.type) { + case "red": + loader.source = "Rect2.qml"; + break; + case "green": + loader.source = "Rect1.qml"; + break; + case "encrypted": + loader.source = "EncryptedPart.qml"; + break; + case "frame": + loader.source = "Frame.qml"; + break; + case "plaintext": + loader.source = "TextPart.qml"; + break; + } + } + } + } + } + } +} -- cgit v1.2.3 From 217819aa165a72c5c006f3b980e4dc8a4db213c0 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Thu, 15 Sep 2016 09:06:19 +0200 Subject: add security border images made by Jens Reuterberg --- components/mailviewer/qml/bordergreen.png | Bin 1821 -> 0 bytes components/mailviewer/qml/bordergrey.png | Bin 646 -> 0 bytes components/mailviewer/qml/securitybordersGRAY.png | Bin 0 -> 734 bytes components/mailviewer/qml/securitybordersGREEN.png | Bin 0 -> 725 bytes components/mailviewer/qml/securitybordersRED.png | Bin 0 -> 725 bytes components/mailviewer/qml/securitybordersYELLOW.png | Bin 0 -> 735 bytes 6 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 components/mailviewer/qml/bordergreen.png delete mode 100644 components/mailviewer/qml/bordergrey.png create mode 100644 components/mailviewer/qml/securitybordersGRAY.png create mode 100644 components/mailviewer/qml/securitybordersGREEN.png create mode 100644 components/mailviewer/qml/securitybordersRED.png create mode 100644 components/mailviewer/qml/securitybordersYELLOW.png (limited to 'components/mailviewer/qml') diff --git a/components/mailviewer/qml/bordergreen.png b/components/mailviewer/qml/bordergreen.png deleted file mode 100644 index 9071d809..00000000 Binary files a/components/mailviewer/qml/bordergreen.png and /dev/null differ diff --git a/components/mailviewer/qml/bordergrey.png b/components/mailviewer/qml/bordergrey.png deleted file mode 100644 index 1baa8345..00000000 Binary files a/components/mailviewer/qml/bordergrey.png and /dev/null differ diff --git a/components/mailviewer/qml/securitybordersGRAY.png b/components/mailviewer/qml/securitybordersGRAY.png new file mode 100644 index 00000000..f8b768a8 Binary files /dev/null and b/components/mailviewer/qml/securitybordersGRAY.png differ diff --git a/components/mailviewer/qml/securitybordersGREEN.png b/components/mailviewer/qml/securitybordersGREEN.png new file mode 100644 index 00000000..8de8c534 Binary files /dev/null and b/components/mailviewer/qml/securitybordersGREEN.png differ diff --git a/components/mailviewer/qml/securitybordersRED.png b/components/mailviewer/qml/securitybordersRED.png new file mode 100644 index 00000000..f28ed990 Binary files /dev/null and b/components/mailviewer/qml/securitybordersRED.png differ diff --git a/components/mailviewer/qml/securitybordersYELLOW.png b/components/mailviewer/qml/securitybordersYELLOW.png new file mode 100644 index 00000000..a40a8887 Binary files /dev/null and b/components/mailviewer/qml/securitybordersYELLOW.png differ -- cgit v1.2.3 From 711ac9758976f1e2412b28b7b1a80780eec4641f Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Thu, 15 Sep 2016 09:35:09 +0200 Subject: use new security boder images --- components/mailviewer/qml/EncryptedPart.qml | 38 +++++------------------------ components/mailviewer/qml/MailModel.qml | 2 +- 2 files changed, 7 insertions(+), 33 deletions(-) (limited to 'components/mailviewer/qml') diff --git a/components/mailviewer/qml/EncryptedPart.qml b/components/mailviewer/qml/EncryptedPart.qml index 9f4b984e..eba6c035 100644 --- a/components/mailviewer/qml/EncryptedPart.qml +++ b/components/mailviewer/qml/EncryptedPart.qml @@ -3,49 +3,23 @@ import QtQuick.Controls 1.5 Item { - height: mailPart.height - width: mailPart.width - - // Rectangle { - // id: border - - // border.width: 5 - // border.color: "lightgreen" - //} + height: mailPart.height + 20 + width: mailPart.width + 20 BorderImage { anchors.fill: parent border { left: 40; top: 40; right: 40; bottom: 40 } - horizontalTileMode: BorderImage.Repeat - verticalTileMode: BorderImage.Repeat + horizontalTileMode: BorderImage.Round + verticalTileMode: BorderImage.Round - source: model.trusted ? "bordergreen.png" : "bordergrey.png" + source: "securityborders" + model.securityLevel + ".png" } MailPart { id: mailPart - } - - Rectangle { - - anchors { - top: parent.top - right: parent.right - } - - height: 50 - width: 50 - - radius: 100 - - color: model.trusted ? "lightgreen" : "lightgrey" - - ToolButton { - anchors.fill: parent + anchors.centerIn: parent - iconName: "document-encrypt" - } } } diff --git a/components/mailviewer/qml/MailModel.qml b/components/mailviewer/qml/MailModel.qml index 8177b9d4..808a8d5b 100644 --- a/components/mailviewer/qml/MailModel.qml +++ b/components/mailviewer/qml/MailModel.qml @@ -4,7 +4,7 @@ ListModel { ListElement { type: "encrypted" - trusted: true + securityLevel: "GREEN" content: [ ListElement { type: "plaintext" -- cgit v1.2.3 From 9afc6c4b38b2d24783f26d82e155308af6685485 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Thu, 22 Sep 2016 10:58:19 +0200 Subject: mailviewer: add signed part --- components/mailviewer/qml/SignedPart.qml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 components/mailviewer/qml/SignedPart.qml (limited to 'components/mailviewer/qml') diff --git a/components/mailviewer/qml/SignedPart.qml b/components/mailviewer/qml/SignedPart.qml new file mode 100644 index 00000000..729a2a8d --- /dev/null +++ b/components/mailviewer/qml/SignedPart.qml @@ -0,0 +1,26 @@ +import QtQuick 2.4 +import QtQuick.Controls 1.5 + +Item { + + height: mailPart.height + 20 + width: mailPart.width + 20 + + BorderImage { + + anchors.fill: parent + border { left: 40; top: 40; right: 40; bottom: 40 } + horizontalTileMode: BorderImage.Round + verticalTileMode: BorderImage.Round + + source: "securityborders" + model.securityLevel + ".png" + } + + MailPart { + id: mailPart + + anchors.centerIn: parent + + } +} + -- cgit v1.2.3 From 9bae06b6cc73a50e1aebac83e4b6a05ebce293c9 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Thu, 22 Sep 2016 11:02:10 +0200 Subject: add license headers to mailviewer --- components/mailviewer/qml/EmbededPart.qml | 18 ++++++++++++++++++ components/mailviewer/qml/EncryptedPart.qml | 18 ++++++++++++++++++ components/mailviewer/qml/MailModel.qml | 18 ++++++++++++++++++ components/mailviewer/qml/MailPart.qml | 18 ++++++++++++++++++ components/mailviewer/qml/SignedPart.qml | 18 ++++++++++++++++++ components/mailviewer/qml/TextPart.qml | 18 ++++++++++++++++++ components/mailviewer/qml/dummyapp.qml | 18 ++++++++++++++++++ 7 files changed, 126 insertions(+) (limited to 'components/mailviewer/qml') diff --git a/components/mailviewer/qml/EmbededPart.qml b/components/mailviewer/qml/EmbededPart.qml index 11d1081c..8921ab6f 100644 --- a/components/mailviewer/qml/EmbededPart.qml +++ b/components/mailviewer/qml/EmbededPart.qml @@ -1,3 +1,21 @@ +/* + Copyright (C) 2016 Michael Bohlender, + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import QtQuick 2.4 Item { diff --git a/components/mailviewer/qml/EncryptedPart.qml b/components/mailviewer/qml/EncryptedPart.qml index eba6c035..18a5d588 100644 --- a/components/mailviewer/qml/EncryptedPart.qml +++ b/components/mailviewer/qml/EncryptedPart.qml @@ -1,3 +1,21 @@ +/* + Copyright (C) 2016 Michael Bohlender, + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import QtQuick 2.4 import QtQuick.Controls 1.5 diff --git a/components/mailviewer/qml/MailModel.qml b/components/mailviewer/qml/MailModel.qml index 808a8d5b..d18f5ece 100644 --- a/components/mailviewer/qml/MailModel.qml +++ b/components/mailviewer/qml/MailModel.qml @@ -1,3 +1,21 @@ +/* + Copyright (C) 2016 Michael Bohlender, + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import QtQuick 2.4 ListModel { diff --git a/components/mailviewer/qml/MailPart.qml b/components/mailviewer/qml/MailPart.qml index d7ae425f..4917271b 100644 --- a/components/mailviewer/qml/MailPart.qml +++ b/components/mailviewer/qml/MailPart.qml @@ -1,3 +1,21 @@ +/* + Copyright (C) 2016 Michael Bohlender, + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import QtQuick 2.4 Item { diff --git a/components/mailviewer/qml/SignedPart.qml b/components/mailviewer/qml/SignedPart.qml index 729a2a8d..f0daedeb 100644 --- a/components/mailviewer/qml/SignedPart.qml +++ b/components/mailviewer/qml/SignedPart.qml @@ -1,3 +1,21 @@ +/* + Copyright (C) 2016 Michael Bohlender, + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import QtQuick 2.4 import QtQuick.Controls 1.5 diff --git a/components/mailviewer/qml/TextPart.qml b/components/mailviewer/qml/TextPart.qml index 3a4c8d22..5f183852 100644 --- a/components/mailviewer/qml/TextPart.qml +++ b/components/mailviewer/qml/TextPart.qml @@ -1,3 +1,21 @@ +/* + Copyright (C) 2016 Michael Bohlender, + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import QtQuick 2.4 Text { diff --git a/components/mailviewer/qml/dummyapp.qml b/components/mailviewer/qml/dummyapp.qml index 878b77ed..25892f8e 100644 --- a/components/mailviewer/qml/dummyapp.qml +++ b/components/mailviewer/qml/dummyapp.qml @@ -1,3 +1,21 @@ +/* + Copyright (C) 2016 Michael Bohlender, + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import QtQuick 2.4 Rectangle { -- cgit v1.2.3 From 3ad9814b98b6405d0f9b6c7b89413465631d2504 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Thu, 22 Sep 2016 11:42:52 +0200 Subject: add htmlpart and a model for testing it --- components/mailviewer/qml/HtmlPart.qml | 48 ++++++++++++++++++++++++++++++++ components/mailviewer/qml/MailModel2.qml | 28 +++++++++++++++++++ components/mailviewer/qml/MailPart.qml | 3 ++ components/mailviewer/qml/dummyapp.qml | 3 ++ 4 files changed, 82 insertions(+) create mode 100644 components/mailviewer/qml/HtmlPart.qml create mode 100644 components/mailviewer/qml/MailModel2.qml (limited to 'components/mailviewer/qml') diff --git a/components/mailviewer/qml/HtmlPart.qml b/components/mailviewer/qml/HtmlPart.qml new file mode 100644 index 00000000..f1add75c --- /dev/null +++ b/components/mailviewer/qml/HtmlPart.qml @@ -0,0 +1,48 @@ +/* + Copyright (C) 2016 Michael Bohlender, + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +import QtQuick 2.4 +import QtQuick.Controls 1.3 +import QtWebKit 3.0 +// import QtWebEngine 1.3 //This would give use contentsSize +import QtWebEngine 1.2 + +Item { + id: root + property string content: model.htmlContent + property int contentHeight: helperView.contentHeight; + //FIXME workaround until QtWebEngine 1.3 with contentsSize + + height: contentHeight + width: delegateRoot.width + + WebView { + id: helperView + visible: false + Component.onCompleted: loadHtml(content, "file:///") + } + WebEngineView { + id: htmlView + anchors.fill: parent + Component.onCompleted: loadHtml(content, "file:///") + } + onContentChanged: { + htmlView.loadHtml(content, "file:///"); + helperView.loadHtml(content, "file:///"); + } +} diff --git a/components/mailviewer/qml/MailModel2.qml b/components/mailviewer/qml/MailModel2.qml new file mode 100644 index 00000000..9ea45d57 --- /dev/null +++ b/components/mailviewer/qml/MailModel2.qml @@ -0,0 +1,28 @@ +/* + Copyright (C) 2016 Michael Bohlender, + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +import QtQuick 2.4 + +ListModel { + + ListElement { + type: "html" + htmlContent: "

Some Heading

My some paragraph.

" + } +} + diff --git a/components/mailviewer/qml/MailPart.qml b/components/mailviewer/qml/MailPart.qml index 4917271b..966337cd 100644 --- a/components/mailviewer/qml/MailPart.qml +++ b/components/mailviewer/qml/MailPart.qml @@ -63,6 +63,9 @@ Item { case "plaintext": loader.source = "TextPart.qml"; break; + case "html": + loader.source = "HtmlPart.qml"; + break; } } } diff --git a/components/mailviewer/qml/dummyapp.qml b/components/mailviewer/qml/dummyapp.qml index 25892f8e..a186f0f1 100644 --- a/components/mailviewer/qml/dummyapp.qml +++ b/components/mailviewer/qml/dummyapp.qml @@ -78,6 +78,9 @@ Rectangle { case "plaintext": loader.source = "TextPart.qml"; break; + case "html": + loader.source = "HtmlPart.qml"; + break; } } } -- cgit v1.2.3