From fd31aa9b05ea215e8071cf76fe21ec746204f3a3 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 3 Mar 2016 22:30:07 +0100 Subject: Added a maildir configuration controller that can edit the config in sink. The property binding only works when using actual QObject::property'ies. It doesn't work at all with Q_PROPERTY, even with a NOTIFY signal. --- .../package/contents/ui/MaildirAccountSettings.qml | 40 ++++++++++++++-------- 1 file changed, 25 insertions(+), 15 deletions(-) (limited to 'accounts/maildir/package/contents/ui/MaildirAccountSettings.qml') diff --git a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml index 5ba9f0c1..77cf739f 100644 --- a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml +++ b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml @@ -20,12 +20,12 @@ import QtQuick.Controls 1.4 import QtQuick.Layouts 1.1 import org.kde.kube.settings 1.0 as KubeSettings -// import org.kde.kube.accounts.maildir 1.0 as MaildirAccount +import org.kde.kube.accounts.maildir 1.0 as MaildirAccount Rectangle { id: root property string accountId - property string accountName + property string accountName: "Maildir" color: colorPalette.background @@ -40,35 +40,45 @@ Rectangle { text: "Account: " + accountName } + Label { text: "Path" } + TextField { + id: path + placeholderText: "path" + Layout.fillWidth: true + } + + Text { + Layout.columnSpan: 2 + Layout.fillWidth: true + text: "Smtp:" + } + Label { text: "Username" } TextField { id: username - text: "username" + placeholderText: "username" Layout.fillWidth: true } Label { text: "Password" } TextField { id: password - text: "password" + placeholderText: "password" Layout.fillWidth: true } Label { text: "Server" } TextField { id: server - text: "server" + placeholderText: "server" Layout.fillWidth: true } - //If we had a settings controller - // MaildirAccount.SmtpSettings { - // id: smtpSettings - // identifier: accountId - // property alias username: username.text - // property alias password: password.text - // property alias server: server.text - // } + MaildirAccount.MaildirSettings { + id: maildirSettings + identifier: "org.kde.maildir.instance1" + property alias path: path.text + } KubeSettings.Settings { id: accountSettings @@ -92,8 +102,8 @@ Rectangle { id: button text: "Save" onClicked: { - smtpSettings.save(); - root.visible = false; + transportSettings.save(); + maildirSettings.save(); } } } -- cgit v1.2.3