DtkSystemSettings  1.0.3
dtk library for systemsettings.
Dtk::Accounts::DAccountsUser类 参考

用户属性相关信息的封装类 更多...

#include <daccountsuser.h>

类 Dtk::Accounts::DAccountsUser 继承关系图:
Dtk::Accounts::DAccountsUser 的协作图:

Public 槽

DExpected< void > setAutomaticLogin (const bool enabled)
 设置当前用户是否使用自动登录 更多...
 
DExpected< void > setFullName (const QString &newfullname)
 设置DAccountsUser指向的用户的全名 更多...
 
DExpected< void > setGroups (const QStringList &newgroups)
 设置DAccountsUser指向的用户所属的组 更多...
 
DExpected< void > setLayoutList (const QList< QByteArray > &newlayouts)
 设置DAccountsUser指向的用户的布局列表 更多...
 
DExpected< void > setHomeDir (const QString &newhomedir)
 设置DAccountsUser指向的用户的家目录 更多...
 
DExpected< void > setIconFile (const QUrl &newiconURL)
 设置DAccountsUser指向的用户的图标 更多...
 
DExpected< void > setLayout (const QByteArray &newlayout)
 设置DAccountsUser指向的用户的布局信息 更多...
 
DExpected< void > setLocale (const QByteArray &newlocale)
 设置DAccountsUser指向的用户的本地化信息 更多...
 
DExpected< void > setLocked (const bool locked)
 设置是否锁定当前用户 更多...
 
DExpected< void > setMaxPasswordAge (const int newndays)
 设置DAccountsUser指向的用户的最大密码过期时间 更多...
 
DExpected< void > setPassword (const QByteArray &newpassword)
 设置DAccountsUser指向的用户的密码 更多...
 
DExpected< void > setPasswordHint (const QString &newpasswordhint)
 设置DAccountsUser指向的用户的密码提示 更多...
 
DExpected< void > setShell (const QString &newshellpath)
 设置DAccountsUser指向的用户的shell 更多...
 
DExpected< void > setNopasswdLogin (const bool enabled)
 设置DAccountsUser指向的用户是否能无密码登录 更多...
 
DExpected< void > addGroup (const QString &group)
 把DAccountsUser指向的用户加入某个用户组 更多...
 
DExpected< void > deleteGroup (const QString &group)
 把DAccountsUser指向的用户从某个用户组中移除 更多...
 
DExpected< void > deleteIconFile (const QUrl &iconURL)
 将DAccountsUser指向的用户的某个图标删除 更多...
 
DExpected< bool > isPasswordExpired () const
 判断DAccountsUser指向的用户的密码是否过期 更多...
 
DExpected< AccountsReminderInfo > getReminderInfo () const
 获取DAccountsUser指向的用户的一些信息 更多...
 
DExpected< AccountsPasswdExpirInfo > passwordExpirationInfo (qint64 &dayLeft) const
 获取DAccountsUser指向的用户的密码过期信息 更多...
 

信号

void automaticLoginChanged (const bool enabled)
 属性automaticLogin发生变化时触发该信号 更多...
 
void groupsChanged (const QStringList &list)
 属性groups发生变化时触发该信号 更多...
 
void layoutListChanged (const QList< QByteArray > &list)
 属性layoutList发生变化时触发该信号 更多...
 
void iconFileListChanged (const QList< QByteArray > &list)
 属性iconFileList发生变化时触发该信号 更多...
 
void iconFileChanged (const QUrl &url)
 属性iconFile发生变化时触发该信号 更多...
 
void layoutChanged (const QByteArray &layout)
 属性layout发生变化时触发该信号 更多...
 
void localeChanged (const QByteArray &locale)
 属性locale发生变化时触发该信号 更多...
 
void lockedChanged (const bool locked)
 属性locked发生变化时触发该信号 更多...
 
void maxPasswordAgeChanged (const qint32 age)
 属性maxPasswordAge发生变化时触发该信号 更多...
 
void passwordHintChanged (const QString &hint)
 属性passwordHint发生变化时触发该信号 更多...
 
void noPasswdLoginChanged (const bool enabled)
 属性noPasswdLogin发生变化时触发该信号 更多...
 

Public 成员函数

AccountTypes accountType () const
 获取当前用户的用户类型 更多...
 
bool automaticLogin () const
 判断当前用户是否启用了自动登录 更多...
 
QString fullName () const
 获取当前用户的全名 更多...
 
quint64 GID () const
 获取DAccountsUser指向用户的组id 更多...
 
