SearchPopupField

Search for usage in LXR

SearchPopupField Class Reference

Properties

alias autoAccept
 
alias delaySearch
 
alias fieldFocus
 
alias popup
 
alias popupContentItem
 
KirigamiSearchField searchField
 
bool spaceAvailableLeft
 
bool spaceAvailableRight
 
alias text
 

Signals

void accepted ()
 

Detailed Description

SearchField with a Popup to show autocompletion entries or search results.

Deprecated
Use Kirigami.SearchDialog instead.

Can be replaced by the following code:

Kirigami.SearchField {
TapHandler {
onTapped: {
searchDialog.open();
}
acceptedButtons: Qt.RightButton | Qt.LeftButton
}
Keys.onPressed: (event) => {
if (event.key !== Qt.Key_Tab || event.key !== Qt.Key_Backtab) {
searchDialog.open();
searchDialog.text = text;
}
}
Keys.priority: Keys.AfterItem
Kirigami.SearchDialog {
id: searchDialog
...
}
}
alias text
This property holds the text of the search field.
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
Since
KirigamiAddons.labs.components 1.0
See also
SearchDialog

Definition at line 45 of file SearchPopupField.qml.

Property Documentation

◆ autoAccept

alias SearchPopupField::autoAccept
read

This property sets whether the accepted signal is fired automatically when the text is changed.

Setting this to false will require that the user presses return or enter (the same way a QtQuick.Controls.TextInput works).

default: false

Since
KirigamiAddons.labs.components 1.0

Definition at line 107 of file SearchPopupField.qml.

◆ delaySearch

alias SearchPopupField::delaySearch
read

This property sets whether to delay automatic acceptance of the search input.

Set this to true if your search is expensive (such as for online operations or in exceptionally slow data sets) and want to delay it for 2.5 seconds.

Note
If you must have immediate feedback (filter-style), use the text property directly instead of accepted()

default: false

Since
KirigamiAddons.labs.components 1.0

Definition at line 95 of file SearchPopupField.qml.

◆ fieldFocus

alias SearchPopupField::fieldFocus
read

This hold the focus state of the internal SearchField.

Definition at line 129 of file SearchPopupField.qml.

◆ popup

alias SearchPopupField::popup
read

Definition at line 135 of file SearchPopupField.qml.

◆ popupContentItem

alias SearchPopupField::popupContentItem
read

This property holds the content item of the popup.

Overflow will be automatically be handled as popupContentItem is contained inside a ScrollView.

This is the default element of SearchPopupField.

ListView {
model: SearchModel {}
delegate: QQC2.ItemDelegate {}
Kirigami.PlaceholderMessage {
id: loadingPlaceholder
anchors.centerIn: parent
width: parent.width - Kirigami.Units.gridUnit * 4
// ...
}
}
}
SearchField with a Popup to show autocompletion entries or search results.
Since
KirigamiAddons.labs.components 1.0
Remarks
This is the default property

Definition at line 74 of file SearchPopupField.qml.

◆ searchField

KirigamiSearchField SearchPopupField::searchField
read

Definition at line 137 of file SearchPopupField.qml.

◆ spaceAvailableLeft

bool SearchPopupField::spaceAvailableLeft
read

This property holds whether there is space available on the left.

This is used by the left shadow.

Since
KirigamiAddons.labs.components 1.0
Deprecated
Was not really used by anything.

Definition at line 116 of file SearchPopupField.qml.

◆ spaceAvailableRight

bool SearchPopupField::spaceAvailableRight
read

This property holds whether there is space available on the left.

This is used by the right shadow.

Since
KirigamiAddons.labs.components 1.0
Deprecated
Was not really used by anything.

Definition at line 125 of file SearchPopupField.qml.

◆ text

alias SearchPopupField::text
read

This property holds the text of the search field.

Since
KirigamiAddons.labs.components 1.0

Definition at line 80 of file SearchPopupField.qml.

Member Function Documentation

◆ accepted

void SearchPopupField::accepted ( )
signal

This signal is triggered when the user trigger a search.


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 18 2024 12:12:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.