Warning, /pim/kube/views/composer/main.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * Copyright (C) 2018 Christian Mollekopf, <mollekopf@kolabsys.com> 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.0 0021 import QtQuick.Window 2.0 0022 0023 import org.kube.framework 1.0 as Kube 0024 import org.kube.test 1.0 0025 import "qml" 0026 0027 ApplicationWindow { 0028 id: app 0029 height: Screen.desktopAvailableHeight * 0.8 0030 width: Screen.desktopAvailableWidth * 0.8 0031 0032 Component.onCompleted: { 0033 var initialState = { 0034 accounts: [{ 0035 id: "account1", 0036 name: "Test Account" 0037 }], 0038 identities: [{ 0039 account: "account1", 0040 name: "Test Identity", 0041 address: "identity@example.org" 0042 }], 0043 resources: [{ 0044 id: "resource1", 0045 account: "account1", 0046 type: "dummy" 0047 }, 0048 { 0049 id: "resource2", 0050 account: "account1", 0051 type: "mailtransport" 0052 }, 0053 { 0054 id: "carddavresource", 0055 account: "account1", 0056 type: "carddav", 0057 }], 0058 addressbooks: [{ 0059 id: "addressbook0", 0060 resource: "carddavresource", 0061 name: "Addressbook(wrong)" 0062 }, 0063 { 0064 id: "addressbook1", 0065 resource: "carddavresource", 0066 name: "Default Addressbook", 0067 0068 generator: { 0069 count: 100, 0070 key: "key", 0071 template: { 0072 resource: "carddavresource", 0073 givenname: "key", 0074 familyname: "Doe", 0075 email: ["key@example.org"], 0076 } 0077 }, 0078 0079 contacts: [{ 0080 resource: "carddavresource", 0081 uid: "uid1", 0082 givenname: "John", 0083 familyname: "Doe", 0084 email: ["doe@example.org"], 0085 }], 0086 }], 0087 folders: [{ 0088 id: "folder1", 0089 resource: "resource1", 0090 name: "Folder 1", 0091 specialpurpose: ["drafts"], 0092 mails: [{ 0093 resource: "resource1", 0094 messageId: "<msg1@test.com>", 0095 date: "2017-07-24T15:46:29", 0096 subject: "subject1", 0097 body: "body", 0098 to: ["to@example.org"], 0099 cc: ["No Quoting <cc@example.org>"], 0100 bcc: ["\"Needs, Quoting\" <bcc@example.org>"], 0101 draft: true 0102 }, 0103 { 0104 resource: "resource1", 0105 messageId: "<msg2@test.com>", 0106 date: "2017-07-23T15:46:29", 0107 subject: "LooooooooooooooooooooooooooooooooooooooooooooooooooooooooonggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggEnd", 0108 body: "LooooooooooooooooooooooooooooooooooooooooooooooooooooooooonggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggEnd\nbody\nbody\n\n\nbody\n\n\nbody\n\n\nbody\n\n\nbody\nbody\n\n\nbody\n\n\nbody\n\n\nbody\n\n\nbody\n\n\n\n\n\n\n\n\nbody\nbody\n\n\nbody\n\n\nbody\n\n\nbody\n\n\nbody\n\n\nbody", 0109 to: ["toLoooooooooooooooooooooooooooooooooooooooooooooooooong@example.org"], 0110 cc: ["ccLoooooooooooooooooooooooooooooooooooooooooooooooooong@example.org"], 0111 bcc: ["bccLoooooooooooooooooooooooooooooooooooooooooooooooooong@example.org"], 0112 draft: true 0113 }, 0114 { 0115 resource: "resource1", 0116 messageId: "<msg3@test.com>", 0117 date: "2017-07-23T16:46:29", 0118 subject: "HTML", 0119 body: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\"><html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">p, li { white-space: pre-wrap; }</style></head><body style=\" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;\"><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">body</span></p></body></html>", 0120 to: ["html@example.org"], 0121 draft: true 0122 }, 0123 { 0124 resource: "resource1", 0125 messageId: "<msg4@test.com>", 0126 date: "2017-07-24T16:46:29", 0127 subject: "A more pleasant writing experience ", 0128 body: "Lots of studies suggest the optimal line length for reading (and therefore writing) is somewhere between 50 and 75 characters per line. For most writing purposes I suspect the real figure is between 60 and 70 (and it will depend on your screen and your font so you will need to fiddle to get that right).\n\nI agree this works a lot better.", 0129 to: ["html@example.org"], 0130 draft: true 0131 } 0132 0133 ] 0134 }], 0135 } 0136 TestStore.setup(initialState) 0137 } 0138 0139 View { 0140 anchors.fill: parent 0141 } 0142 }