Commit 30a4eb11 authored by Dan Leinir Turthra Jensen's avatar Dan Leinir Turthra Jensen 🌈
Browse files

More documentaiton for the services model

parent 6ef1eb53
......@@ -30,14 +30,42 @@
* You can create this manually, but usually you would get an instance of it from the
* AccountsModel::Roles::ServicesRole data role (model.services) of an AccountsModel
* instance.
*
* # Roles
*
* The following role names are available in this model:
*
* * name: The internal name for the service, as understood by the backend
* * description: A (usually single line) description of the service
* * displayName: A human-readable name for the service (use this in the UI instead of name)
* * serviceType: A machine-readable category for the service (e.g. microblogging, e-mail, IM...)
* * providerName: The machine-readable name of the provider which this service is related to
* * iconName: An XDG Icon specification icon name representing this service
* * tags: A list of strings representing tags set on this service
* * enabled: Whether or not the service is enabled for the given account
*/
class KACCOUNTS_EXPORT ServicesModel : public QAbstractListModel
{
Q_OBJECT
/**
* The Accounts::Account instance which this model should use for fetching the list of services
*/
Q_PROPERTY(QObject* account READ account WRITE setAccount NOTIFY accountChanged)
/**
* The internal ID for the account this model represents
*/
Q_PROPERTY(quint32 accountId READ accountId NOTIFY accountChanged)
/**
* The human-readable name of the account this model represents
*/
Q_PROPERTY(QString accountDisplayName READ accountDisplayName NOTIFY accountChanged)
/**
* The name of the provider this model's account is signed in through
*/
Q_PROPERTY(QString accountProviderName READ accountProviderName NOTIFY accountChanged)
/**
* The XDG Icon specification icon name for this model's account
*/
Q_PROPERTY(QString accountIconName READ accountIconName NOTIFY accountChanged)
public:
enum Roles {
......
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