FormTextFieldDelegate

Search for usage in LXR

FormTextFieldDelegate Class Reference
Inheritance diagram for FormTextFieldDelegate:

Properties

alias acceptableInput
 
alias echoMode
 
alias fieldActiveFocus
 
alias inputMethodHints
 
string label
 
alias maximumLength
 
alias placeholderText
 
alias readOnly
 
var status
 
string statusMessage
 
alias validator
 

Signals

void accepted ()
 
void editingFinished ()
 
void textEdited ()
 

Public Member Functions

void clear ()
 
void insert (int position, string text)
 

Detailed Description

A Form delegate that corresponds to a text field.

FormCard.FormHeader {
title: "Information"
}
FormCard.FormCard {
FormCard.FormTextFieldDelegate {
label: "Account name"
}
FormCard.FormTextFieldDelegate {
label: "Password"
statusMessage: "Password incorrect"
status: Kirigami.MessageType.Error
echoMode: TextInput.Password
text: "666666666"
}
FormCard.FormTextFieldDelegate {
label: "Password"
statusMessage: "Password match"
text: "4242424242"
status: Kirigami.MessageType.Positive
echoMode: TextInput.Password
}
}
A single card that follows a form style.
Definition FormCard.qml:35
string statusMessage
This property holds the current status message of the text field.
string label
A label containing primary text that appears above and to the left the text field.
alias echoMode
This property holds the echoMode of the internal TextField.
var status
This property holds the current status message type of the text field.
Since
KirigamiAddons 0.11.0

Definition at line 45 of file FormTextFieldDelegate.qml.

Property Documentation

◆ acceptableInput

alias FormTextFieldDelegate::acceptableInput
read

This property holds the acceptableInput of the internal TextField.

Definition at line 99 of file FormTextFieldDelegate.qml.

◆ echoMode

alias FormTextFieldDelegate::echoMode
read

This property holds the echoMode of the internal TextField.

This consists of how the text inside the text field will be displayed to the user.

See also
TextInput.echoMode

Definition at line 72 of file FormTextFieldDelegate.qml.

◆ fieldActiveFocus

alias FormTextFieldDelegate::fieldActiveFocus
read

This hold the activeFocus state of the internal TextField.

Definition at line 59 of file FormTextFieldDelegate.qml.

◆ inputMethodHints

alias FormTextFieldDelegate::inputMethodHints
read

This property holds the inputMethodHints of the internal TextField.

This consists of hints on the expected content or behavior of the text field, be it sensitive data, in a date format, or whether the characters will be hidden, for example.

See also
TextInput.inputMethodHints

Definition at line 83 of file FormTextFieldDelegate.qml.

◆ label

string FormTextFieldDelegate::label
read

A label containing primary text that appears above and to the left the text field.

Definition at line 51 of file FormTextFieldDelegate.qml.

◆ maximumLength

alias FormTextFieldDelegate::maximumLength
read

set the maximum length of the text inside the TextField if maxLength > 0

Definition at line 55 of file FormTextFieldDelegate.qml.

◆ placeholderText

alias FormTextFieldDelegate::placeholderText
read

This property holds the placeholderText of the internal TextField.

This consists of secondary text shown by default on the text field if no text has been written in it.

Definition at line 91 of file FormTextFieldDelegate.qml.

◆ readOnly

alias FormTextFieldDelegate::readOnly
read

This hold the readOnly state of the internal TextField.

Definition at line 63 of file FormTextFieldDelegate.qml.

◆ status

var FormTextFieldDelegate::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

Definition at line 120 of file FormTextFieldDelegate.qml.

◆ statusMessage

string FormTextFieldDelegate::statusMessage
read

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

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

Definition at line 127 of file FormTextFieldDelegate.qml.

◆ validator

alias FormTextFieldDelegate::validator
read

This property holds the validator of the internal TextField.

Definition at line 95 of file FormTextFieldDelegate.qml.

Member Function Documentation

◆ accepted

void FormTextFieldDelegate::accepted ( )
signal

@This signal is emitted when the Return or Enter key is pressed.

Note that if there is a validator or inputMask set on the text input, the signal will only be emitted if the input is in an acceptable state.

◆ clear()

void FormTextFieldDelegate::clear ( )

Clears the contents of the text input and resets partial text input from an input method.

◆ editingFinished

void FormTextFieldDelegate::editingFinished ( )
signal

This signal is emitted when the Return or Enter key is pressed or the text input loses focus.

Note that if there is a validator or inputMask set on the text input and enter/return is pressed, this signal will only be emitted if the input follows the inputMask and the validator returns an acceptable state.

◆ insert()

void FormTextFieldDelegate::insert ( int position,
string text )

Inserts text into the TextInput at position.

◆ textEdited

void FormTextFieldDelegate::textEdited ( )
signal

This signal is emitted whenever the text is edited.

Unlike textChanged(), this signal is not emitted when the text is changed programmatically, for example, by changing the value of the text property or by calling clear().


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 Sat Apr 27 2024 22:09:57 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.