org::kde::kirigami::BasicListItem

org::kde::kirigami::BasicListItem Class Reference
Inheritance diagram for org::kde::kirigami::BasicListItem:

Properties

alias _basicDefault
 
bool bold
 
var icon
 
alias iconColor
 
alias iconSize
 
alias label
 
Item leading
 
real leadingPadding
 
alias reserveSpaceForIcon
 
alias reserveSpaceForLabel
 
alias subtitle
 
Item trailing
 
real trailingPadding
 

Detailed Description

A BasicListItem provides a simple list item design that can handle the most common list item usecases.

BasicListItemTypes.svg
The styles of the BasicListItem. From left to right top to bottom: light icon + title + subtitle, dark icon + title + subtitle, light icon + label, dark icon + label, light label, dark label.

Definition at line 17 of file BasicListItem.qml.

Property Documentation

alias org::kde::kirigami::BasicListItem::_basicDefault
Remarks
This is the default property

Definition at line 156 of file BasicListItem.qml.

bool org::kde::kirigami::BasicListItem::bold

bold: bool

Whether the list item's text (both label and subtitle, if provided) should render in bold.

Since
5.71
org.kde.kirigami 2.13

Definition at line 79 of file BasicListItem.qml.

var org::kde::kirigami::BasicListItem::icon

icon: var

ts
interface IconGroup {
name: string,
source: string,
width: int,
height: int,
color: color,
}
type Icon = string | IconGroup | URL

The icon that will render on this list item.

This can either be an icon name, a URL, or an object with the following properties:

  • name: string
  • source: string
  • width: int
  • height: int
  • color: color

If the type of the icon is a string containing an icon name, the icon will be looked up from the platform icon theme.

Using an icon object allows you to specify more granular attributes of the icon, such as its color and dimensions.

If the icon is a URL, the icon will be attempted to be loaded from the given URL.

Definition at line 114 of file BasicListItem.qml.

alias org::kde::kirigami::BasicListItem::iconColor

iconColor: color

The color of the icon.

If the icon's original colors should be left intact, set this to the default value, "transparent". Note that this colour will only be applied if the icon can be recoloured, (e.g. you can use Kirigami.Theme.foregroundColor to change the icon's colour.)

Since
2.7

Definition at line 134 of file BasicListItem.qml.

alias org::kde::kirigami::BasicListItem::iconSize

iconSize: int

The size at which the icon will render at. This will not affect icon lookup, unlike the icon group's width and height properties, which will.

Since
2.5

Definition at line 123 of file BasicListItem.qml.

alias org::kde::kirigami::BasicListItem::label

label: string

The label of this list item. If a subtitle is provided, the label will behave as a title and will have a bold font. Every list item should have a label.

Definition at line 26 of file BasicListItem.qml.

Item org::kde::kirigami::BasicListItem::leading

leading: Item

An item that will be displayed before the title and subtitle. Note that the leading item is allowed to expand infinitely horizontally, and should be bounded by the user.

Since
org.kde.kirigami 2.15

Definition at line 44 of file BasicListItem.qml.

real org::kde::kirigami::BasicListItem::leadingPadding

leadingPadding: real

Padding after the leading item.

Since
org.kde.kirigami 2.15

Definition at line 52 of file BasicListItem.qml.

alias org::kde::kirigami::BasicListItem::reserveSpaceForIcon

reserveSpaceForIcon: bool

Whether or not to reserve space for the icon, even if there is no icon.

BasicListItemReserve.svg
Left: reserveSpaceForIcon: false. Right: reserveSpaceForIcon: true

Definition at line 143 of file BasicListItem.qml.

alias org::kde::kirigami::BasicListItem::reserveSpaceForLabel

reserveSpaceForLabel: bool

Whether or not the label of the list item should fill width.

Setting this to false is useful if you have other items in the list item that should fill width instead of the label.

Definition at line 153 of file BasicListItem.qml.

alias org::kde::kirigami::BasicListItem::subtitle

subtitle: string

An optional subtitle that can appear under the label.

Since
5.70
org.kde.kirigami 2.12

Definition at line 35 of file BasicListItem.qml.

Item org::kde::kirigami::BasicListItem::trailing

trailing: Item

An item that will be displayed after the title and subtitle. Note that the trailing item is allowed to expand infinitely horizontally, and should be bounded by the user.

Since
org.kde.kirigami 2.15

Definition at line 61 of file BasicListItem.qml.

real org::kde::kirigami::BasicListItem::trailingPadding

trailingPadding: real

Padding before the trailing item.

Since
org.kde.kirigami 2.15

Definition at line 69 of file BasicListItem.qml.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Jan 21 2021 22:40:16 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.