FileListingDialog

Search for usage in LXR

FileListingDialog Class Reference

Properties

alias content
 
Component listDelegate
 
string message
 
var singleItem
 
alias template
 
var urls
 

Detailed Description

A dialog for listing file URLs and for suggesting to perform an action[s].

Since
org.mauikit.controls

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

See also
PopupPage

The listed files can also be removed from the dialog itself, and the urls property will be updated properly. The delegate used to display the files can be assigned to a custom element.

To add actions use the inherited property actions from the PopupPage control.

Listing a group of files and three actions
Maui.FileListingDialog
{
id: _dialog
title: "File Listing"
message: "This is a file listing dialog. Used to list files and suggest to perfom an action upon them."
urls: ["/home/camiloh/Downloads/premium_photo-1664203068007-52240d0ca48f.avif", "/home/camiloh/Downloads/ide_4x.webp", "/home/camiloh/Downloads/photo-app-fereshtehpb.webp", "/home/camiloh/Downloads/ide-reskin.webp", "/home/camiloh/Downloads/nx-software-center-latest-x86_64.AppImage", "/home/camiloh/Downloads/hand-drawn-flat-design-metaverse-background.zip"]
actions: [
{
text: "Action1"
},
{
text: "Action2"
},
{
text: "Action3"
}
]
}
var urls
The array of URLs to be listed.
string message
The body of the message.

Notes

The title will not be visible by default as the headBar is hidden. To force show it use the headBar.visible property.

You can find a more complete example at this link.

Definition at line 72 of file FileListingDialog.qml.

Property Documentation

◆ content

alias FileListingDialog::content
read

Any child item will be placed under the information section of this dialog.

Remarks
This is the default property

This is the default property and is handled by a ColumnLayout, so to place items use the Layout attached properties.

Definition at line 79 of file FileListingDialog.qml.

◆ listDelegate

Component FileListingDialog::listDelegate
read

The list delegate item to be used to display the file URLs.

This is set to a MauiKit ListItemTemplate element by default with a image or icon preview and the file name. This can be changed to any other element. The model is populated by the urls property, so to extract information for a custom element, use the modelData attribute to get the URL for each instance.

Definition at line 111 of file FileListingDialog.qml.

◆ message

string FileListingDialog::message
read

The body of the message.

This will go right under the title.

Definition at line 87 of file FileListingDialog.qml.

◆ singleItem

var FileListingDialog::singleItem
read

This is a information map of the first file in the urls list.

It is used to display a miniature image in the dialog information section.

Remarks
This property is read-only

Definition at line 92 of file FileListingDialog.qml.

◆ template

alias FileListingDialog::template
read

An alias for the template element handling the information section.

Remarks
This property is read-only

This is exposed to access it and fine tune details, or embed more element into it. This template is handled by a ListItemTemplate.

See also
ListItemTemplate

Definition at line 99 of file FileListingDialog.qml.

◆ urls

var FileListingDialog::urls
read

The array of URLs to be listed.

This will be used as the model for the file listing section.

Definition at line 83 of file FileListingDialog.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 Mon Nov 4 2024 16:32:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.