FormComboBoxDelegate

Search for usage in LXR

FormComboBoxDelegate Class Reference
Inheritance diagram for FormComboBoxDelegate:

Public Types

enum class  DisplayMode { ComboBox , Dialog , Page }
 

Properties

Component comboBoxDelegate
 
alias count
 
alias currentIndex
 
alias currentText
 
alias currentValue
 
string description
 
var dialog
 
Component dialogDelegate
 
int displayMode
 
alias displayText
 
alias editable
 
alias editText
 
alias highlightedIndex
 
var model
 
Component page
 
var status
 
string statusMessage
 
alias textRole
 
alias valueRole
 

Signals

void accepted ()
 
void activated (int index)
 

Public Member Functions

void closeDialog ()
 
void indexOfValue (value)
 

Detailed Description

A Form delegate that corresponds to a combobox.

This component is used for individual settings that can have multiple possible values shown in a vertical list, typically defined in a model.

Many of its properties require familiarity with QtQuick.Controls.ComboBox.

Use the inherited QtQuick.Controls.AbstractButton.text property to define the main text of the combobox.

If you need a purely on/off toggle, use a FormSwitchDelegate instead.

If you need an on/off/tristate toggle, use a FormCheckDelegate instead.

If you need multiple toggles instead of multiple values for the same setting, consider using a FormRadioDelegate.

Since
KirigamiAddons 0.11.0
See also
QtQuick.Controls.AbstractButton
FormSwitchDelegate
FormCheckDelegate
FormRadioDelegate

Definition at line 37 of file FormComboBoxDelegate.qml.

Member Enumeration Documentation

◆ DisplayMode

The enum used to determine the displayMode.

Enumerator
ComboBox 

A standard combobox component containing a vertical list of values.

Dialog 

A button with similar appearance to a combobox that, when clicked, shows a Kirigami.OverlaySheet at the middle of the window containing a vertical list of values.

Page 

A button with similar appearance to a combobox that, when clicked, shows a Kirigami.ScrollablePage in a new window containing a vertical list of values.

Definition at line 139 of file FormComboBoxDelegate.qml.

Property Documentation

◆ comboBoxDelegate

Component FormComboBoxDelegate::comboBoxDelegate
read

The delegate component to use as entries in the combobox display mode.

Definition at line 170 of file FormComboBoxDelegate.qml.

◆ count

alias FormComboBoxDelegate::count
read

This property holds the count of the internal combobox.

See also
QtQuick.Controls.ComboBox.count
Since
Kirigami Addons 1.4.0

Definition at line 85 of file FormComboBoxDelegate.qml.

◆ currentIndex

alias FormComboBoxDelegate::currentIndex
read

This property holds the currentIndex of the internal combobox.

default: -1 when the model has no data, 0 otherwise

See also
QtQuick.Controls.ComboBox.currentIndex

Definition at line 105 of file FormComboBoxDelegate.qml.

◆ currentText

alias FormComboBoxDelegate::currentText
read

This property holds the text of the current item in the combobox.

See also
displayText

Definition at line 70 of file FormComboBoxDelegate.qml.

◆ currentValue

alias FormComboBoxDelegate::currentValue
read

This property holds the value of the current item in the combobox.

Definition at line 64 of file FormComboBoxDelegate.qml.

◆ description

string FormComboBoxDelegate::description
read

A label that contains secondary text that appears under the inherited text property.

This provides additional information shown in a faint gray color.

This is supposed to be a short text and the API user should avoid making it longer than two lines.

Definition at line 60 of file FormComboBoxDelegate.qml.

◆ dialog

var FormComboBoxDelegate::dialog
read

The dialog component used for the combobox.

This property allows to override the internal dialog with a custom component.

Definition at line 222 of file FormComboBoxDelegate.qml.

◆ dialogDelegate

Component FormComboBoxDelegate::dialogDelegate
read

The delegate component to use as entries for each value in the dialog and page display mode.

