org::kde::kirigami::templates::SwipeListItem

Search for usage in LXR

org::kde::kirigami::templates::SwipeListItem Class Reference
Inheritance diagram for org::kde::kirigami::templates::SwipeListItem:

Properties

alias _default
 
bool actionsVisible
 
color activeBackgroundColor
 
color activeTextColor
 
color alternateBackgroundColor
 
bool alternatingBackground
 
bool alwaysVisibleActions
 
color backgroundColor
 
alias containsMouse
 
alias overlayWidth
 
list QQC2
 
bool sectionDelegate
 
bool separatorVisible
 
alias supportsMouseEvents
 
color textColor
 

Detailed Description

An ItemDelegate intended to support extra actions.

Since
2.2

On mobile, these actions can be uncovered by dragging a handle, whereas with applications on tablet or desktop mode these actions are always present on the right side of the delegate.

Example usage:

ListView {
model: myModel
delegate: SwipeListItem {
QQC2.Label {
text: model.text
}
actions: [
icon.name: "document-decrypt"
onTriggered: print("Action 1 clicked")
},
icon.name: model.action2Icon
onTriggered: //do something
}
]
}
}

Definition at line 44 of file controls/templates/SwipeListItem.qml.

Property Documentation

◆ _default

alias org::kde::kirigami::templates::SwipeListItem::_default
read
Deprecated:
This property will be removed in KDE Framework 6.

Use contentItem instead.

Remarks
This is the default property

Definition at line 182 of file controls/templates/SwipeListItem.qml.

◆ actionsVisible

bool org::kde::kirigami::templates::SwipeListItem::actionsVisible
read

This property specifies whether actions are visible and interactive.

True if it's possible to see and interact with the item's actions.

Actions become hidden while editing of an item, for example.

Since
org.kde.kirigami 2.5
Remarks
This property is read-only

Definition at line 150 of file controls/templates/SwipeListItem.qml.

◆ activeBackgroundColor

color org::kde::kirigami::templates::SwipeListItem::activeBackgroundColor
read

This property holds the color of the background when the item is pressed or selected.

It is advised to use the default value. default: Kirigami.Theme.highlightColor

Definition at line 119 of file controls/templates/SwipeListItem.qml.

◆ activeTextColor

color org::kde::kirigami::templates::SwipeListItem::activeTextColor
read

This property holds the color of the text when the item is pressed or selected.

It is advised to use the default value. default: Kirigami.Theme.highlightedTextColor

If custom text elements are inserted in an AbstractListItem, their color property will have to be manually bound with this property

Definition at line 139 of file controls/templates/SwipeListItem.qml.

◆ alternateBackgroundColor

color org::kde::kirigami::templates::SwipeListItem::alternateBackgroundColor
read

This property holds the background color to be used when background alternating is enabled.

It is advised to use the default value. default: Kirigami.Theme.alternateBackgroundColor

Since
org.kde.kirigami 2.7

Definition at line 111 of file controls/templates/SwipeListItem.qml.

◆ alternatingBackground

bool org::kde::kirigami::templates::SwipeListItem::alternatingBackground
read

This property sets whether instances of this list item will alternate between two colors, helping readability.

It is suggested to use this only when implementing a view with multiple columns.

default: false

Since
org.kde.kirigami 2.7

Definition at line 76 of file controls/templates/SwipeListItem.qml.

◆ alwaysVisibleActions

bool org::kde::kirigami::templates::SwipeListItem::alwaysVisibleActions
read

This property sets whether actions behind this SwipeListItem will always be visible.

default: true in desktop and tablet mode, @c false in mobile mode

Since
org.kde.kirigami 2.15

Definition at line 158 of file controls/templates/SwipeListItem.qml.

◆ backgroundColor

color org::kde::kirigami::templates::SwipeListItem::backgroundColor
read

This property holds the background color of the list item.

It is advised to use the default value. default: Kirigami.Theme.backgroundColor

Definition at line 101 of file controls/templates/SwipeListItem.qml.

◆ containsMouse

bool SwipeListItem::containsMouse
read

This property specifies whether the cursor is currently hovering over the item.

On mobile touch devices, this will be true only when pressed.

See also
QtQuick.Templates.ItemDelegate.hovered
Deprecated:
This will be removed in KF6; use the hovered property instead.

Definition at line 65 of file controls/templates/SwipeListItem.qml.

◆ overlayWidth

real SwipeListItem::overlayWidth
read

This property holds the width of the overlay.

Remarks
This property is read-only

The value can represent the width of the handle component or the action layout.

Since
org.kde.kirigami 2.19

Definition at line 175 of file controls/templates/SwipeListItem.qml.

◆ QQC2

list org::kde::kirigami::templates::SwipeListItem::QQC2
read

This property holds actions of the list item.

At most 4 actions can be revealed when sliding away the list item; others will be shown in the overflow menu.

Definition at line 165 of file controls/templates/SwipeListItem.qml.

◆ sectionDelegate

bool org::kde::kirigami::templates::SwipeListItem::sectionDelegate
read

This property sets whether this Item is a section delegate.

Setting this to true will make the list item look like a "title" for items under it.

default: false

See also
kirigami::ListSectionHeader

Definition at line 86 of file controls/templates/SwipeListItem.qml.

◆ separatorVisible

bool org::kde::kirigami::templates::SwipeListItem::separatorVisible
read

This property sets whether the separator is visible.

The separator is a line between this and the Item under it.

default: false

Definition at line 94 of file controls/templates/SwipeListItem.qml.

◆ supportsMouseEvents

bool SwipeListItem::supportsMouseEvents
read

This property sets whether the item should emit signals related to mouse interaction.

default: true

Deprecated:
Use hoverEnabled instead.

Definition at line 55 of file controls/templates/SwipeListItem.qml.

◆ textColor

color org::kde::kirigami::templates::SwipeListItem::textColor
read

This property holds the color of the text in the item.

It is advised to use the default value. default: Kirigami.Theme.textColor

If custom text elements are inserted in an AbstractListItem, their color will have to be manually set with this property.

Definition at line 129 of file controls/templates/SwipeListItem.qml.


The documentation for this class was generated from the following file:
QAction * print(const QObject *recvr, const char *slot, QObject *parent)
list QQC2
This property holds actions of the list item.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Oct 3 2023 03:58:36 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.