SwipeListItem

Search for usage in LXR

SwipeListItem Class Reference

Inherits QtQuick.Templates.SwipeDelegate, and QtQuick::Controls::SwipeDelegate.

Properties

listTAction actions
 
bool actionsVisible
 
color activeBackgroundColor
 
color activeTextColor
 
color alternateBackgroundColor
 
bool alternatingBackground
 
bool alwaysVisibleActions
 
color backgroundColor
 
alias containsMouse
 
alias overlayWidth
 
bool sectionDelegate
 
bool separatorVisible
 
alias supportsMouseEvents
 
color textColor
 

Detailed Description

An item delegate intended to support extra actions obtainable by uncovering them by dragging away the item with the handle.

This acts as a container for normal list items.

Example usage:

ListView {
model: myModel
delegate: SwipeListItem {
QQC2.Label {
text: model.text
}
icon.name: "document-decrypt"
onTriggered: print("Action 1 clicked")
},
icon.name: model.action2Icon
onTriggered: //do something
}
]
}
}
An item delegate intended to support extra actions obtainable by uncovering them by dragging away the...
listTAction actions
This property holds actions of the list item.

Definition at line 42 of file SwipeListItem.qml.

Property Documentation

◆ actions

listTAction SwipeListItem::actions
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 164 of file SwipeListItem.qml.

◆ actionsVisible

bool SwipeListItem::actionsVisible
read

This property tells 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
2.5
Remarks
This property is read-only

Definition at line 149 of file SwipeListItem.qml.

◆ activeBackgroundColor

color 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 118 of file SwipeListItem.qml.

◆ activeTextColor

color 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 a SwipeListItem, their color property will have to be manually bound with this property

Definition at line 138 of file SwipeListItem.qml.

◆ alternateBackgroundColor

color 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
2.7

Definition at line 110 of file SwipeListItem.qml.

◆ alternatingBackground

bool 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
2.7

Definition at line 75 of file SwipeListItem.qml.

◆ alwaysVisibleActions

bool SwipeListItem::alwaysVisibleActions
read

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

default: true in desktop and tablet mode

Since
2.15

Definition at line 157 of file SwipeListItem.qml.

◆ backgroundColor

color 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 100 of file SwipeListItem.qml.

◆ containsMouse

bool SwipeListItem::containsMouse
read

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

Remarks
This property is read-only

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 64 of file 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
2.19

Definition at line 174 of file SwipeListItem.qml.

◆ sectionDelegate

bool 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
ListSectionHeader

Definition at line 85 of file SwipeListItem.qml.

◆ separatorVisible

bool 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 93 of file 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 53 of file SwipeListItem.qml.

◆ textColor

color SwipeListItem::textColor
read

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

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

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

Definition at line 128 of file SwipeListItem.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 Fri Jun 14 2024 11:53:34 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.