Warning, /pim/kube/accounts/fastmail/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 
0024 Item {
0025     property alias accountId: fastmailSettings.accountIdentifier
0026     property string heading: qsTr("Connect your FastMail account")
0027     property string subheadline: qsTr("Please fill in your name and email address. Please note that you require an app-specific password and cannot use your regular FastMail password.")
0028     property bool valid: nameField.acceptableInput && emailField.acceptableInput
0029     implicitHeight: grid.implicitHeight
0030 
0031     FastmailSettings {
0032         id: fastmailSettings
0033     }
0034 
0035     function save(){
0036         fastmailSettings.save()
0037     }
0038 
0039     function remove(){
0040         fastmailSettings.remove()
0041     }
0042 
0043     GridLayout {
0044         id: grid
0045         anchors.fill: parent
0046         columns: 2
0047         columnSpacing: Kube.Units.largeSpacing
0048         rowSpacing: Kube.Units.largeSpacing
0049 
0050         Kube.Label {
0051             text: qsTr("Name")
0052             Layout.alignment: Qt.AlignRight
0053         }
0054         Kube.RequiredTextField {
0055             id: nameField
0056             objectName: "nameTextField"
0057             focus: true
0058             Layout.fillWidth: true
0059             placeholderText: qsTr("Your name")
0060             text: fastmailSettings.userName
0061             onTextChanged: {
0062                 fastmailSettings.userName = text
0063             }
0064         }
0065 
0066         Kube.Label {
0067             text: qsTr("Email address")
0068             Layout.alignment: Qt.AlignRight
0069         }
0070         Kube.RequiredTextField {
0071             id: emailField
0072             objectName: "emailTextField"
0073             Layout.fillWidth: true
0074 
0075             text: fastmailSettings.emailAddress
0076             onTextChanged: {
0077                 fastmailSettings.emailAddress = text
0078                 fastmailSettings.accountName = text
0079             }
0080             placeholderText: qsTr("Your email address")
0081         }
0082     }
0083 }