Warning, /pim/kube/accounts/kolabnow/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.kolabnow 1.0 as KolabnowAccount 0024 0025 Item { 0026 property string accountId 0027 property string heading: qsTr("Connect your Kolab Now account") 0028 property string subheadline: qsTr("Please fill in your name and email address. No account yet? <a href='https://kolabnow.com/kube-campaign/'>Sign up now!</a>") 0029 property bool valid: nameField.acceptableInput && emailField.acceptableInput 0030 implicitHeight: grid.implicitHeight 0031 0032 KolabnowAccount.KolabnowSettings { 0033 id: kolabnowSettings 0034 accountIdentifier: accountId 0035 accountType: "kolabnow" 0036 } 0037 0038 function save(){ 0039 kolabnowSettings.save() 0040 } 0041 0042 function remove(){ 0043 kolabnowSettings.remove() 0044 } 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 id: nameField 0059 objectName: "nameTextField" 0060 focus: true 0061 Layout.fillWidth: true 0062 placeholderText: qsTr("Your name") 0063 text: kolabnowSettings.userName 0064 onTextChanged: { 0065 kolabnowSettings.userName = text 0066 } 0067 } 0068 0069 Kube.Label { 0070 text: qsTr("Email address") 0071 Layout.alignment: Qt.AlignRight 0072 } 0073 Kube.RequiredTextField { 0074 id: emailField 0075 objectName: "emailTextField" 0076 Layout.fillWidth: true 0077 0078 text: kolabnowSettings.emailAddress 0079 onTextChanged: { 0080 kolabnowSettings.emailAddress = text 0081 kolabnowSettings.accountName = text 0082 } 0083 placeholderText: qsTr("Your email address") 0084 } 0085 } 0086 }