org::kde::kirigami::BasicListItem

Search for usage in LXR

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

Properties

alias _basicDefault
 
bool bold
 
bool fadeContent
 
var icon
 
alias iconColor
 
alias iconSize
 
alias label
 
alias labelItem
 
Item leading
 
bool leadingFillVertically
 
real leadingPadding
 
alias reserveSpaceForIcon
 
alias reserveSpaceForLabel
 
bool reserveSpaceForSubtitle
 
alias subtitle
 
alias subtitleItem
 
alias textSpacing
 
Item trailing
 
bool trailingFillVertically
 
real trailingPadding
 
- Properties inherited from org::kde::kirigami::templates::AbstractListItem
alias _default
 
QQC2 Action
 
color activeBackgroundColor
 
color activeTextColor
 
color alternateBackgroundColor
 
bool alternatingBackground
 
color backgroundColor
 
alias containsMouse
 
bool sectionDelegate
 
bool separatorVisible
 
bool supportsMouseEvents
 
color textColor
 

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 227 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 107 of file BasicListItem.qml.

bool org::kde::kirigami::BasicListItem::fadeContent

Whether to make the icon and labels have a disabled look.

Defaults to false. Can be used to tweak whether the content elements are visually active while preserving an active appearance for any leading or trailing items.

Since
5.83
org.kde.kirigami 2.15

Definition at line 208 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 142 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 162 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 151 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.

QtQuick Controls Label org::kde::kirigami::BasicListItem::labelItem

The label item, for accessing the usual Text properties.

Since
5.84
org.kde.kirigami 2.16

Definition at line 216 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.

bool org::kde::kirigami::BasicListItem::leadingFillVertically

TODO KF6: remove this property and instead implement leading and trailing item positioning in such a way that they fill vertically, but a fixed height can be manually specified without needing to wrap it in an Item.

leadingFillVertically: bool Whether or not to stretch the leading item to fit all available vertical space. Defaults to true. If false, you will be responsible for setting a height for the item or ensuring that its default height works.

Since
5.83
org.kde.kirigami 2.15

Definition at line 66 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 171 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 181 of file BasicListItem.qml.

bool org::kde::kirigami::BasicListItem::reserveSpaceForSubtitle

reserveSpaceForSubtitle: bool

Whether or not the list item's height should account for the presence of a subtitle, even if one is not present.

Since
5.77
org.kde.kirigami 2.15

Definition at line 190 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.

QtQuick Controls Label org::kde::kirigami::BasicListItem::subtitleItem

The subtitle item, for accessing the usual Text properties.

Since
5.84
org.kde.kirigami 2.16

Definition at line 224 of file BasicListItem.qml.

alias org::kde::kirigami::BasicListItem::textSpacing

textSpacing: real

The spacing between the label row and subtitle row.

Since
5.83
org.kde.kirigami 2.15

Definition at line 199 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 75 of file BasicListItem.qml.

bool org::kde::kirigami::BasicListItem::trailingFillVertically

TODO KF6: remove this property and instead implement leading and trailing item positioning in such a way that they fill vertically, but a fixed height can be manually specified without needing to wrap it in an Item.

trailingFillVertically: bool Whether or not to stretch the trailing item to fit all available vertical space. Defaults to true. If false, you will be responsible for setting a height for the item or ensuring that its default height works.

Since
5.83
org.kde.kirigami 2.15

Definition at line 97 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 83 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 Fri Sep 24 2021 22:38:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.