Changeset View
Changeset View
Standalone View
Standalone View
src/kcm/package/contents/ui/AvailableAccounts.qml
Show All 15 Lines | |||||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.7 | 20 | import QtQuick 2.7 | ||
21 | import QtQuick.Layouts 1.11 | 21 | import QtQuick.Layouts 1.11 | ||
22 | import QtQuick.Controls 2.0 as Controls | 22 | import QtQuick.Controls 2.0 as Controls | ||
23 | import org.kde.kirigami 2.4 as Kirigami | 23 | import org.kde.kirigami 2.4 as Kirigami | ||
24 | import org.kde.kaccounts 1.0 | 24 | import org.kde.kaccounts 1.0 as KAccounts | ||
25 | import org.kde.kcm 1.2 | 25 | import org.kde.kcm 1.2 | ||
26 | import Ubuntu.OnlineAccounts 0.1 as OA | 26 | import Ubuntu.OnlineAccounts 0.1 as OA | ||
27 | 27 | | |||
28 | ScrollViewKCM { | 28 | ScrollViewKCM { | ||
29 | id: root | 29 | id: root | ||
30 | title: i18n("Add new Account") | 30 | title: i18n("Add new Account") | ||
31 | 31 | | |||
32 | view: ListView { | 32 | view: ListView { | ||
33 | model: OA.ProviderModel {} | 33 | model: OA.ProviderModel {} | ||
34 | 34 | | |||
35 | delegate: Kirigami.BasicListItem { | 35 | delegate: Kirigami.BasicListItem { | ||
36 | icon: model.iconName | 36 | icon: model.iconName | ||
37 | label: model.displayName | 37 | label: model.displayName | ||
38 | width: parent.width | 38 | width: parent.width | ||
39 | height: Kirigami.Units.iconSizes.large + Kirigami.Units.smallSpacing * 2 | ||||
39 | 40 | | |||
40 | onClicked: { | 41 | onClicked: { | ||
41 | var job = jobComponent.createObject(root, { "providerName": providerId }) | 42 | var job = jobComponent.createObject(root, { "providerName": providerId }) | ||
42 | job.start() | 43 | job.start() | ||
43 | } | 44 | } | ||
44 | } | 45 | } | ||
45 | } | 46 | } | ||
46 | 47 | | |||
47 | Component { | 48 | Component { | ||
48 | id: jobComponent | 49 | id: jobComponent | ||
49 | CreateAccount { | 50 | KAccounts.CreateAccount { | ||
50 | onFinished: kcm.pop() | 51 | onFinished: kcm.pop() | ||
51 | } | 52 | } | ||
52 | } | 53 | } | ||
53 | } | 54 | } |