Verified Commit e2a842a0 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

[lookandfeel] Document types of a user list model

parent 79b5eb22
......@@ -33,6 +33,7 @@ struct SessionEntry {
class KDisplayManager;
// This model should be compatible with SDDM::SessionModel
class SessionsModel : public QAbstractListModel
{
Q_OBJECT
......
......@@ -30,16 +30,22 @@ FocusScope {
property alias actionItemsVisible: actionItemsLayout.visible
/*
* A model with a list of users to show in the view
* The following roles should exist:
* - name
* - iconSource
* A model with a list of users to show in the view.
* There are different implementations in sddm greeter (UserModel) and
* KScreenLocker (SessionsModel), so some roles will be missing.
*
* The following are also handled:
* - vtNumber
* - displayNumber
* - session
* - isTty
* type: {
* name: string,
* realName: string,
* homeDir: string,
* icon: string,
* iconName?: string,
* needsPassword?: bool,
* displayNumber?: string,
* vtNumber?: int,
* session?: string
* isTty?: bool,
* }
*/
property alias userListModel: userListView.model
......
......@@ -8,6 +8,24 @@ import QtQuick 2.15
import org.kde.plasma.core 2.0 as PlasmaCore
/*
* A model with a list of users to show in the view.
* There are different implementations in sddm greeter (UserModel) and
* KScreenLocker (SessionsModel), so some roles will be missing.
*
* type: {
* name: string,
* realName: string,
* homeDir: string,
* icon: string,
* iconName?: string,
* needsPassword?: bool,
* displayNumber?: string,
* vtNumber?: int,
* session?: string
* isTty?: bool,
* }
*/
ListView {
id: view
readonly property string selectedUser: currentItem ? currentItem.userName : ""
......
Supports Markdown
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