Warning, /pim/kube/accounts/gmail/qml/AccountSettings.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> 0003 Copyright (C) 2017 Christian Mollekopf, <mollekopf@kolabsys.com> 0004 0005 This program is free software; you can redistribute it and/or modify 0006 it under the terms of the GNU General Public License as published by 0007 the Free Software Foundation; either version 2 of the License, or 0008 (at your option) any later version. 0009 0010 This program is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 GNU General Public License for more details. 0014 0015 You should have received a copy of the GNU General Public License along 0016 with this program; if not, write to the Free Software Foundation, Inc., 0017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0018 */ 0019 0020 import QtQuick 2.4 0021 import QtQuick.Layouts 1.1 0022 import org.kube.framework 1.0 as Kube 0023 import org.kube.accounts.gmail 1.0 as GmailAccount 0024 0025 Item { 0026 0027 property string accountId 0028 property string heading: qsTr("Connect your Google account") 0029 property string subheadline: qsTr("To let Kube access your account, fill in email address, username and give the account a title that will be displayed inside Kube.") 0030 property bool valid: true 0031 implicitHeight: grid.implicitHeight 0032 0033 GmailAccount.GmailSettings { 0034 id: gmailSettings 0035 accountIdentifier: accountId 0036 accountType: "gmail" 0037 } 0038 0039 function save(){ 0040 gmailSettings.save() 0041 } 0042 0043 function remove(){ 0044 gmailSettings.remove() 0045 } 0046 0047 GridLayout { 0048 id: grid 0049 anchors.fill: parent 0050 columns: 2 0051 columnSpacing: Kube.Units.largeSpacing 0052 rowSpacing: Kube.Units.largeSpacing 0053 0054 Kube.Label { 0055 text: "Please note that Google requires you to configure your account to allow IMAP connections from Kube: 0056 <ol type=''> 0057 <li> See <a href='https://support.google.com/mail/answer/7126229'>https://support.google.com/mail/answer/7126229</a> to configure your account to allow IMAP connections. 0058 <li> Visit <a href='https://myaccount.google.com/lesssecureapps'>https://myaccount.google.com/lesssecureapps</a> and enable the setting to allow Kube to connect to your account." 0059 Layout.alignment: Qt.AlignCenter 0060 Layout.columnSpan: 2 0061 textFormat: Text.StyledText 0062 } 0063 0064 Kube.Label { 0065 text: qsTr("Name") 0066 Layout.alignment: Qt.AlignRight 0067 } 0068 Kube.TextField { 0069 Layout.fillWidth: true 0070 placeholderText: qsTr("Your name") 0071 text: gmailSettings.userName 0072 onTextChanged: { 0073 gmailSettings.userName = text 0074 } 0075 } 0076 0077 Kube.Label { 0078 text: qsTr("Email address") 0079 Layout.alignment: Qt.AlignRight 0080 } 0081 Kube.TextField { 0082 Layout.fillWidth: true 0083 0084 text: gmailSettings.emailAddress 0085 onTextChanged: { 0086 gmailSettings.emailAddress = text 0087 gmailSettings.accountName = text 0088 } 0089 placeholderText: qsTr("Your email address") 0090 } 0091 } 0092 }