From d8e13159711576394099f8954368aeb9da7fa87a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 10 Mar 2016 14:45:15 +0100 Subject: AccountsController --- components/package/contents/ui/Settings.qml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'components/package') diff --git a/components/package/contents/ui/Settings.qml b/components/package/contents/ui/Settings.qml index 692ddd0a..1f5fc972 100644 --- a/components/package/contents/ui/Settings.qml +++ b/components/package/contents/ui/Settings.qml @@ -57,15 +57,19 @@ Rectangle { id: contextSettings identifier: "applicationcontext" property string currentAccountId: "current" - property var availableAccountTypes: ["maildir"] - property var accounts: ["current"] } - Column { + KubeFramework.AccountsController { + id: accountsController + } + + ColumnLayout { spacing: 5 Repeater { - model: contextSettings.accounts - delegate: Rectangle { + model: accountsController.accounts + delegate: ColumnLayout { + height: 100 + width: 100 KubeFramework.AccountFactory { id: accountFactory accountId: modelData @@ -81,11 +85,19 @@ Rectangle { Label { text: accountFactory.name } - Loader { source: accountFactory.uiPath } + // Loader { source: accountFactory.uiPath } } } } + Button { + id: button + text: "Create New" + onClicked: { + accountsController.createAccount("maildir"); + } + } + //TODO: Add possibility to add more accounts } } -- cgit v1.2.3