Avatar

Search for usage in LXR

Avatar Class Reference
Inheritance diagram for Avatar:

Public Types

enum class  ImageMode { AlwaysShowImage , AdaptiveImageOrInitals , AlwaysShowInitials }
 
enum class  InitialsMode { UseInitials , UseIcon }
 

Properties

alias cache
 
alias clippedContent
 
color color
 
alias defaultInitialsColor
 
alias iconSource
 
int imageMode
 
color initialsColor
 
int initialsMode
 
string name
 
alias source
 
alias sourceSize
 

Additional Inherited Members

- Public Member Functions inherited from QtQuick.Item
 childAt (real x, real y)
 
bool contains (point point)
 
 dumpItemTree ()
 
 forceActiveFocus ()
 
 forceActiveFocus (Qt::FocusReason reason)
 
bool grabToImage (callback, targetSize)
 
point mapFromGlobal (real x, real y)
 
point mapFromItem (Item item, point p)
 
point mapFromItem (Item item, real x, real y)
 
rect mapFromItem (Item item, real x, real y, real width, real height)
 
rect mapFromItem (Item item, rect r)
 
point mapToGlobal (real x, real y)
 
point mapToItem (Item item, point p)
 
point mapToItem (Item item, real x, real y)
 
rect mapToItem (Item item, real x, real y, real width, real height)
 
rect mapToItem (Item item, rect r)
 
 nextItemInFocusChain (bool forward)
 

Detailed Description

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

Definition at line 15 of file Avatar.qml.

Member Enumeration Documentation

◆ ImageMode

enum class Avatar::ImageMode
strong

Definition at line 17 of file Avatar.qml.

◆ InitialsMode

enum class Avatar::InitialsMode
strong

Definition at line 22 of file Avatar.qml.

Property Documentation

◆ cache

alias Avatar::cache
read

This property sets whether the provided image should be cached.

See also
QtQuick.Image::cache

Definition at line 79 of file Avatar.qml.

◆ clippedContent

alias Avatar::clippedContent
read

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.

Remarks
This property is read-only

Definition at line 119 of file Avatar.qml.

◆ color

color Avatar::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 93 of file Avatar.qml.

◆ defaultInitialsColor

alias Avatar::defaultInitialsColor
read

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

Remarks
This property is read-only

It depends on the avatar's color.

Definition at line 111 of file Avatar.qml.

◆ iconSource

alias Avatar::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 49 of file Avatar.qml.

◆ imageMode

int Avatar::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 not
  • Avatar.ImageMode.AlwaysShowInitials: Always show initials
See also
org::kde::kirigamiaddons::components::Avatar::ImageMode

Definition at line 73 of file Avatar.qml.

◆ initialsColor

color Avatar::initialsColor
read

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

If not explicitly set, this defaults to defaultInitialsColor.

See also
defaultInitialsColor

Definition at line 102 of file Avatar.qml.

◆ initialsMode

int Avatar::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::kirigamiaddons::components::Avatar::InitialsMode

Definition at line 59 of file Avatar.qml.

◆ name

string Avatar::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 33 of file Avatar.qml.

◆ source

alias Avatar::source
read

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

See also
QtQuick.Image::source

Definition at line 39 of file Avatar.qml.

◆ sourceSize

alias Avatar::sourceSize
read

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

See also
QtQuick.Image::sourceSize

Definition at line 85 of file Avatar.qml.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:12:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.