SystemUiInputField

Since: BlackBerry 10.0.0

#include <bb/system/SystemUiInputField>

To link against this class, add the following line to your .pro file: LIBS += -lbbsystem

An input field that can be used with dialog boxes.

The presentation of the input field is dependent on the class using it. For instance, some classes may choose not to show the label.


Overview

Public Functions Index

SystemUiInputField (QObject *parent=0)
SystemUiInputField (bb::system::SystemUiInputMode::Type type, QObject *parent=0)
virtual ~SystemUiInputField ()
QStringdefaultText () const
QStringemptyText () const
bb::system::SystemUiInputMode::TypeinputMode () const
intmaximumLength () const
Q_INVOKABLE voidresetDefaultText ()
Q_INVOKABLE voidresetEmptyText ()
Q_INVOKABLE voidresetInputMode ()
Q_INVOKABLE voidresetMaximumLength ()
voidsetDefaultText (const QString &text)
voidsetEmptyText (const QString &text)
voidsetInputMode (bb::system::SystemUiInputMode::Type type)
voidsetMaximumLength (int newMaximumLength)

Signals Index

voiddefaultTextChanged (const QString &value)
voidemptyTextChanged (const QString &value)
voidinputModeChanged (bb::system::SystemUiInputMode::Type value)
voidmaximumLengthChanged (int newMaximumLength)

Properties

QString defaultText

Represents the text to include in the input field when it is first displayed.

Since:

BlackBerry 10.0.0

QString emptyText

Represents the text to include in the input field when it is empty.

Since:

BlackBerry 10.0.0

bb::system::SystemUiInputMode::Type inputMode

Represents the input mode for entering text into the input field.

Since:

BlackBerry 10.0.0

int maximumLength

Represents the number of characters that the input field can contain.

0 is the default value and corresponds to no maximum length restrictions.

Note:

Setting a value less than 0 resets the property to the default value.

Since:

BlackBerry 10.0.0

Public Functions

SystemUiInputField (

Constructs an input field instance with a default keyboard layout bb::system::SystemUiInputMode::Default.

Parameters
parent

If not 0, the supplied parent will be responsible for deleting this instance.

Since:

BlackBerry 10.0.0

SystemUiInputField (

Constructs an input field instance.

Parameters
type

The content type of the text for the new instance. See bb::system::SystemUiInputMode for the list of content types.

parent

If not 0, the supplied parent will be responsible for deleting this instance.

Since:

BlackBerry 10.0.0

virtual~SystemUiInputField ()

Destructor.

Since:

BlackBerry 10.0.0

QString defaultText ()

Retrieves the default text that will be shown in the input field prior to user input.

Return:

Returns the default text of the input field.

Since:

BlackBerry 10.0.0

QString emptyText ()

Retrieves the text that will be shown in the input field when it is empty.

Return:

Returns the text to show when the input field is empty.

Since:

BlackBerry 10.0.0

bb::system::SystemUiInputMode::Type inputMode ()

Retrieves the content type of the text in the input field.

See also:

bb::system::SystemUiInputMode for a list of content types.

Return:

Returns the input field's content type.

Since:

BlackBerry 10.0.0

int maximumLength ()

Retrieves the number of characters allowed in the input field.

Return:

The input field's upper character limit.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetDefaultText ()

Resets the default text to QString::null.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetEmptyText ()

Resets the text that will be shown in the input field when it is empty to QString::null.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetInputMode ()

Resets the input mode to bb::system::SystemUiInputMode::Default.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetMaximumLength ()

Resets the maximum length to 0.

Since:

BlackBerry 10.0.0

void setDefaultText (

Sets the default text that will be shown in the input field prior to user input.

Parameters
text

The default text of the input field.

Since:

BlackBerry 10.0.0

void setEmptyText (

Sets the text that will be shown in the input field when it is empty.

Parameters
text

The text to show when the input field is empty.

Since:

BlackBerry 10.0.0

void setInputMode (

Sets the content type of the text for the input field.

See also:

bb::system::SystemUiInputMode for the list of content types.

Parameters
type

The input field's content type.

Since:

BlackBerry 10.0.0

void setMaximumLength (
  • intnewMaximumLength)

Sets the number of characters allowed in the input field.

Values less than 0 reset the property.
Parameters
newMaximumLength

The input field's upper character limit.

Since:

BlackBerry 10.0.0

Signals

void defaultTextChanged (

Emitted when the defaultText property is changed programmatically.

Parameters
value

The new value of the defaultText property.

Since:

BlackBerry 10.0.0

void emptyTextChanged (

Emitted when the emptyText property is changed programmatically.

Parameters
value

The new value of the emptyText property.

Since:

BlackBerry 10.0.0

void inputModeChanged (

Emitted when the inputMode property is changed programmatically.

See also:

bb::system::SystemUiInputMode for the list of content types.

Parameters
value

The new value of the inputMode property.

Since:

BlackBerry 10.0.0

void maximumLengthChanged (
  • intnewMaximumLength)

Emitted when the maximumLength property is changed programmatically.

Parameters
newMaximumLength

The new value of the maximumLength property.

Since:

BlackBerry 10.0.0

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus