SearchDialog

Search for usage in LXR

SearchDialog Class Reference

Inherits QtQuick::Controls::Dialog.

Properties

alias count
 
alias currentItem
 
alias delegate
 
alias emptyIcon
 
alias emptyText
 
alias model
 
alias searchFieldLeftActions
 
alias searchFieldPlaceholderText
 
alias searchFieldRightActions
 
alias section
 
alias text
 

Detailed Description

A dialog to let's you do a global search accross your applications documents, chat rooms and more.

Example usage for a chat app where we want to quickly search for a room.

import QtQuick
import org.kde.kitemmodels as KItemModels
import org.kde.kirigami as Kirigami
Kirigami.SearchDialog {
id: root
onTextChanged: {
sortModel.filterText = text;
}
onAccepted: listView.currentItem.clicked()
emptyText: i18nc("Placeholder message", "No room found.")
id: sortModel
sourceModel: RoomModel { }
}
delegate: RoomDelegate {
onClicked: root.close()
}
Shortcut {
sequence: "Ctrl+K"
onActivated: root.open()
}
}
alias emptyText
This property holds an alias to the placeholder message text displayed when the internal list view is...
alias model
This property holds an alias to the model of the internal ListView.
alias delegate
This property holds an alias to the delegate component of the internal ListView.
QString i18nc(const char *context, const char *text, const TYPE &arg...)

{}

Note
This component is unsuitable on mobile. Instead on mobile prefer to use a seperate page for the search.
Since
Kirigami 6.3

Definition at line 53 of file SearchDialog.qml.

Property Documentation

◆ count

alias SearchDialog::count
read

This property holds the number of search results displayed in the internal ListView.

Definition at line 90 of file SearchDialog.qml.

◆ currentItem

alias SearchDialog::currentItem
read

This property holds an alias to the currentItem component of the internal ListView.

Definition at line 66 of file SearchDialog.qml.

◆ delegate

alias SearchDialog::delegate
read

This property holds an alias to the delegate component of the internal ListView.

Definition at line 62 of file SearchDialog.qml.

◆ emptyIcon

alias SearchDialog::emptyIcon
read

This property holds an alias to the placeholder message icon displayed when the internal list view is empty.

Definition at line 100 of file SearchDialog.qml.

◆ emptyText

alias SearchDialog::emptyText
read

This property holds an alias to the placeholder message text displayed when the internal list view is empty.

Definition at line 95 of file SearchDialog.qml.

◆ model

alias SearchDialog::model
read

This property holds an alias to the model of the internal ListView.

Definition at line 58 of file SearchDialog.qml.

◆ searchFieldLeftActions

alias SearchDialog::searchFieldLeftActions
read

This property holds an alias to the left actions of the seach field.

Definition at line 78 of file SearchDialog.qml.

◆ searchFieldPlaceholderText

alias SearchDialog::searchFieldPlaceholderText
read

The placeholder text shown in the (empty) search field.

Definition at line 86 of file SearchDialog.qml.

◆ searchFieldRightActions

alias SearchDialog::searchFieldRightActions
read

This property holds an alias to the right actions of the seach field.

Definition at line 82 of file SearchDialog.qml.

◆ section

alias SearchDialog::section
read

This property holds an alias to the section component of the internal ListView.

Definition at line 70 of file SearchDialog.qml.

◆ text

alias SearchDialog::text
read

This property holds an alias to the content of the search field.

Definition at line 74 of file SearchDialog.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 Jul 19 2024 11:52:23 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.