quint64 UID () const
 获取DAccountsUser指向用户的用户id 更多...
 
QStringList groups () const
 获取DAccountsUser指向用户所在的组 更多...
 
QList< QByteArray > layoutList () const
 获取DAccountsUser指向用户的用户布局信息 更多...
 
QString homeDir () const
 获取DAccountsUser指向用户的家目录 更多...
 
QList< QByteArray > iconFileList () const
 获取DAccountsUser指向用户的图标列表 更多...
 
QByteArray iconFile () const
 获取DAccountsUser指向用户的当前的图标 更多...
 
QByteArray layout () const
 获取DAccountsUser指向用户的当前布局 更多...
 
QByteArray locale () const
 获取DAccountsUser指向用户的本地化信息 更多...
 
bool locked () const
 判断当前用户账户是否锁定 更多...
 
qint32 maxPasswordAge () const
 获取DAccountsUser指向用户的最大密码过期时间 更多...
 
QString passwordHint () const
 获取DAccountsUser指向用户的密码提示 更多...
 
QDateTime passwordLastChange () const
 获取DAccountsUser指向用户的最后一次更改密码的时间 更多...
 
PasswdStatus passwordStatus () const
 获取DAccountsUser指向用户的密码状态 更多...
 
QString shell () const
 获取DAccountsUser指向用户的shell 更多...
 
QByteArray UUID () const
 获取DAccountsUser指向用户的UUID 更多...
 
QByteArray userName () const
 获取DAccountsUser指向用户的用户名 更多...
 
bool noPasswdLogin () const
 获取DAccountsUser指向用户是否设置了无密码登录 更多...
 
QDateTime loginTime () const
 最近一次的登录时间 更多...
 
QDateTime createdTime () const
 ~/.bash_logout或配置文件的ctime 更多...
 

属性

AccountTypes accountType
 用户类型
 
bool automaticLogin
 是否可以自动登录
 
QString fullName
 用户的全名
 
quint64 GID
 用户的组id
 
quint64 UID
 用户的用户id
 
QStringList groups
 用户所在的组
 
QList< QByteArray > layoutList
 用户的键盘布局列表
 
QString homeDir
 用户的家目录
 
QList< QByteArray > iconFileList
 用户的图标文件路径的列表
 
QUrl iconFile
 用户当前的图标的路径
 
QByteArray layout
 用户的当前的键盘布局
 
QByteArray locale
 用户当前的本地化选项
 
bool locked
 是否锁定用户
 
qint32 maxPasswordAge
 密码最大的过期时间时间
 
QString passwordHint
 密码提示
 
QDateTime passwordLastChange
 密码最后一次更改的时间
 
PasswdStatus passwordStatus
 密码的状态
 
QString shell
 用户的shell路径
 
QByteArray UUID
 用户唯一的UUID
 
QByteArray userName
 用户名
 
bool noPasswdLogin
 是否可以无密码登录
 
QDateTime loginTime
 用户的登录时间
 
QDateTime createdTime
 用户的~/.bash_logout或配置文件的ctime
 

友元

class DAccountsManager
 

详细描述

用户属性相关信息的封装类

成员函数说明

◆ accountType()

AccountType DAccountsUser::accountType ( ) const

获取当前用户的用户类型

返回
表示用户类型的枚举值

◆ addGroup

void DAccountsUser::addGroup ( const QString &  group)
slot

把DAccountsUser指向的用户加入某个用户组

参数
[in]group用户组的组名

◆ automaticLogin()

bool DAccountsUser::automaticLogin ( ) const

判断当前用户是否启用了自动登录

返回
自动登录是否激活
返回值
true已激活
false没有激活

◆ automaticLoginChanged

void DAccountsUser::automaticLoginChanged ( const bool  enabled)
signal

属性automaticLogin发生变化时触发该信号

参数
[in]enabled是否启用

◆ createdTime()

QDateTime DAccountsUser::createdTime ( ) const

~/.bash_logout或配置文件的ctime

返回
表示时间的QDateTime变量

◆ deleteGroup

void DAccountsUser::deleteGroup ( const QString &  group)
slot

把DAccountsUser指向的用户从某个用户组中移除

参数
[in]group用户组的组名

◆ deleteIconFile

void DAccountsUser::deleteIconFile ( const QUrl &  iconURL)
slot

将DAccountsUser指向的用户的某个图标删除

参数
[in]iconURL代表待删除图标路径的QUrl对象

◆ fullName()

QString DAccountsUser::fullName ( ) const

