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
 
list Controls
 
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.

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

◆ actionsVisible

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

This property tells whether actions are accessible.

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

Actions should go completely out of the way for instance during the editing of an item.

Since
2.5
Remarks
This property is read-only

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

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

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

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

◆ alternateBackgroundColor

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

This property holds the alternate background color used for alternating list items when the alternatingBackground property is set to true.

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

Since
2.7

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

◆ alternatingBackground

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

This property sets whether items' backgrounds alternate between two colors, which helps with readability.

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

default: false

Since
2.7

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

◆ backgroundColor

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

This property holds the color for the background item.

default: Kirigami.Theme.backgroundColor

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

◆ containsMouse

bool SwipeListItem::containsMouse
read

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

Note
on mobile touch devices this will be true only when pressed is also true
Deprecated:
Use hovered instead.

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

If true, this item will look like a title for items under it.

default: false

Definition at line 80 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: true

Definition at line 88 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: false, true when cursor goes over the item.

@deprcated 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 for the text in the item.

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

default: Kirigami.Theme.textColor

Definition at line 127 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...
QAction * print(const QObject *recvr, const char *slot, QObject *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Aug 16 2022 03:57:02 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.