SystemCredentialsPrompt

Since: BlackBerry 10.0.0

#include <bb/system/SystemCredentialsPrompt>

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

A dialog box that asks the user for login credentials.

A system credentials prompt

The displayed prompt is an application-modal window.

Presentation properties are marked as such, and affect future requests. Any pending requests use the values of the presentation properties at the time of the request.

When the prompt is displayed after a call to show() or exec(), there are two methods for updating the prompt after changing its presentation properties.

The default method is to update all the necessary presentation properties and call the update() method. This guarantees that all the presentation properties are updated at the same time.

The second method is to have the prompt update automatically after every presentation property change. To enable these automatic updates, the autoUpdateEnabled property must be set to true.

The second method does not guarantee automatic updates for all the presentation properties changes. This method can lead to noticeable delays between updates of individual properties. If more than one property needs to be updated, use the first method. If only one presentation property is being updated frequently (for example, the text on the prompt body must be updated to notify the user of the application's current status), the second approach can be used.


Overview

Public Functions Index

SystemCredentialsPrompt (QObject *parent=0)
virtual ~SystemCredentialsPrompt ()
boolactivityIndicatorVisible () const
QStringbody () const
intbuttonAreaLimit () const
Q_INVOKABLE bb::system::SystemUiButton *buttonSelection () const
bb::system::SystemUiButton *cancelButton ()
bb::system::SystemUiButton *confirmButton ()
bb::system::SystemUiButton *customButton ()
bb::system::SystemUiButton *defaultButton ()
booldismissAutomatically () const
boolemoticonsEnabled () const
bb::system::SystemUiError::Typeerror () const
boolincludeRememberMe () const
boolincludeShowPassword () const
boolisAutoUpdateEnabled () const
bb::system::SystemUiModality::Typemodality () const
Q_INVOKABLE QStringpasswordEntry () const
bb::system::SystemUiInputField *passwordField ()
boolrememberMeChecked () const
Q_INVOKABLE boolrememberMeSelection () const
QStringrememberMeText () const
Q_INVOKABLE voidresetActivityIndicatorVisible ()
Q_INVOKABLE voidresetAutoUpdateEnabled ()
Q_INVOKABLE voidresetBody ()
Q_INVOKABLE voidresetButtonAreaLimit ()
Q_INVOKABLE voidresetCancelButton ()
Q_INVOKABLE voidresetConfirmButton ()
Q_INVOKABLE voidresetCustomButton ()
Q_INVOKABLE voidresetDefaultButton ()
Q_INVOKABLE voidresetDismissAutomatically ()
Q_INVOKABLE voidresetEmoticonsEnabled ()
Q_INVOKABLE voidresetIncludeRememberMe ()
Q_INVOKABLE voidresetIncludeShowPassword ()
Q_INVOKABLE voidresetModality ()
Q_INVOKABLE voidresetPasswordField ()
Q_INVOKABLE voidresetRememberMeChecked ()
Q_INVOKABLE voidresetRememberMeText ()
Q_INVOKABLE voidresetReturnKeyAction ()
Q_INVOKABLE voidresetTitle ()
Q_INVOKABLE voidresetUsernameField ()
Q_INVOKABLE voidresetValidationMessage ()
bb::system::SystemUiResult::Typeresult () const
bb::system::SystemUiReturnKeyAction::TypereturnKeyAction () const
voidsetActivityIndicatorVisible (bool visible)
voidsetAutoUpdateEnabled (bool update)
voidsetBody (const QString &body)
voidsetButtonAreaLimit (int newButtonAreaLimit)
voidsetDefaultButton (bb::system::SystemUiButton *newDefaultButton)
voidsetDismissAutomatically (bool automaticDismissal)
voidsetEmoticonsEnabled (bool newEmoticonsEnabled)
voidsetIncludeRememberMe (bool value)
voidsetIncludeShowPassword (bool value)
voidsetModality (bb::system::SystemUiModality::Type newModality)
voidsetRememberMeChecked (bool newRememberMeSelected)
voidsetRememberMeText (const QString &newRememberMeText)
voidsetReturnKeyAction (bb::system::SystemUiReturnKeyAction::Type newReturnKeyAction)
voidsetTitle (const QString &title)
voidsetValidationMessage (const QString &newValidationMessage)
QStringtitle () const
Q_INVOKABLE QStringusernameEntry () const
bb::system::SystemUiInputField *usernameField ()
QStringvalidationMessage () const

Public Slots Index

Signals Index

voidactivityIndicatorVisibleChanged (bool value)
voidautoUpdateEnabledChanged (bool value)
voidbodyChanged (const QString &value)
voidbuttonAreaLimitChanged (int newButtonAreaLimit)
voiddefaultButtonChanged (bb::system::SystemUiButton *newDefaultButton)
voiddismissAutomaticallyChanged (bool automaticDismissal)
voidemoticonsEnabledChanged (bool newEmoticonsEnabled)
voidfinished (bb::system::SystemUiResult::Type value)
voidincludeRememberMeChanged (bool value)
voidincludeShowPasswordChanged (bool value)
voidmodalityChanged (bb::system::SystemUiModality::Type newModality)
voidrememberMeCheckedChanged (bool newRememberMeSelected)
voidrememberMeTextChanged (const QString &newRememberMeText)
voidreturnKeyActionChanged (bb::system::SystemUiReturnKeyAction::Type newReturnKeyAction)
voidtitleChanged (const QString &value)
voidvalidationMessageChanged (const QString &newValidationMessage)

Properties

bool activityIndicatorVisible

Indicates whether to display an activity indicator in the title bar of the prompt.

Since:

BlackBerry 10.2.0

bool autoUpdateEnabled

Indicates whether the prompt is updated every time a presentation property is changed.

If autoUpdateEnabled is true, every time any of the presentation properties on the prompt are changed, the prompt is also updated immediately to reflect the changes on the UI. If autoUpdateEnabled is false, the prompt is not updated automatically, instead the show() method must be called. This is the default behavior.

Note:

The behavior of the autoUpdateEnabled flag is apparent when multiple presentation properties are changed. When autoUpdateEnabled is set to true, the on-screen prompt may be updated after each individual presentation property is changed. This may not be an ideal user experience, particularly as the number of changed presentation properties increases. When autoUpdateEnabled is set to false, it is possible to combine multiple presentation property updates and apply them to the on-screen prompt as one request by calling show().

Since:

BlackBerry 10.2.0

QString body

Represents the main text of the window.

This is a presentation property whose default value is a default-constructed QString.

Since:

BlackBerry 10.0.0

int buttonAreaLimit

The maximum number of buttons that can be shown without causing an overflow.

When overflow occurs, all buttons are stacked vertically.

This is a presentation property whose default value is -1.
Note:

-1 implies that the default system behavior will be applied. The supported range is 1-3. Any values outside the range reset the property to its default value.

Since:

BlackBerry 10.0.0

bb::system::SystemUiButton cancelButton[read-only]

Represents the button associated with the default cancellation action of the window.

This is a presentation property whose default bb::system::SystemUiButton::label property is "Cancel".

Since:

BlackBerry 10.0.0

bb::system::SystemUiButton confirmButton[read-only]

Represents the button associated with the default confirmation action of the window.

This is a presentation property whose default bb::system::SystemUiButton::label property is "Login".

Since:

BlackBerry 10.0.0

bb::system::SystemUiButton customButton[read-only]

Represents the button associated with the tertiary action of the window.

This is a presentation property whose default bb::system::SystemUiButton::label property is a default-constructed QString.

Note:

This button is omitted if its bb::system::SystemUiButton::label property is a default-constructed QString.

Since:

BlackBerry 10.0.0

bb::system::SystemUiButton defaultButton

Represents the button associated with the return key action of the window.

When the user triggers the return key action, this button is automatically selected. If the defaultButton is NULL, then triggering the return key action does not select a button.

If defaultButton is set to a button that this instance does not manage, then this property is undefined.

This is a presentation property whose default value is confirmButton.

Since:

BlackBerry 10.0.0

bool dismissAutomatically

Indicates whether to dismiss the prompt when a button is selected.

If false, the prompt must be dismissed using cancel(). Otherwise, the prompt is dismissed when a button is selected.

This is a presentation property whose default value is true.

Since:

BlackBerry 10.0.0

bool emoticonsEnabled

Controls whether or not the text should be displayed with emoticons.

This is a presentation property whose default value is false.

Since:

BlackBerry 10.0.0

bb::system::SystemUiError::Type error[read-only]

Represents the last error encountered.

This property is only valid when the SystemCredentialsPrompt::result property is bb::system::SystemUiResult::Error.
See also:

bb::system::SystemUiError for the list of possible errors.

Since:

BlackBerry 10.0.0

bool includeRememberMe

Indicates whether a check box for remembering password credentials should be included.

If a check box is requested, then the user will have the ability to enable and disable it. The user selection is available using rememberMeSelection() when the request is finished. To customize how the check box is presented, use rememberMeChecked and rememberMeText.

This is a presentation property whose default value is true.

Since:

BlackBerry 10.0.0

bool includeShowPassword

Indicates whether a check box for displaying the password in cleartext should be included.

This is a presentation property whose default value is true.

Since:

BlackBerry 10.0.0

bb::system::SystemUiModality::Type modality

Represents the modality of the prompt.

This is a presentation property whose value is bb::system::SystemUiModality::Application.
See also:

bb::system::SystemUiModality for the list of valid values.

Since:

BlackBerry 10.0.0

bb::system::SystemUiInputField passwordField[read-only]

Represents the password field that is included in the window.

This is a presentation property whose default bb::system::SystemUiInputField::emptyText property is "Password".

Since:

BlackBerry 10.0.0

bool rememberMeChecked

Represents the selection state of the check box for remembering password credentials.

The state is only applied if includeRememberMe is true.

The user selection is available using rememberMeSelection() when the request is finished.

This is a presentation property whose default value is true.

Since:

BlackBerry 10.0.0

QString rememberMeText

Represents the text associated with the check box associated with rememberMeChecked.

This property is only applied if includeRememberMe is true.

This is a presentation property whose default value is "Remember Me".

Since:

BlackBerry 10.0.0

bb::system::SystemUiResult::Type result[read-only]

Represents the result of the last completed request.

To obtain result values when the request is finished, use the following functions:
See also:

bb::system::SystemUiResult for the list of possible results.

Since:

BlackBerry 10.0.0

bb::system::SystemUiReturnKeyAction::Type returnKeyAction

Represents the action associated with the return key for this prompt.

This is a presentation property whose default value is bb::system::SystemUiReturnKeyAction::Default.
See also:

bb::system::SystemUiReturnKeyAction for the list of possible values.

Since:

BlackBerry 10.0.0

QString title

Represents the title of the window.

This is a presentation property whose default value is a default-constructed QString.

Since:

BlackBerry 10.0.0

bb::system::SystemUiInputField usernameField[read-only]

Represents the username field that is included in the window.

This is a presentation property whose default bb::system::SystemUiInputField::emptyText property is "Username".

Since:

BlackBerry 10.0.0

QString validationMessage

Represents a message to be shown to the user when invalid credentials are entered.

This property should be combined with setting dismissAutomatically to false so that the prompt is updated while being displayed to the user.

This is a presentation property whose default value is a default-constructed QString.

Since:

BlackBerry 10.0.0

Public Functions

SystemCredentialsPrompt (

Constructs a new instance of a credentials prompt.

Parameters
parent

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

Since:

BlackBerry 10.0.0

virtual~SystemCredentialsPrompt ()

Destructor.

Since:

BlackBerry 10.0.0

bool activityIndicatorVisible ()

Indicates if an activity indicator is displayed on the title bar of the prompt.

Return:

true if the activity indicator is displayed, false otherwise.

Since:

BlackBerry 10.2.0

QString body ()

Retrieves the main text of the prompt.

Return:

The text of the prompt.

Since:

BlackBerry 10.0.0

int buttonAreaLimit ()

Retrieves the maximum number of buttons to accommodate in the prompt button area without causing overflow.

If buttonAreaLimit is larger than the number of buttons that will be displayed, all buttons are stacked vertically.
Return:

The limit for the number of buttons that can be accommodated in the button area, or -1 if system defaults should be used.

Since:

BlackBerry 10.0.0

Q_INVOKABLE bb::system::SystemUiButton * buttonSelection ()

Returns the button selected when a button selection is made.

If no button was selected, 0 is returned.

This function returns the result of the button selection of show() and exec().

The return value is reset when a new request is made.

This instance retains ownership of the returned value.
Return:

The button selected by the user.

Since:

BlackBerry 10.0.0

bb::system::SystemUiButton * cancelButton ()

Retrieves the prompt's cancellation button.

This instance retains ownership of the returned value.
Return:

The prompt's cancellation button.

Since:

BlackBerry 10.0.0

bb::system::SystemUiButton * confirmButton ()

Retrieves the prompt's confirmation button.

This instance retains ownership of the returned value.
Return:

The prompt's confirmation button.

Since:

BlackBerry 10.0.0

bb::system::SystemUiButton * customButton ()

Retrieves the button attached to the prompt's custom action button.

This instance retains ownership of the returned value.
Return:

The prompt's custom action button.

Since:

BlackBerry 10.0.0

bb::system::SystemUiButton * defaultButton ()

Retrieves the prompt's default button.

This instance retains ownership of the returned value.

The default button is automatically selected when the user triggers the return key action. If the default button is NULL, no button is automatically selected.

The returned value is one of the buttons managed by this instance, or NULL.
Return:

The prompt's default button.

Since:

BlackBerry 10.0.0

bool dismissAutomatically ()

Indicates if the prompt is dismissed when a button is selected.

Return:

true if selecting a button dismisses the prompt, false otherwise.

Since:

BlackBerry 10.0.0

bool emoticonsEnabled ()

Retrieves whether the text can be displayed as emoticons.

Return:

Whether the prompt supports emoticons.

Since:

BlackBerry 10.0.0

bb::system::SystemUiError::Type error ()

Retrieves the error that occurred during the request.

The return value is reset when a new request is made.
Return:

The error that occurred. See bb::system::SystemUiError for the list of possible errors.

Since:

BlackBerry 10.0.0

bool includeRememberMe ()

Retrieves the flag indicating if a check box to remember the credentials should be included in the prompt.

Return:

true if a toggle for remembering the entered credentials should be included in the prompt, false otherwise.

Since:

BlackBerry 10.0.0

bool includeShowPassword ()

Retrieves the flag indicating if a check box that can reveal the password field should be included in the prompt.

Return:

true if a toggle for revealing the password should be included in the prompt, false otherwise.

Since:

BlackBerry 10.0.0

bool isAutoUpdateEnabled ()

Retrieves the flag indicating if the prompt is updated every time the value of a presentation property is changed.

Return:

true if the prompt automatically updates, false if the prompt doesn't update (in which case the show() method must be called after updating the prompt presentation properties).

Since:

BlackBerry 10.2.0

bb::system::SystemUiModality::Type modality ()

Retrieves the prompt's modality.

Return:

The prompt's modality. See bb::system::SystemUiModality for the list of possible values.

Since:

BlackBerry 10.0.0

Q_INVOKABLE QString passwordEntry ()

Returns the value in the password input field if the confirmation button was selected.

The return value is reset when a new request is made.

Return:

The value in the password input field entered by the user.

Since:

BlackBerry 10.0.0

bb::system::SystemUiInputField * passwordField ()

Retrieves the password input field for the prompt.

This instance retains ownership of the returned value.
Return:

The prompt's password input field.

Since:

BlackBerry 10.0.0

bool rememberMeChecked ()

Retrieves whether the check box for includeRememberMe is selected by default.

To obtain the user selection, use rememberMeSelection() instead.
Return:

true if the toggle should be selected by default, false otherwise.

Since:

BlackBerry 10.0.0

Q_INVOKABLE bool rememberMeSelection ()

Returns the state of the toggle for remembering the entered credentials if the confirmation button was selected.

If the confirmation button was not selected or the toggle was not displayed in the prompt, false is returned.

The return value is reset when a new request is made.

Return:

true if the toggle for remembering the entered credentials was checked, false otherwise.

Since:

BlackBerry 10.0.0

QString rememberMeText ()

Retrieves the text associated with the check box for includeRememberMe.

Return:

The text for the toggle for includeRememberMe.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetActivityIndicatorVisible ()

Resets the prompt's activityIndicatorVisible property to its default value.

Since:

BlackBerry 10.2.0

Q_INVOKABLE void resetAutoUpdateEnabled ()

Resets the autoUpdateEnabled flag to false.

Since:

BlackBerry 10.2.0

Q_INVOKABLE void resetBody ()

Resets the main text of the prompt to QString::null.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetButtonAreaLimit ()

Resets the maximum number of buttons to accommodate in the prompt button area without overflow to -1.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetCancelButton ()

Resets the cancellation button for this prompt.

The label of the cancellation button is reset to its default value of "Cancel".

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetConfirmButton ()

Resets the confirmation button for this prompt.

The label of the button is reset to its default value of "Login".

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetCustomButton ()

Resets the custom action button for this prompt.

When the button resets, its label is a default-constructed QString so this button is omitted when making show() and exec() requests.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetDefaultButton ()

Resets the default button for this prompt to confirmButton.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetDismissAutomatically ()

Resets whether the prompt is dismissed when a button is selected to true.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetEmoticonsEnabled ()

Resets whether the text can display emoticons to false.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetIncludeRememberMe ()

Resets the flag to show the toggle for remembering the credentials to true.

To reset the selection state for the toggle, use resetRememberMeChecked().

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetIncludeShowPassword ()

Resets the flag to show the toggle for showing the entered password to true.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetModality ()

Resets the modality of the prompt to bb::system::SystemUiModality::Application.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetPasswordField ()

Resets the password input field for this prompt.

All properties of the password input field are reset.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetRememberMeChecked ()

Resets the selection state for the check box for includeRememberMe to true.

To reset whether to include the check box use resetIncludeRememberMe().

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetRememberMeText ()

Resets the text for the check box for includeRememberMe to "Remember Me".

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetReturnKeyAction ()

Resets the return key action of the prompt to bb::system::SystemUiReturnKeyAction::Default.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetTitle ()

Resets the title of the prompt to QString::null.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetUsernameField ()

Resets the username input field for this prompt.

All properties of the username input field are reset.

Since:

BlackBerry 10.0.0

Q_INVOKABLE void resetValidationMessage ()

Resets the validation message of the prompt to QString::null.

Since:

BlackBerry 10.0.0

bb::system::SystemUiResult::Type result ()

Retrieves the result of the last completed request.

If no request has been made, or if a request is pending, bb::system::SystemUiResult::None is returned.
Return:

The result of the last completed request. See bb::system::SystemUiResult for the list of possible results.

Since:

BlackBerry 10.0.0

bb::system::SystemUiReturnKeyAction::Type returnKeyAction ()

Retrieves the prompt's return key action.

Return:

The prompt's return key action.

Since:

BlackBerry 10.0.0

void setActivityIndicatorVisible (
  • boolvisible)

Sets whether an activity indicator is displayed on the title bar of the prompt.

Parameters
visible

true if the prompt displays an activity indicator, false otherwise.

Since:

BlackBerry 10.2.0

void setAutoUpdateEnabled (
  • boolupdate)

Sets the autoUpdateEnabled flag of the prompt.

Parameters
update

true if the prompt updates automatically, false if the prompt does not update automatically (in which case the show() method must be called after updating the prompt presentation properties).

Since:

BlackBerry 10.2.0

void setBody (

Sets the main text of the prompt.

Parameters
body

The new text of the prompt.

Since:

BlackBerry 10.0.0

void setButtonAreaLimit (
  • intnewButtonAreaLimit)

The maximum number of buttons that can be shown without causing an overflow.

Values outside the range [1,3] reset the property to its default value, -1. If newButtonAreaLimit is smaller than the number of buttons that will be displayed, all buttons are stacked vertically.
Parameters
newButtonAreaLimit

The maximum number of buttons in the button area.

Since:

BlackBerry 10.0.0

void setDefaultButton (

Sets the prompt's default button.

newDefaultButton must be one of the buttons managed by this instance, or NULL. If NULL is specified, then no button will be associated with the return key action.

If a non-managed button is specified, then this property is undefined.
Parameters
newDefaultButton

The button to associate with the return key action.

Since:

BlackBerry 10.0.0

void setDismissAutomatically (
  • boolautomaticDismissal)

Sets whether the prompt is dismissed when a button is selected.

Parameters
automaticDismissal

true if the prompt should be automatically dismissed on a button press, false otherwise.

Since:

BlackBerry 10.0.0

void setEmoticonsEnabled (
  • boolnewEmoticonsEnabled)

Sets whether the text can be displayed as emoticons.

Parameters
newEmoticonsEnabled

Whether the prompt supports emoticons.

Since:

BlackBerry 10.0.0

void setIncludeRememberMe (
  • boolvalue)

Sets the flag indicating if a check box for remembering the credentials should be included in the prompt.

Parameters
value

true if a check box for remembering the credentials should be included, false otherwise.

Since:

BlackBerry 10.0.0

void setIncludeShowPassword (
  • boolvalue)

Sets the preference for displaying a password check box.

Parameters
value

The preference for including the password check box in the prompt.

Since:

BlackBerry 10.0.0

void setModality (

Sets the modality for the prompt.

Parameters
newModality

The new modality preference. See bb::system::SystemUiModality for the list of possible values.

Since:

BlackBerry 10.0.0

void setRememberMeChecked (
  • boolnewRememberMeSelected)

Sets whether the check box for includeRememberMe is selected by default.

Parameters
newRememberMeSelected

true if the check box should be selected by default, false otherwise.

Since:

BlackBerry 10.0.0

void setRememberMeText (

Sets the text associated with the check box for includeRememberMe.

Parameters
newRememberMeText

The new text for the check box for includeRememberMe.

Since:

BlackBerry 10.0.0

void setReturnKeyAction (

Sets the return key action for the prompt.

Parameters
newReturnKeyAction

The new return key action.

Since:

BlackBerry 10.0.0

void setTitle (

Sets the title for the prompt.

Parameters
title

The new title of the prompt.

Since:

BlackBerry 10.0.0

void setValidationMessage (
  • const QString &newValidationMessage)

Sets the validation message of the prompt.

This can be combined with setting dismissAutomatically to false to update the prompt while it is being displayed.
Parameters
newValidationMessage

The validation message of the prompt.

Since:

BlackBerry 10.0.0

QString title ()

Retrieves the title for the prompt.

Return:

The title of the prompt.

Since:

BlackBerry 10.0.0

Q_INVOKABLE QString usernameEntry ()

Returns the value in the username input field if the confirmation button was selected.

The return value is reset when a new request is made.

Return:

The value in the username input field entered by the user.

Since:

BlackBerry 10.0.0

bb::system::SystemUiInputField * usernameField ()

Retrieves the username input field for the prompt.

This instance retains ownership of the returned value.
Return:

The prompt's username input field.

Since:

BlackBerry 10.0.0

QString validationMessage ()

Retrieves the validation message of the prompt.

Return:

The validation message of the prompt.

Since:

BlackBerry 10.0.0

Public Slots

void cancel ()

Cancels the prompt if it is displayed.

Since:

BlackBerry 10.0.0

bb::system::SystemUiResult::Type exec ()

Displays the prompt based on current property values.

The result of the request can be retrieved with the SystemCredentialsPrompt::result property, or by using the finished() signal. The button selection can be retrieved with the SystemCredentialsPrompt::buttonSelection property. The values in the username and password input fields can be retrieved using the usernameEntry() and passwordEntry() methods respectively. The state of the toggle for remembering the entered credentials can be retrieved using the rememberMeSelection() method.

Unlike show(), this function blocks until a button selection is made. If the prompt is already on the screen, this method returns immediately with bb::system::SystemUiResult::DialogCannotBlock.

Note:
Blocking occurs by starting a nested QEventLoop. To use this method safely, the following conditions must be met:
  • Any connections to this slot must use a Qt::QueuedConnection, or the slot must be triggered using QTimer::singleShot(), and

  • QObject::deleteLater() must be used in place of delete when deleting the prompt object. If these conditions are not met, unexpected behavior may result.

Return:

The result of the request. See bb::system::SystemUiresult for the list of possible results.

Since:

BlackBerry 10.0.0

void show ()

Displays a prompt based on current property values.

The result of the request can be retrieved with the SystemCredentialsPrompt::result property, or by using the finished() signal. The button selection can be retrieved with the SystemCredentialsPrompt::buttonSelection property. The values in the username and password input fields can be retrieved using the usernameEntry() and passwordEntry() methods respectively. The state of the toggle for remembering the entered credentials can be retrieved using the rememberMeSelection() method.

Control is returned to the caller immediately. For a blocking request, use exec().

Since:

BlackBerry 10.0.0

void update ()

Updates an on-screen prompt based on the current property values.

If the prompt is not on the screen, this method returns immediately and no changes are made to the prompt.

Since:

BlackBerry 10.2.0

Signals

void activityIndicatorVisibleChanged (
  • boolvalue)

Emitted when the activityIndicatorVisible property is changed programmatically.

Parameters
value

The new value of the activityIndicatorVisible property.

Since:

BlackBerry 10.2.0

void autoUpdateEnabledChanged (
  • boolvalue)

Emitted when the autoUpdateEnabled property is changed programmatically.

Parameters
value

The new value of the autoUpdateEnabled property.

Since:

BlackBerry 10.2.0

void bodyChanged (

Emitted when the body property is changed programmatically.

Parameters
value

The new value of the body property.

Since:

BlackBerry 10.0.0

void buttonAreaLimitChanged (
  • intnewButtonAreaLimit)

Emitted when the buttonAreaLimit property is changed programmatically.

Parameters
newButtonAreaLimit

The new value of the buttonAreaLimit property.

Since:

BlackBerry 10.0.0

void defaultButtonChanged (

Emitted when the defaultButton property is changed programmatically.

Parameters
newDefaultButton

The new value of the defaultButton property, or NULL if none is set.

Since:

BlackBerry 10.0.0

void dismissAutomaticallyChanged (
  • boolautomaticDismissal)

Emitted when the dismissAutomatically property is changed programmatically.

Parameters
automaticDismissal

The new value of the dismissAutomatically property.

Since:

BlackBerry 10.0.0

void emoticonsEnabledChanged (
  • boolnewEmoticonsEnabled)

Emitted when the emoticonsEnabled property is changed programmatically.

Parameters
newEmoticonsEnabled

The new value of the emoticonsEnabled property.

Since:

BlackBerry 10.0.0

void finished (

Emitted when a request is completed.

The button selection can be retrieved with buttonSelection(). The values in the username and password input fields can be retrieved using usernameEntry() and passwordEntry() respectively. The state of the toggle for remembering the entered credentials can be retrieved using rememberMeSelection().
Parameters
value

The result of the request. See bb::system::SystemUiResult for the list of possible results.

Since:

BlackBerry 10.0.0

void includeRememberMeChanged (
  • boolvalue)

Emitted when the includeRememberMe property is changed programmatically.

Parameters
value

The new value of the includeRememberMe property.

Since:

BlackBerry 10.0.0

void includeShowPasswordChanged (
  • boolvalue)

Emitted when the includeShowPassword property is changed programmatically.

Parameters
value

The new value of the includeShowPassword property.

Since:

BlackBerry 10.0.0

void modalityChanged (

Emitted when the modality property is changed programmatically.

Parameters
newModality

The new value of the modality property.

Since:

BlackBerry 10.0.0

void rememberMeCheckedChanged (
  • boolnewRememberMeSelected)

Emitted when the rememberMeChecked property is changed programmatically.

When the user dismisses the prompt, the user selection is available using rememberMeSelection().
Parameters
newRememberMeSelected

The new value of the rememberMeChecked property.

Since:

BlackBerry 10.0.0

void rememberMeTextChanged (

Emitted when the rememberMeText property is changed programmatically.

Parameters
newRememberMeText

The new value of the rememberMeText property.

Since:

BlackBerry 10.0.0

void returnKeyActionChanged (

Emitted when the returnKeyAction property is changed programmatically.

Parameters
newReturnKeyAction

The new value of the returnKeyAction property.

Since:

BlackBerry 10.0.0

void titleChanged (

Emitted when the title property is changed programmatically.

Parameters
value

The new value of the title property.

Since:

BlackBerry 10.0.0

void validationMessageChanged (
  • const QString &newValidationMessage)

Emitted when the validationMessage property is changed programmatically.

Parameters
newValidationMessage

The new value of the validationMessage property.

Since:

BlackBerry 10.0.0

Last modified: 2014-09-29



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

comments powered by Disqus