Warning, /pim/kube/accounts/imap/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.imap 1.0 as ImapAccount 0024 0025 Item { 0026 0027 property string accountId 0028 property string heading: qsTr("Connect your IMAP account") 0029 property string subheadline: qsTr("To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube. For information about which SMTP, IMAP address, which authentication and port to be used, please contact your email provider.") 0030 property bool valid: true 0031 implicitHeight: grid.implicitHeight 0032 0033 ImapAccount.ImapSettings { 0034 id: imapSettings 0035 accountIdentifier: accountId 0036 accountType: "imap" 0037 } 0038 0039 function save(){ 0040 imapSettings.save() 0041 } 0042 0043 function remove(){ 0044 imapSettings.remove() 0045 } 0046 GridLayout { 0047 id: grid 0048 anchors.fill: parent 0049 columns: 2 0050 columnSpacing: Kube.Units.largeSpacing 0051 rowSpacing: Kube.Units.largeSpacing 0052 0053 Kube.Label { 0054 text: qsTr("Name") 0055 Layout.alignment: Qt.AlignRight 0056 } 0057 Kube.RequiredTextField { 0058 Layout.fillWidth: true 0059 placeholderText: qsTr("Your name") 0060 text: imapSettings.userName 0061 onTextChanged: { 0062 imapSettings.userName = text 0063 } 0064 } 0065 0066 Kube.Label { 0067 text: qsTr("Email address") 0068 Layout.alignment: Qt.AlignRight 0069 } 0070 Kube.RequiredTextField { 0071 Layout.fillWidth: true 0072 0073 text: imapSettings.emailAddress 0074 onTextChanged: { 0075 imapSettings.emailAddress = text 0076 imapSettings.accountName = text 0077 } 0078 placeholderText: qsTr("Your email address") 0079 } 0080 Kube.Label { 0081 text: qsTr("Username") 0082 Layout.alignment: Qt.AlignRight 0083 } 0084 Kube.RequiredTextField { 0085 Layout.fillWidth: true 0086 0087 text: imapSettings.imapUsername 0088 onTextChanged: { 0089 imapSettings.imapUsername = text 0090 imapSettings.smtpUsername = text 0091 } 0092 placeholderText: qsTr("Your username for IMAP and SMTP access.") 0093 } 0094 0095 Kube.Label { 0096 text: qsTr("IMAP server address") 0097 Layout.alignment: Qt.AlignRight 0098 } 0099 Kube.RequiredTextField { 0100 id: imapServer 0101 0102 Layout.fillWidth: true 0103 0104 placeholderText: "imaps://mainserver.example.net:993" 0105 text: imapSettings.imapServer 0106 onTextChanged: { 0107 imapSettings.imapServer = text 0108 } 0109 validator: imapSettings.imapServerValidator 0110 } 0111 0112 Kube.Label { 0113 text: qsTr("SMTP address") 0114 Layout.alignment: Qt.AlignRight 0115 } 0116 Kube.RequiredTextField { 0117 id: smtpServer 0118 Layout.fillWidth: true 0119 0120 placeholderText: "smtps://mainserver.example.net:587" 0121 text: imapSettings.smtpServer 0122 onTextChanged: { 0123 imapSettings.smtpServer = text 0124 } 0125 validator: imapSettings.smtpServerValidator 0126 } 0127 } 0128 }