ListBrowserDelegate

Search for usage in LXR

ListBrowserDelegate Class Reference

Properties

bool autoExclusive
 
bool checkable
 
bool checked
 
alias containsDrag
 
alias content
 
alias dropArea
 
alias iconItem
 
alias iconSizeHint
 
alias iconSource
 
alias iconVisible
 
alias imageSource
 
alias label1
 
alias label2
 
alias label3
 
alias label4
 
alias layout
 
alias leftLabels
 
alias maskRadius
 
alias rightLabels
 
alias showLabel
 
alias template
 

Signals

void contentDropped (var drop)
 
void contentEntered (var drag)
 
void toggled (bool state)
 

Detailed Description

A MauiKit ItemDelegate with an informational row layout.

This controls inherits from MauiKit ItemDelegate, to checkout its inherited properties refer to docs.

Note
An example of ListBrowserDelegate in the Index -f ile manager - application.

Structure

The ListBrowserDelegate layouts its information horizontally. It's composed of two main sections: the far left icon header, and the text labels at the right side - there are four [4] possible labels. Those sections are all handled by a MauiKit ListItemTemplate control, which is exposed by the alias property template.

See also
ListItemTemplate
template

The far left icon section is handled by default by a MauiKit IconItem, which can have an image or icon. Those can be set via the imageSource or the iconSource properties.

See also
IconItem

The said icon header can also be replaced by any other component using the template.iconComponent property.

Notes

This control can be checkable, and a CheckBox element will be placed on the left side. It also supports features from the Button type, such as the autoExclusive, checked properties and the press events.

By inheritance this component can be dragable.

Note
This control is usually used as the delegate component for the ListBrowser or QQC2 ListView.

Drag & Drop

To set up the drag and drop, use the Drag attached properties. The most relevant part for this control is to set the Drag.keys and Drag.mimeData

Drag.keys: ["text/uri-list"]
Drag.mimeData: Drag.active ?
{
"text/uri-list": "" //here a list of file separated by a comma.
} : {}
Maui.ListBrowserDelegate
{
width: ListView.view.width
label1.text: "An example delegate."
label2.text: "Using the MauiKit ListBrowser."
iconSource: "folder"
}

You can find a more complete example at this link.

Definition at line 74 of file ListBrowserDelegate.qml.

Property Documentation

◆ autoExclusive

bool ListBrowserDelegate::autoExclusive
read

Whether the control should be auto exclusive, this means that among other related elements - sharing the same parent - only one can be selected/checked at the time.

By default this is set to false.

Definition at line 146 of file ListBrowserDelegate.qml.

◆ checkable

bool ListBrowserDelegate::checkable
read

Whether the control should become checkable.

If it is checkable a CheckBox element will become visible to allow to toggle between the checked states. By default this is set to false.

Definition at line 141 of file ListBrowserDelegate.qml.

◆ checked

bool ListBrowserDelegate::checked
read

Whether the control is checked or not.

By default this is set to false.

Definition at line 136 of file ListBrowserDelegate.qml.

◆ containsDrag

alias ListBrowserDelegate::containsDrag
read

Whether this element currently contains any item being dragged on top of it.

Remarks
This property is read-only

Definition at line 173 of file ListBrowserDelegate.qml.

◆ content

alias ListBrowserDelegate::content
read
See also
ListItemTemplate::content
Remarks
This is the default property

Definition at line 87 of file ListBrowserDelegate.qml.

◆ dropArea

alias ListBrowserDelegate::dropArea
read

An alias to expose the DropArea component in charge of the drag&drop events.

See also
contentDropped
Remarks
This property is read-only

Definition at line 179 of file ListBrowserDelegate.qml.

◆ iconItem

alias ListBrowserDelegate::iconItem
read
See also
ListItemTemplate::iconItem

Definition at line 111 of file ListBrowserDelegate.qml.

◆ iconSizeHint

alias ListBrowserDelegate::iconSizeHint
read
See also
ListItemTemplate::iconSizeHint

Definition at line 119 of file ListBrowserDelegate.qml.

◆ iconSource

alias ListBrowserDelegate::iconSource
read
See also
ListItemTemplate::iconSource

Definition at line 127 of file ListBrowserDelegate.qml.

◆ iconVisible

alias ListBrowserDelegate::iconVisible
read
See also
ListItemTemplate::iconVisible

Definition at line 115 of file ListBrowserDelegate.qml.

◆ imageSource

alias ListBrowserDelegate::imageSource
read
See also
ListItemTemplate::imageSource

Definition at line 123 of file ListBrowserDelegate.qml.

◆ label1

alias ListBrowserDelegate::label1
read
See also
ListItemTemplate::label1
Remarks
This property is read-only

Definition at line 92 of file ListBrowserDelegate.qml.

◆ label2

alias ListBrowserDelegate::label2
read
See also
ListItemTemplate::label2
Remarks
This property is read-only

Definition at line 97 of file ListBrowserDelegate.qml.

◆ label3

alias ListBrowserDelegate::label3
read
See also
ListItemTemplate::label3
Remarks
This property is read-only

Definition at line 102 of file ListBrowserDelegate.qml.

◆ label4

alias ListBrowserDelegate::label4
read
See also
ListItemTemplate::label4
Remarks
This property is read-only

Definition at line 107 of file ListBrowserDelegate.qml.

◆ layout

alias ListBrowserDelegate::layout
read

An alias to access the layout fo this control handled by a RowLayout.

Remarks
This property is read-only

Definition at line 185 of file ListBrowserDelegate.qml.

◆ leftLabels

alias ListBrowserDelegate::leftLabels
read
See also
ListItemTemplate::leftLabels
Remarks
This property is read-only

Definition at line 151 of file ListBrowserDelegate.qml.

◆ maskRadius

alias ListBrowserDelegate::maskRadius
read
See also
ListItemTemplate::maskRadius

Definition at line 167 of file ListBrowserDelegate.qml.

◆ rightLabels

alias ListBrowserDelegate::rightLabels
read
See also
ListItemTemplate::rightLabels
Remarks
This property is read-only

Definition at line 156 of file ListBrowserDelegate.qml.

◆ showLabel

alias ListBrowserDelegate::showLabel
read
See also
ListItemTemplate::labelsVisible

Definition at line 131 of file ListBrowserDelegate.qml.

◆ template

alias ListBrowserDelegate::template
read

An alias to access the ListItemTemplate control properties.

Remarks
This property is read-only

This is the template element that layouts all the information: labels and icon/image.

See also
ListItemTemplate

Definition at line 163 of file ListBrowserDelegate.qml.

Member Function Documentation

◆ contentDropped

void ListBrowserDelegate::contentDropped ( var drop)
signal

Emitted when a drop event has been triggered on this control.

Parameters
dropThe object with information about the event.

◆ contentEntered

void ListBrowserDelegate::contentEntered ( var drag)
signal

Emitted when a drop event has entered the area of this control.

Parameters
dropThe object with information about the event.

◆ toggled

void ListBrowserDelegate::toggled ( bool state)
signal

Emitted when the control checked state has been changed.

Parameters
stateThe checked state value.

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 Nov 29 2024 11:46:39 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.