Definition at line 174 of file FormComboBoxDelegate.qml.

◆ displayMode

int FormComboBoxDelegate::displayMode
read

This property holds what display mode the delegate should show as.

Set this property to the desired DisplayMode.

default: FormComboBoxDelegate.ComboBox

See also
DisplayMode

Definition at line 166 of file FormComboBoxDelegate.qml.

◆ displayText

alias FormComboBoxDelegate::displayText
read

This property holds the displayText of the internal combobox.

This can be used to slightly modify the text to be displayed in the combobox, for instance, by adding a string with the currentText.

See also
QtQuick.Controls.ComboBox.displayText

Definition at line 119 of file FormComboBoxDelegate.qml.

◆ editable

alias FormComboBoxDelegate::editable
read

This property holds the editable property of the internal combobox.

This turns the combobox editable, allowing the user to specify existing values or add new ones.

Use this only when displayMode is set to FormComboBoxDelegate.ComboBox.

See also
QtQuick.Controls.ComboBox.editable

Definition at line 131 of file FormComboBoxDelegate.qml.

◆ editText

alias FormComboBoxDelegate::editText
read

This property holds the editText property of the internal combobox.

See also
QtQuick.Controls.ComboBox.editText

Definition at line 137 of file FormComboBoxDelegate.qml.

◆ highlightedIndex

alias FormComboBoxDelegate::highlightedIndex
read

This property holds the highlightedIndex of the internal combobox.

See also
QtQuick.Controls.ComboBox.highlightedIndex

Definition at line 111 of file FormComboBoxDelegate.qml.

◆ model

var FormComboBoxDelegate::model
read

This property holds the model providing data for the combobox.

See also
displayText
QtQuick.Controls.ComboBox.model
Models and Views in QtQuick

Definition at line 78 of file FormComboBoxDelegate.qml.

◆ page

Component FormComboBoxDelegate::page
read

The page component used for the combobox, if applicable.

This property allows to override the internal Kirigami.ScrollablePage with a custom component.

Definition at line 229 of file FormComboBoxDelegate.qml.

◆ status

var FormComboBoxDelegate::status
read

This property holds the current status message type of the text field.

This consists of an inline message with a colorful background and an appropriate icon.

The status property will affect the color of statusMessage used.

Accepted values:

  • Kirigami.MessageType.Information (blue color)
  • Kirigami.MessageType.Positive (green color)
  • Kirigami.MessageType.Warning (orange color)
  • Kirigami.MessageType.Error (red color)

default: Kirigami.MessageType.Information if statusMessage is set, nothing otherwise.

See also
Kirigami.MessageType
Since
1.5.0

Definition at line 196 of file FormComboBoxDelegate.qml.

◆ statusMessage

string FormComboBoxDelegate::statusMessage
read

This property holds the current status message of the text field.

If this property is not set, no status will be shown.

Since
1.5.0

Definition at line 205 of file FormComboBoxDelegate.qml.

◆ textRole

alias FormComboBoxDelegate::textRole
read

This property holds the textRole of the internal combobox.

See also
QtQuick.Controls.ComboBox.textRole

Definition at line 91 of file FormComboBoxDelegate.qml.

◆ valueRole

alias FormComboBoxDelegate::valueRole
read

This property holds the valueRole of the internal combobox.

See also
QtQuick.Controls.ComboBox.valueRole

Definition at line 97 of file FormComboBoxDelegate.qml.

Member Function Documentation

◆ accepted

void FormComboBoxDelegate::accepted ( )
signal

This signal is emitted when the Return or Enter key is pressed while an editable combo box is focused.

See also
editable

◆ activated

void FormComboBoxDelegate::activated ( int index)
signal

This signal is emitted when the item at index is activated by the user.

◆ closeDialog()

void FormComboBoxDelegate::closeDialog ( )

Closes the dialog or layer.

This function can be used when reimplementing the page or dialog.


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:33:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.