Avatar QML Type

An element that represents a user, either with initials, an icon, or a profile image. More...

Import Statement: import org.kde.kirigamiaddons.labs.components
Inherits:

Item

Properties

Detailed Description

Property Documentation

asynchronous : bool

Load the image asynchronously.

See also Image.asynchronous.


cache : bool

This property sets whether the provided image should be cached.

See also Image.cache.


clippedContent : Item [read-only]

This item holds the parent item on the clipped circle.

Implementations may add custom graphics which will be clipped along with the rest of the avatar content.


color : color

This property holds the color to use for this avatar.

If not explicitly set, this defaults to generating a color from the name.


defaultInitialsColor : color [read-only]

This property holds the default color of the avatar's initials.

It depends on the avatar's color.


iconSource : var

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 Kirigami.Icon.source.


imageMode : int

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:

ConstantDescription
Avatar.ImageMode.AlwaysShowImageAlways try to show the image even if it hasn't loaded yet or is undefined.
Avatar.ImageMode.AdaptiveImageOrInitalsShow the image if it is valid or initials if it is not.
Avatar.ImageMode.AlwaysShowInitialsAlways show initials.

See also imageMode.


initialsColor : color

This property holds the color of the avatar's initials.

If not explicitly set, this defaults to defaultInitialsColor.

See also defaultInitialsColor.


initialsMode : int

This property holds how the button should represent the user when no user-set image is available.

Possible values are:

ConstantDescription
Avatar.InitialsMode.UseInitialsShow the user's initials.
Avatar.InitialsMode.UseIconShow a generic icon.

See also initialsMode.


name : string

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.


source : url

This property holds the source of the user's profile picture; an image.

See also Image.source.


sourceSize : int

This property holds the source size of the user's profile picture.

See also Image.sourceSize.