获取当前用户的全名

返回
表示用户全名的字符串

◆ getReminderInfo

ReminderInfo DAccountsUser::getReminderInfo ( ) const
slot

获取DAccountsUser指向的用户的一些信息

返回
由信息组成的结构体

◆ GID()

quint64 DAccountsUser::GID ( ) const

获取DAccountsUser指向用户的组id

返回
组id

◆ groups()

QStringList DAccountsUser::groups ( ) const

获取DAccountsUser指向用户所在的组

返回
由组名组成的列表

◆ groupsChanged

void DAccountsUser::groupsChanged ( const QStringList &  list)
signal

属性groups发生变化时触发该信号

参数
[in]list变更的列表

◆ homeDir()

QString DAccountsUser::homeDir ( ) const

获取DAccountsUser指向用户的家目录

返回
表示家目录路径的字符串

◆ iconFile()

QString DAccountsUser::iconFile ( ) const

获取DAccountsUser指向用户的当前的图标

返回
表示图标路径的字符串

◆ iconFileChanged

void DAccountsUser::iconFileChanged ( const QUrl &  url)
signal

属性iconFile发生变化时触发该信号

参数
[in]url变更的路径

◆ iconFileList()

QList< QByteArray > DAccountsUser::iconFileList ( ) const

获取DAccountsUser指向用户的图标列表

返回
由该用户所有的图标的路径组成的列表

◆ iconFileListChanged

void DAccountsUser::iconFileListChanged ( const QList< QByteArray > &  list)
signal

属性iconFileList发生变化时触发该信号

参数
[in]list变更的列表

◆ isPasswordExpired

bool DAccountsUser::isPasswordExpired ( ) const
slot

判断DAccountsUser指向的用户的密码是否过期

返回值
true密码已过期
false密码没有过期

◆ layout()

QByteArray DAccountsUser::layout ( ) const

获取DAccountsUser指向用户的当前布局

返回
表示布局的字符串

◆ layoutChanged

void DAccountsUser::layoutChanged ( const QByteArray &  layout)
signal

属性layout发生变化时触发该信号

参数
[in]layout变更的布局

◆ layoutList()

QList< QByteArray > DAccountsUser::layoutList ( ) const

获取DAccountsUser指向用户的用户布局信息

返回
由布局信息组成的列表

◆ layoutListChanged

void DAccountsUser::layoutListChanged ( const QList< QByteArray > &  list)
signal

属性layoutList发生变化时触发该信号

参数
[in]list变更的列表

◆ locale()

QByteArray DAccountsUser::locale ( ) const

获取DAccountsUser指向用户的本地化信息

返回
表示本地化信息的字符串

◆ localeChanged

void DAccountsUser::localeChanged ( const QByteArray &  locale)
signal

属性locale发生变化时触发该信号

参数
[in]locale变更的本地化

◆ locked()

bool DAccountsUser::locked ( ) const

判断当前用户账户是否锁定

返回
用户账户是否被锁定
返回值
true已被锁定
false没有被锁定

◆ lockedChanged

void DAccountsUser::lockedChanged ( const bool  locked)
signal

属性locked发生变化时触发该信号

参数
[in]locked是否锁定

◆ loginTime()

QDateTime DAccountsUser::loginTime ( ) const

最近一次的登录时间

返回
表示登录时间的QDateTime变量

◆ maxPasswordAge()

qint32 DAccountsUser::maxPasswordAge ( ) const

获取DAccountsUser指向用户的最大密码过期时间

返回
表示表示天数的32位整数

◆ maxPasswordAgeChanged

void DAccountsUser::maxPasswordAgeChanged ( const qint32  age)
signal

属性maxPasswordAge发生变化时触发该信号

参数
[in]age变更的密码最大过期时间

◆ noPasswdLogin()

bool DAccountsUser::noPasswdLogin ( ) const

获取DAccountsUser指向用户是否设置了无密码登录

返回
布尔值
返回值
true可以无密码登录
false不能无密码登录

◆ noPasswdLoginChanged

void DAccountsUser::noPasswdLoginChanged ( const bool  enabled)
signal

属性noPasswdLogin发生变化时触发该信号

参数
[in]enabled是否启用

◆ passwordExpirationInfo

PasswdExpirInfo DAccountsUser::passwordExpirationInfo ( qint64 &  dayLeft) const
slot

获取DAccountsUser指向的用户的密码过期信息

参数
[out]dayLeft还剩多少天密码过期
返回
一个代表密码过期信息的枚举值

