Commit 6611a0ef authored by Nicolas Fella's avatar Nicolas Fella Committed by Bhushan Shah

[accounts] Move available services into page

parent 47731f7b
Pipeline #7998 passed with stage
in 9 minutes
......@@ -62,10 +62,7 @@ ScrollViewKCM {
}
}
]
onClicked: {
availableServicesSheet.open()
servicesModel.accountId = model.accountId
}
onClicked: kcm.push("AvailableServices.qml", {accountId: model.accountId})
}
}
......@@ -111,37 +108,4 @@ ScrollViewKCM {
}
}
}
OA.AccountServiceModel {
id: servicesModel
}
Kirigami.OverlaySheet {
id: availableServicesSheet
parent: kaccountsRoot.parent
ColumnLayout {
Kirigami.Heading {
Layout.fillWidth: true
text: i18n("Available Services")
}
ColumnLayout {
Layout.fillHeight: true
Layout.fillWidth: true
spacing: Kirigami.Units.smallSpacing
Repeater {
Layout.fillWidth: true
model: servicesModel
Controls.CheckDelegate {
Layout.fillWidth: true
text: model.serviceName
checked: model.enabled
}
}
}
}
}
}
/*
* Copyright 2019 Nicolas Fella <nicolas.fella@gmx.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 2.7
import QtQuick.Layouts 1.11
import QtQuick.Controls 2.0 as Controls
import org.kde.kirigami 2.4 as Kirigami
import org.kde.kaccounts 1.0
import org.kde.kcm 1.2
import Ubuntu.OnlineAccounts 0.1 as OA
ScrollViewKCM {
title: i18n("Available Services")
property alias accountId: servicesModel.accountId
ListView {
anchors.fill: parent
model: OA.AccountServiceModel {
id: servicesModel
}
delegate: Kirigami.AbstractListItem {
width: parent.width
Controls.CheckBox {
text: model.serviceName
checked: model.enabled
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment