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 item delegate intended to support extra actions obtainable by uncovering them by dragging away the item with the handle.

Since
2.2

This acts as a container for normal list items. Any subclass of AbstractListItem can be assigned as the contentItem property.

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 45 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 181 of file controls/templates/SwipeListItem.qml.

◆ actionsVisible

bool org::kde::kirigami::templates::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 151 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 120 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 140 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
2.7

Definition at line 112 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
2.7

Definition at line 77 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

Since
2.15

Definition at line 159 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 102 of file controls/templates/SwipeListItem.qml.

◆ containsMouse

bool SwipeListItem::containsMouse
read

This property tells 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 66 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
2.19

Definition at line 176 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 166 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
ListSectionHeader

Definition at line 87 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 95 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 56 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: 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 130 of file controls/templates/SwipeListItem.qml.


The documentation for this class was generated from the following file:
An item delegate Intended to support extra actions obtainable by uncovering them by dragging away the...
list QQC2
This property holds actions of the list item.
const QList< QKeySequence > & print()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 6 2023 04:13:18 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.