◆ passwordHint()

QString DAccountsUser::passwordHint ( ) const

获取DAccountsUser指向用户的密码提示

返回
表示密码提示的字符串

◆ passwordHintChanged

void DAccountsUser::passwordHintChanged ( const QString &  hint)
signal

属性passwordHint发生变化时触发该信号

参数
[in]hint变更的密码提示

◆ passwordLastChange()

QDateTime DAccountsUser::passwordLastChange ( ) const

获取DAccountsUser指向用户的最后一次更改密码的时间

返回
表示日期的QDateTime变量

◆ passwordStatus()

PasswdStatus DAccountsUser::passwordStatus ( ) const

获取DAccountsUser指向用户的密码状态

返回
表示密码状态的枚举值

◆ setAutomaticLogin

void DAccountsUser::setAutomaticLogin ( const bool  enabled)
slot

设置当前用户是否使用自动登录

参数
[in]enabled代表是否开启自动登录的布尔值

◆ setFullName

void DAccountsUser::setFullName ( const QString &  newfullname)
slot

设置DAccountsUser指向的用户的全名

参数
[in]newfullname表示用户全名的字符串

◆ setGroups

void DAccountsUser::setGroups ( const QStringList &  newgroups)
slot

设置DAccountsUser指向的用户所属的组

注意
调用此方法会把之前的组全部清空
参数
[in]newgroups由用户组组名组成的列表

◆ setHomeDir

void DAccountsUser::setHomeDir ( const QString &  newhomedir)
slot

设置DAccountsUser指向的用户的家目录

参数
[in]newhomedir代表家目录路径的字符串

◆ setIconFile

void DAccountsUser::setIconFile ( const QUrl &  newiconURL)
slot

设置DAccountsUser指向的用户的图标

参数
[in]newiconURL代表用户想要当做图标的png文件的QUrl对象

◆ setLayout

void DAccountsUser::setLayout ( const QByteArray &  newlayout)
slot

设置DAccountsUser指向的用户的布局信息

参数
[in]newlayout代表新的布局信息的字符串

◆ setLayoutList

void DAccountsUser::setLayoutList ( const QList< QByteArray > &  newlayouts)
slot

设置DAccountsUser指向的用户的布局列表

注意
调用此方法会把之前的布局信息全部清空
参数
[in]newlayouts由布局信息组成的列表

◆ setLocale

void DAccountsUser::setLocale ( const QByteArray &  newlocale)
slot

设置DAccountsUser指向的用户的本地化信息

参数
[in]newlocale代表新的本地化信息的字符串

◆ setLocked

void DAccountsUser::setLocked ( const bool  locked)
slot

设置是否锁定当前用户

注解
锁定后可以阻止该用户登录
参数
[in]locked代表是否锁定用户的布尔值

◆ setMaxPasswordAge

void DAccountsUser::setMaxPasswordAge ( const int  newndays)
slot

设置DAccountsUser指向的用户的最大密码过期时间

参数
[in]newndays代表新的最大过期时间

◆ setNopasswdLogin

void DAccountsUser::setNopasswdLogin ( const bool  enabled)
slot

设置DAccountsUser指向的用户是否能无密码登录

参数
[in]enabled代表是否激活的布尔值

◆ setPassword

void DAccountsUser::setPassword ( const QByteArray &  newpassword)
slot

设置DAccountsUser指向的用户的密码

参数
[in]newpassword代表用户新密码的字符串

◆ setPasswordHint

void DAccountsUser::setPasswordHint ( const QString &  newpasswordhint)
slot

设置DAccountsUser指向的用户的密码提示

参数
[in]newpasswordhint代表密码提示的字符串

◆ setShell

void DAccountsUser::setShell ( const QString &  newshellpath)
slot

设置DAccountsUser指向的用户的shell

注解
设置shell为不允许的程序可能会阻止用户登录
参数
[in]newshellpath代表shell路径的字符串

◆ shell()

QString DAccountsUser::shell ( ) const

获取DAccountsUser指向用户的shell

返回
表示shell路径的字符串

◆ UID()

quint64 DAccountsUser::UID ( ) const

获取DAccountsUser指向用户的用户id

返回
用户id

◆ userName()

QByteArray DAccountsUser::userName ( ) const

获取DAccountsUser指向用户的用户名

返回
表示用户名的字符串

◆ UUID()

QByteArray DAccountsUser::UUID ( ) const

获取DAccountsUser指向用户的UUID

返回
表示UUID的字符串

该类的文档由以下文件生成: