14using AccountsReminderInfo = DTK_ACCOUNTS_NAMESPACE::ReminderInfo;
15using AccountsPasswdExpirInfo = DTK_ACCOUNTS_NAMESPACE::PasswdExpirInfo;
16DACCOUNTS_BEGIN_NAMESPACE
20class DAccountsUserPrivate;
30 Q_PROPERTY(
bool automaticLogin READ automaticLogin WRITE setAutomaticLogin NOTIFY
31 automaticLoginChanged)
32 Q_PROPERTY(QString fullName READ fullName WRITE setFullName)
33 Q_PROPERTY(quint64 GID READ GID)
34 Q_PROPERTY(quint64 UID READ UID)
35 Q_PROPERTY(QStringList groups READ groups WRITE setGroups NOTIFY groupsChanged)
36 Q_PROPERTY(QList<QByteArray> layoutList READ layoutList WRITE setLayoutList NOTIFY
38 Q_PROPERTY(QString homeDir READ homeDir WRITE setHomeDir)
39 Q_PROPERTY(QList<QByteArray> iconFileList READ iconFileList NOTIFY iconFileListChanged)
40 Q_PROPERTY(QUrl iconFile READ iconFile WRITE setIconFile NOTIFY iconFileChanged)
41 Q_PROPERTY(QByteArray layout READ layout WRITE setLayout NOTIFY layoutChanged)
42 Q_PROPERTY(QByteArray locale READ locale WRITE setLocale NOTIFY localeChanged)
43 Q_PROPERTY(
bool locked READ locked WRITE setLocked NOTIFY lockedChanged)
44 Q_PROPERTY(qint32 maxPasswordAge READ maxPasswordAge WRITE setMaxPasswordAge NOTIFY
45 maxPasswordAgeChanged)
47 QString passwordHint READ passwordHint WRITE setPasswordHint NOTIFY passwordHintChanged)
48 Q_PROPERTY(QDateTime passwordLastChange READ passwordLastChange)
49 Q_PROPERTY(
PasswdStatus passwordStatus READ passwordStatus)
50 Q_PROPERTY(QString shell READ shell WRITE setShell)
51 Q_PROPERTY(QByteArray UUID READ UUID)
52 Q_PROPERTY(QByteArray userName READ userName)
53 Q_PROPERTY(
bool noPasswdLogin READ noPasswdLogin WRITE setNopasswdLogin NOTIFY
55 Q_PROPERTY(QDateTime loginTime READ loginTime)
56 Q_PROPERTY(QDateTime createdTime READ createdTime)
59 bool automaticLogin() const;
60 QString fullName() const;
63 QStringList groups() const;
64 QList<QByteArray> layoutList() const;
65 QString homeDir() const;
66 QList<QByteArray> iconFileList() const;
67 QByteArray iconFile() const;
68 QByteArray layout() const;
69 QByteArray locale() const;
71 qint32 maxPasswordAge() const;
72 QString passwordHint() const;
73 QDateTime passwordLastChange() const;
75 QString shell() const;
76 QByteArray UUID() const;
77 QByteArray userName() const;
78 bool noPasswdLogin() const;
79 QDateTime loginTime() const;
80 QDateTime createdTime() const;
84 DExpected<
void> setAutomaticLogin(const
bool enabled);
85 DExpected<
void> setFullName(const QString &newfullname);
86 DExpected<
void> setGroups(const QStringList &newgroups);
87 DExpected<
void> setLayoutList(const QList<QByteArray> &newlayouts);
88 DExpected<
void> setHomeDir(const QString &newhomedir);
89 DExpected<
void> setIconFile(const QUrl &newiconURL);
90 DExpected<
void> setLayout(const QByteArray &newlayout);
91 DExpected<
void> setLocale(const QByteArray &newlocale);
92 DExpected<
void> setLocked(const
bool locked);
93 DExpected<
void> setMaxPasswordAge(const
int newndays);
94 DExpected<
void> setPassword(const QByteArray &newpassword);
95 DExpected<
void> setPasswordHint(const QString &newpasswordhint);
96 DExpected<
void> setShell(const QString &newshellpath);
97 DExpected<
void> setNopasswdLogin(const
bool enabled);
99 DExpected<
void> addGroup(const QString &group);
100 DExpected<
void> deleteGroup(const QString &group);
101 DExpected<
void> deleteIconFile(const QUrl &iconURL);
102 DExpected<
bool> isPasswordExpired() const;
103 DExpected<AccountsReminderInfo> getReminderInfo() const;
104 DExpected<AccountsPasswdExpirInfo> passwordExpirationInfo(qint64 &dayLeft) const;
107 void automaticLoginChanged(const
bool enabled);
108 void groupsChanged(const QStringList &list);
109 void layoutListChanged(const QList<QByteArray> &list);
110 void iconFileListChanged(const QList<QByteArray> &list);
111 void iconFileChanged(const QUrl &url);
112 void layoutChanged(const QByteArray &layout);
113 void localeChanged(const QByteArray &locale);
114 void lockedChanged(const
bool locked);
115 void maxPasswordAgeChanged(const qint32 age);
116 void passwordHintChanged(const QString &hint);
117 void noPasswdLoginChanged(const
bool enabled);
118 void userDataChanged();
121 explicit
DAccountsUser(const quint64 uid, QObject *parent =
nullptr);
122 QScopedPointer<DAccountsUserPrivate> d_ptr;
128DACCOUNTS_END_NAMESPACE
管理用户账户信息
Definition daccountsmanager.h:28
用户属性相关信息的封装类
Definition daccountsuser.h:23
在daccountstypes.h中定义了一些dtkaccounts模块中所用到的自定义类型。
PasswdStatus
密码状态
Definition daccountstypes.h:17
AccountTypes
账户类型
Definition daccountstypes.h:15