Warning, /pim/kube/views/todo/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 { 0036 id: "account1", 0037 name: "Test Account" 0038 }, 0039 { 0040 id: "account2", 0041 name: "Test Account2" 0042 }, 0043 ], 0044 identities: [{ 0045 account: "account1", 0046 name: "Test Identity", 0047 address: "identity@example.org" 0048 }], 0049 resources: [ 0050 { 0051 id: "caldavresource", 0052 account: "account1", 0053 type: "caldav", 0054 }, 0055 { 0056 id: "caldavresource2", 0057 account: "account2", 0058 type: "caldav", 0059 } 0060 ], 0061 calendars: [{ 0062 id: "calendar1", 0063 resource: "caldavresource", 0064 name: "Test Calendar", 0065 color: "#af1a6a", 0066 enabled: true, 0067 todos: [ 0068 { 0069 resource: "caldavresource", 0070 summary: "Todo start", 0071 start: "2018-04-09T14:03:00", 0072 description: "<pre>Hi Mélanie,\n\nI'm sorry to start this on such late notice, but we'd like to get Foo and boo to woo next week, because the following weeks are unfortunately not possible for us.\n<pre>", 0073 doing: true, 0074 subtodos: [ 0075 { 0076 resource: "caldavresource", 0077 summary: "subtodo", 0078 start: "2018-04-09T14:03:00", 0079 description: "<pre>Hi Mélanie,\n\nI'm sorry to start this on such late notice, but we'd like to get Foo and boo to woo next week, because the following weeks are unfortunately not possible for us.\n<pre>", 0080 } 0081 ] 0082 }, 0083 { 0084 resource: "caldavresource", 0085 summary: "Todo due", 0086 due: "2018-04-17T14:03:00", 0087 description: "Hi Mélanie,\n\nI'm sorry to start this on such late notice, but we'd like to get Foo and boo to woo next week, because the following weeks are unfortunately not possible for us.\n", 0088 doing: true 0089 }, 0090 { 0091 resource: "caldavresource", 0092 summary: "Todo due today", 0093 due: "2018-04-11T14:03:00", 0094 description: "Hi Mélanie,\n\nI'm sorry to start this on such late notice, but we'd like to get Foo and boo to woo next week, because the following weeks are unfortunately not possible for us.\n", 0095 doing: true 0096 }, 0097 { 0098 resource: "caldavresource", 0099 summary: "Todo overdue", 0100 due: "2018-04-03T14:03:00", 0101 description: "Hi Mélanie,\n\nI'm sorry to start this on such late notice, but we'd like to get Foo and boo to woo next week, because the following weeks are unfortunately not possible for us.\n", 0102 doing: true 0103 }, 0104 { 0105 resource: "caldavresource", 0106 summary: "Todo start and due", 0107 start: "2018-04-13T14:03:00", 0108 due: "2018-04-14T14:03:00", 0109 description: "Hi Mélanie,\n\nI'm sorry to start this on such late notice, but we'd like to get Foo and boo to woo next week, because the following weeks are unfortunately not possible for us.\n", 0110 }, 0111 { 0112 resource: "caldavresource", 0113 summary: "Todo" 0114 }, 0115 { 0116 resource: "caldavresource", 0117 summary: "Todo done", 0118 due: "2018-04-03T14:03:00", 0119 description: "Hi Mélanie,\n\nI'm sorry to start this on such late notice, but we'd like to get Foo and boo to woo next week, because the following weeks are unfortunately not possible for us.\n", 0120 done: true 0121 }, 0122 { 0123 resource: "caldavresource", 0124 summary: "Todo needs action", 0125 due: "2018-04-03T14:03:00", 0126 description: "Hi Mélanie,\n\nI'm sorry to start this on such late notice, but we'd like to get Foo and boo to woo next week, because the following weeks are unfortunately not possible for us.\n", 0127 needsAction: true 0128 }, 0129 ], 0130 }, 0131 { 0132 id: "calendar16", 0133 resource: "caldavresource", 0134 name: "Test Calendar16", 0135 enabled: true, 0136 color: "#f67400", 0137 todos: [ 0138 { 0139 resource: "caldavresource", 0140 summary: "Todo from another list", 0141 description: "Stuff" 0142 } 0143 ] 0144 }, 0145 { 0146 id: "account2calendar", 0147 resource: "caldavresource2", 0148 name: "Account2Calendar", 0149 color: "#f67400" 0150 }], 0151 } 0152 TestStore.setup(initialState) 0153 Kube.Context.autoUpdateDate = false 0154 Kube.Context.currentDate = "2018-04-11T13:04:03" 0155 } 0156 0157 View { 0158 anchors.fill: parent 0159 } 0160 }