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 iconSelected
 
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.

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

◆ _basicDefault

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

Definition at line 220 of file BasicListItem.qml.

◆ bold

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

This property holds 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 97 of file BasicListItem.qml.

◆ fadeContent

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

This property holds 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 201 of file BasicListItem.qml.

◆ icon

var org::kde::kirigami::BasicListItem::icon
read
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 130 of file BasicListItem.qml.

◆ iconColor

color org::kde::kirigami::BasicListItem::iconColor
read

This property holds 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 148 of file BasicListItem.qml.

◆ iconSelected

bool org::kde::kirigami::BasicListItem::iconSelected
read

This property holds whether or not the icon has a "selected" appearance.

Can be used to override the icon coloration if the list item's background and text are also being overridden, to ensure that the icon never becomes invisible.

Since
5.91
org.kde.kirigami 2.19

Definition at line 159 of file BasicListItem.qml.

◆ iconSize

int org::kde::kirigami::BasicListItem::iconSize
read

This property holds the size at which the icon will render.

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

Since
2.5

Definition at line 138 of file BasicListItem.qml.

◆ label

string org::kde::kirigami::BasicListItem::label
read

This property holds label of this list item.

If a subtitle is provided, the label will behave as a title and will be styled accordingly. Every list item should have a label.

Definition at line 27 of file BasicListItem.qml.

◆ labelItem

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

This property holds the label item, for accessing the usual Text properties.

Since
5.84
org.kde.kirigami 2.16

Definition at line 209 of file BasicListItem.qml.

◆ leading

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

This property holds an item that will be displayed before the title and subtitle.

Note
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 42 of file BasicListItem.qml.

◆ leadingFillVertically

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

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

◆ leadingPadding

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

This property holds a the padding after the leading item.

Since
org.kde.kirigami 2.15

Definition at line 48 of file BasicListItem.qml.

◆ reserveSpaceForIcon

bool org::kde::kirigami::BasicListItem::reserveSpaceForIcon
read

This property holds whether or not to reserve space for the icon, even if there is no icon.

Left: reserveSpaceForIcon: false. Right: reserveSpaceForIcon: true

Definition at line 166 of file BasicListItem.qml.

◆ reserveSpaceForLabel

bool org::kde::kirigami::BasicListItem::reserveSpaceForLabel
read

This property holds 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 175 of file BasicListItem.qml.

◆ reserveSpaceForSubtitle

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

This property holds 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 183 of file BasicListItem.qml.

◆ subtitle

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

This property holds an optional subtitle that can appear under the label.

Since
5.70
org.kde.kirigami 2.12

Definition at line 34 of file BasicListItem.qml.

◆ subtitleItem

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

This property holds the subtitle item, for accessing the usual Text properties.

Since
5.84
org.kde.kirigami 2.16

Definition at line 217 of file BasicListItem.qml.

◆ textSpacing

real org::kde::kirigami::BasicListItem::textSpacing
read

This property holds the spacing between the label row and subtitle row.

Since
5.83
org.kde.kirigami 2.15

Definition at line 191 of file BasicListItem.qml.

◆ trailing

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

This property holds 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 69 of file BasicListItem.qml.

◆ trailingFillVertically

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

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

◆ trailingPadding

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

This property holds the padding before the trailing item.

Since
org.kde.kirigami 2.15

Definition at line 75 of file BasicListItem.qml.


The documentation for this class was generated from the following file:
Type type(const QSqlDatabase &db)
const char * name(StandardAction id)
Class for rendering an icon in UI.
Definition: icon.h:26
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Jul 1 2022 05:18:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.