org::kde::kirigami::Avatar

Public Types | |
enum | ImageMode { AlwaysShowImage, AdaptiveImageOrInitals, AlwaysShowInitials } |
enum | InitialsMode { UseInitials, UseIcon } |
Properties | |
KP | AvatarGroup |
TP | BorderPropertiesGroup |
alias | cache |
var | color |
alias | iconSource |
int | imageMode |
int | initialsMode |
string | name |
alias | smooth |
alias | source |
alias | sourceSize |
Public Member Functions | |
void | __triggerMainAction () |
Detailed Description
An element that represents a user, either with initials, an icon, or a profile image.
Definition at line 18 of file Avatar.qml.
Property Documentation
◆ AvatarGroup
|
read |
This property holds the main and secondary actions associated with this avatar.
Actions associated with this avatar.
- Note
- The secondary action should only be used for shortcuts of actions elsewhere in your application's UI, and cannot be accessed on mobile platforms.
Definition at line 119 of file Avatar.qml.
◆ BorderPropertiesGroup
|
read |
This property holds the border properties group.
Definition at line 129 of file Avatar.qml.
◆ cache
|
read |
This property sets whether the provided image should be cached.
- See also
- QtQuick.Image::cache
Definition at line 82 of file Avatar.qml.
◆ color
|
read |
This property holds the color to use for this avatar.
If not explicitly set, this defaults to generating a color from the name.
Definition at line 102 of file Avatar.qml.
◆ iconSource
|
read |
This property holds avatar's icon source.
This icon is displayed when using an icon with Avatar.InitialsMode.UseIcon
and Avatar.ImageNode.AlwaysShowInitials
enabled.
- See also
- org::kde::kirigami::Icon::source
Definition at line 52 of file Avatar.qml.
◆ imageMode
|
read |
This property holds how the avatar should be shown.
This property holds whether the button should always show the image; show the image if one is available and show initials when it is not; or always show initials.
Possible values are:
Avatar.ImageMode.AlwaysShowImage
: Always try to show the image; even if it hasn't loaded yet or is undefined.Avatar.ImageMode.AdaptiveImageOrInitals
: Show the image if it is valid; or show initials if it is notAvatar.ImageMode.AlwaysShowInitials
: Always show initials
- See also
- org::kde::kirigami::Avatar::ImageMode
Definition at line 76 of file Avatar.qml.
◆ initialsMode
|
read |
This property holds how the button should represent the user when no user-set image is available.
Possible values are:
Avatar.InitialsMode.UseInitials
: Show the user's initials.Avatar.InitialsMode.UseIcon
: Show a generic icon.
- See also
- org::kde::kirigami::Avatar::InitialsMode
Definition at line 62 of file Avatar.qml.
◆ name
|
read |
This property holds the given name of a user.
The user's name will be used for generating initials and to provide the accessible name for assistive technology.
Definition at line 36 of file Avatar.qml.
◆ smooth
|
read |
This property holds whether the provided image should be smoothed.
- See also
- QtQuick.Image::smooth
Definition at line 94 of file Avatar.qml.
◆ source
|
read |
This property holds the source of the user's profile picture; an image.
- See also
- QtQuick.Image::source
Definition at line 42 of file Avatar.qml.
◆ sourceSize
|
read |
This property holds the source size of the user's profile picture.
- See also
- QtQuick.Image::sourceSize
Definition at line 88 of file Avatar.qml.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 6 2023 04:13:18 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.