ContainerNavigation

Since: BlackBerry 10.3.1

#include <bb/cascades/ContainerNavigation>

Specifies how navigation behaves for the children of a container.


Overview

Inheritance

QML properties

childrenBehavior: bb::cascades::ChildrenNavigationBehavior::Type
attachedObjects: QDeclarativeListProperty< QObject > [read-only]Inherited
defaultHighlightEnabled: boolInherited
down: bb::cascades::ControlInherited
downAllowed: boolInherited
focusPolicy: bb::cascades::NavigationFocusPolicy::TypeInherited
left: bb::cascades::ControlInherited
leftAllowed: boolInherited
objectName: QStringInherited
parent: QObject [read-only]Inherited
right: bb::cascades::ControlInherited
rightAllowed: boolInherited
ui: bb::cascades::UIConfig [read-only]Inherited
up: bb::cascades::ControlInherited
upAllowed: boolInherited
wantsHighlight: bool [read-only]Inherited

Public Functions Index

virtual ~ContainerNavigation ()
bb::cascades::ChildrenNavigationBehavior::TypechildrenBehavior () const
Q_SLOT voidresetChildrenBehavior ()
Q_SLOT voidsetChildrenBehavior (bb::cascades::ChildrenNavigationBehavior::Type childrenBehavior)
bb::cascades::Control *down () const Inherited
virtual boolevent (QEvent *event)Inherited
bb::cascades::NavigationFocusPolicy::TypefocusPolicy () const Inherited
boolisDefaultHighlightEnabled () const Inherited
boolisDownAllowed () const Inherited
boolisLeftAllowed () const Inherited
boolisRightAllowed () const Inherited
boolisUpAllowed () const Inherited
bb::cascades::Control *left () const Inherited
Q_SLOT voidresetDefaultHighlightEnabled ()Inherited
Q_SLOT voidresetDown ()Inherited
Q_SLOT voidresetDownAllowed ()Inherited
Q_SLOT voidresetFocusPolicy ()Inherited
Q_SLOT voidresetLeft ()Inherited
Q_SLOT voidresetLeftAllowed ()Inherited
Q_SLOT voidresetRight ()Inherited
Q_SLOT voidresetRightAllowed ()Inherited
Q_SLOT voidresetUp ()Inherited
Q_SLOT voidresetUpAllowed ()Inherited
bb::cascades::Control *right () const Inherited
Q_SLOT voidsetDefaultHighlightEnabled (bool enabled)Inherited
Q_SLOT voidsetDown (bb::cascades::Control *target)Inherited
Q_SLOT voidsetDownAllowed (bool allowed)Inherited
Q_SLOT voidsetFocusPolicy (bb::cascades::NavigationFocusPolicy::Type focusPolicy)Inherited
Q_SLOT voidsetLeft (bb::cascades::Control *target)Inherited
Q_SLOT voidsetLeftAllowed (bool allowed)Inherited
voidsetObjectName (const QString &name)Inherited
Q_SLOT voidsetRight (bb::cascades::Control *target)Inherited
Q_SLOT voidsetRightAllowed (bool allowed)Inherited
Q_SLOT voidsetUp (bb::cascades::Control *target)Inherited
Q_SLOT voidsetUpAllowed (bool allowed)Inherited
virtual Q_INVOKABLE QStringtoDebugString () const Inherited
Q_INVOKABLE bb::cascades::UIConfig *ui () const Inherited
bb::cascades::Control *up () const Inherited
boolwantsHighlight () const Inherited

Protected Functions Index

Only has inherited protected functions

BaseObject (QObject *parent=0)Inherited
virtual voidconnectNotify (const char *signal)Inherited
virtual voiddisconnectNotify (const char *signal)Inherited

Signals Index

voidchildrenBehaviorChanged (bb::cascades::ChildrenNavigationBehavior::Type newChildrenBehavior)
voidcreationCompleted ()Inherited
voiddefaultHighlightEnabledChanged (bool enabled)Inherited
voiddownAllowedChanged (bool allowed)Inherited
voiddownChanged (bb::cascades::Control *target)Inherited
voidfocusPolicyChanged (bb::cascades::NavigationFocusPolicy::Type newFocusPolicy)Inherited
voidleftAllowedChanged (bool allowed)Inherited
voidleftChanged (bb::cascades::Control *target)Inherited
voidobjectNameChanged (const QString &objectName)Inherited
voidrightAllowedChanged (bool allowed)Inherited
voidrightChanged (bb::cascades::Control *target)Inherited
voidupAllowedChanged (bool allowed)Inherited
voidupChanged (bb::cascades::Control *target)Inherited
voidwantsHighlightChanged (bool wantsHighlight)Inherited

Properties

bb::cascades::ChildrenNavigationBehavior::Type childrenBehavior

Describes the behavior when navigating the children of this control using the trackpad or similar input.

Since:

BlackBerry 10.3.1

QDeclarativeListProperty< QObject > attachedObjectsInherited[read-only]

A hierarchical list of the UIObject's attached objects.

Since:

BlackBerry 10.0.0

bool defaultHighlightEnabledInherited

Specifies whether the control should show the default highlight when the control wants a navigation highlight.

Since:

BlackBerry 10.3.1

bb::cascades::Control downInherited

Property for specifying which control should get focus when navigating down.

If the value is 0 the default navigation algorithm will be used.

The default value is 0.

Since:

BlackBerry 10.3.1

bool downAllowedInherited

Property for specifying whether it should be possible to navigate down.

The default value is true.

Since:

BlackBerry 10.3.1

bb::cascades::NavigationFocusPolicy::Type focusPolicyInherited

Specifies whether this control can get focus by navigating with the trackpad.

The default FocusPolicy value is Default. A disabled Control cannot have focus.

Since:

BlackBerry 10.3.1

bb::cascades::Control leftInherited

Property for specifying which control should get focus when navigating left.

If the value is 0 the default navigation algorithm will be used.

The default value is 0.

Since:

BlackBerry 10.3.1

bool leftAllowedInherited

Property for specifying whether it should be possible to navigate left.

The default value is true.

Since:

BlackBerry 10.3.1

QString objectNameInherited

This property is overridden from QObject.

See also:

QObject::objectName().

Since:

BlackBerry 10.0.0

QObject parentInherited[read-only]

A read-only property that represents this object's parent.

The parent of an object is specified using QObject::setParent(QObject*). The purpose of the property is to expose the object's parent to QML.

This property is read-only to prevent modifications from QML, where typically the parent is declaratively set. In C++ code, the parent can be explicitly set using QObject::setParent(QObject*), or implicitly set by adding it to a visual container.

The default value of this property is 0.

Since:

BlackBerry 10.0.0

bb::cascades::Control rightInherited

Property for specifying which control should get focus when navigating right.

If the value is 0 the default navigation algorithm will be used.

The default value is 0.

Since:

BlackBerry 10.3.1

bool rightAllowedInherited

Property for specifying whether it should be possible to navigate right.

The default value is true.

Since:

BlackBerry 10.3.1

bb::cascades::UIConfig uiInherited[read-only]

An object that gives access to unit conversion routines.

QML use:
        // Size using design units
        Container {
            preferredWidth: ui.du(12)
            preferredHeight: ui.du(5)
        }

        // Size using design units, snap to whole pixels
        Container {
            preferredWidth: ui.sdu(13.5)
            preferredHeight: ui.sdu(7.5)
        }

        // Size using absolute pixel values
        Container {
            preferredWidth: ui.px(150)
            preferredHeight: ui.px(50)
        }
C++ use:
Container *container1 = Container::create().background(Color::Red);
UIConfig *ui = container1->ui();
container1->setPreferredWidth(ui->du(12));
container1->setPreferredHeight(ui->du(5));

Container *container2 = Container::create().background(Color::Green);
container2->setPreferredWidth(ui->sdu(13.5));
container2->setPreferredHeight(ui->sdu(7.5));

Container *container3 = Container::create().background(Color::Blue);
container3->setPreferredWidth(ui->px(150));
container3->setPreferredHeight(ui->sdu(50));
Since:

Blackberry 10.3.0

bb::cascades::Control upInherited

Property for specifying which control should get focus when navigating up.

If the value is 0 the default navigation algorithm will be used.

The default value is 0.

Since:

BlackBerry 10.3.1

bool upAllowedInherited

Property for specifying whether it should be possible to navigate up.

The default value is true.

Since:

BlackBerry 10.3.1

bool wantsHighlightInherited[read-only]

Read only property indicating whether the control wants a navigation highlight.

If defaultHighlightEnabled is true a default highlight will be shown when wantsHighlight is true.

Since:

BlackBerry 10.3.1

Public Functions

virtual~ContainerNavigation ()

Destructor.

bb::cascades::ChildrenNavigationBehavior::Type childrenBehavior ()

Gets the child navigation behavior for this control.

Return:

The child navigation behavior when navigating with the trackpad or similar input.

Since:

BlackBerry 10.3.1

Q_SLOT void resetChildrenBehavior ()

Resets the childrenBehavior property to its default value.

Since:

BlackBerry 10.3.1

Q_SLOT void setChildrenBehavior (

Set the child navigation behavior when navigating the children of the control with trackpad or similar input.

Since:

BlackBerry 10.3.1

bb::cascades::Control * down ()Inherited

Gets the target of a down navigation from the control.

Ownership will not be transferred.

Return:

The target of a down navigation or 0 if the default navigation algorithm is used.

Since:

BlackBerry 10.3.1

virtual bool event (Inherited

Overloaded to implement the event mechanism in Cascades.

Warning!

If this function is overridden, it must be called by the derived class for events to work properly in Cascades.

Parameters
event

The received event.

Return:

True if the received event was recognized and processed, false otherwise.

Since:

BlackBerry 10.0.0

bb::cascades::NavigationFocusPolicy::Type focusPolicy ()Inherited

Indicates whether this control can get focus by navigating with the trackpad.

Return:

The focus policy when navigating with the trackpad.

Since:

BlackBerry 10.3.1

bool isDefaultHighlightEnabled ()Inherited

Indicates whether the default highlight should be shown when wantsHighlight is true.

Return:

true if the default highlight is enabled, false otherwise.

Since:

BlackBerry 10.3.1

bool isDownAllowed ()Inherited

Indicates whether down navigation is allowed from the control.

Return:

true if down navigation is allowed, false otherwise.

Since:

BlackBerry 10.3.1

bool isLeftAllowed ()Inherited

Indicates whether left navigation is allowed from the control.

Return:

true if left navigation is allowed, false otherwise.

Since:

BlackBerry 10.3.1

bool isRightAllowed ()Inherited

Indicates whether right navigation is allowed from the control.

Return:

true if right navigation is allowed, false otherwise.

Since:

BlackBerry 10.3.1

bool isUpAllowed ()Inherited

Indicates whether up navigation is allowed from the control.

Return:

true if up navigation is allowed, false otherwise.

Since:

BlackBerry 10.3.1

bb::cascades::Control * left ()Inherited

Gets the target of a left navigation from the control.

Ownership will not be transferred.

Return:

The target of a left navigation or 0 if the default navigation algorithm is used.

Since:

BlackBerry 10.3.1

Q_SLOT void resetDefaultHighlightEnabled ()Inherited

Resets the defaultHighlightEnabled property to its default value.

Since:

BlackBerry 10.3.1

Q_SLOT void resetDown ()Inherited

Resets the target of a down navigation from the control to use the default navigation algorithm.

Ownership will not be transferred. If operation was successful, the downChanged() signal will be emitted.

Since:

BlackBerry 10.3.1

Q_SLOT void resetDownAllowed ()Inherited

Resets the downAllowed property to its default value.

Since:

BlackBerry 10.3.1

Q_SLOT void resetFocusPolicy ()Inherited

Resets the focusPolicy property to its default value.

Since:

BlackBerry 10.3.1

Q_SLOT void resetLeft ()Inherited

Resets the target of a left navigation from the control to use the default navigation algorithm.

Ownership will not be transferred. If operation was successful, the leftChanged() signal will be emitted.

Since:

BlackBerry 10.3.1

Q_SLOT void resetLeftAllowed ()Inherited

Resets the leftAllowed property to its default value.

Since:

BlackBerry 10.3.1

Q_SLOT void resetRight ()Inherited

Resets the target of a right navigation from the control to use the default navigation algorithm.

Ownership will not be transferred. If the operation is successful, the rightChanged() signal will be emitted.

Since:

BlackBerry 10.3.1

Q_SLOT void resetRightAllowed ()Inherited

Resets the rightAllowed property to its default value.

Since:

BlackBerry 10.3.1

Q_SLOT void resetUp ()Inherited

Resets the target of a up navigation from the control to use the default navigation algorithm.

Ownership will not be transferred. If operation was successful, the upChanged() signal will be emitted.

Since:

BlackBerry 10.3.1

Q_SLOT void resetUpAllowed ()Inherited

Resets the upAllowed property to its default value.

Since:

BlackBerry 10.3.1

bb::cascades::Control * right ()Inherited

Gets the target of a right navigation from the control.

Ownership will not be transferred.

Return:

The target of a right navigation or 0 if the default navigation algorithm is used.

Since:

BlackBerry 10.3.1

Q_SLOT void setDefaultHighlightEnabled (
  • boolenabled)
Inherited

Sets whether the default highlight should be shown when wantsHighlight is true.

Parameters
enabled

true if the default highlight should be enabled, false otherwise.

Since:

BlackBerry 10.3.1

Q_SLOT void setDown (Inherited

Sets the target of a down navigation from the control.

Ownership will not be transferred. If operation was successful, the downChanged() signal will be emitted.

Parameters
target

The target of a down navigation. If target is 0 the default navigation algorithm will be used.

Since:

BlackBerry 10.3.1

Q_SLOT void setDownAllowed (
  • boolallowed)
Inherited

Sets whether down navigation should be allowed from the control.

Parameters
allowed

true if down navigation is allowed, false otherwise.

Since:

BlackBerry 10.3.1

Q_SLOT void setFocusPolicy (Inherited

Sets whether this control can get focus by navigating with the trackpad.

Parameters
focusPolicy

The focus policy when navigating with the trackpad.

Since:

BlackBerry 10.3.1

Q_SLOT void setLeft (Inherited

Sets the target of a left navigation from the control.

Ownership will not be transferred. If operation was successful, the leftChanged() signal will be emitted.

Parameters
target

The target of a left navigation. If target is 0 the default navigation algorithm will be used.

Since:

BlackBerry 10.3.1

Q_SLOT void setLeftAllowed (
  • boolallowed)
Inherited

Sets whether left navigation should be allowed from the control.

Parameters
allowed

true if left navigation is allowed, false otherwise.

Since:

BlackBerry 10.3.1

void setObjectName (Inherited

Sets the objectName property.

Parameters
name

The new name for the object.

Since:

BlackBerry 10.0.0

Q_SLOT void setRight (Inherited

Sets the target of a right navigation from the control.

Ownership will not be transferred. If the operation is successful, the rightChanged() signal will be emitted.

Parameters
target

The target of a right navigation. If target is 0 the default navigation algorithm will be used.

Since:

BlackBerry 10.3.1

Q_SLOT void setRightAllowed (
  • boolallowed)
Inherited

Controls whether right navigation should be allowed from the control.

Parameters
allowed

true if right navigation is allowed, false otherwise.

Since:

BlackBerry 10.3.1

Q_SLOT void setUp (Inherited

Sets the target of a up navigation from the control.

Ownership will not be transferred. If operation was successful, the upChanged() signal will be emitted.

Parameters
target

The target of a up navigation. If target is 0 the default navigation algorithm will be used.

Since:

BlackBerry 10.3.1

Q_SLOT void setUpAllowed (
  • boolallowed)
Inherited

Controls whether up navigation should be allowed from the control.

Parameters
allowed

true if up navigation is allowed, false otherwise.

Since:

BlackBerry 10.3.1

virtual Q_INVOKABLE QString toDebugString ()Inherited

Returns a debug string representing this object.

Return:

A debug string for the object.

Since:

BlackBerry 10.0.0

Q_INVOKABLE bb::cascades::UIConfig * ui ()Inherited

Returns the UIConfig for this ui object.

The UIConfig can be used to perform unit conversions from design units (du) and snapped design units (sdu) to pixels.

Ownership remains with Cascades.

C++ use:
Container *container1 = Container::create().background(Color::Red);
UIConfig *ui = container1->ui();
container1->setPreferredWidth(ui->du(12));
container1->setPreferredHeight(ui->du(5));

Container *container2 = Container::create().background(Color::Green);
container2->setPreferredWidth(ui->sdu(13.5));
container2->setPreferredHeight(ui->sdu(7.5));

Container *container3 = Container::create().background(Color::Blue);
container3->setPreferredWidth(ui->px(150));
container3->setPreferredHeight(ui->sdu(50));
Return:

The UIConfig for this ui object.

Since:

BlackBerry 10.3.0

bb::cascades::Control * up ()Inherited

Gets the target of an up navigation from the control.

Ownership will not be transferred.

Return:

The target of a up navigation or 0 if the default navigation algorithm is used.

Since:

BlackBerry 10.3.1

bool wantsHighlight ()Inherited

Indicates whether the control wants a navigation highlight.

Return:

true if the control expects a highlight to be shown, false otherwise.

Since:

BlackBerry 10.3.1

Protected Functions

(Only has inherited protected functions)

BaseObject (Inherited

Constructs an instance of BaseObject's subclass.

Parameters
parent

An optional parent, defaults to 0.

Since:

BlackBerry 10.0.0

virtual void connectNotify (
  • const char *signal)
Inherited

Overloaded to implement the event mechanism in Cascades.

If this function is overridden, it must be called by the derived class for events to work properly in Cascades.

Parameters
signal

The connected signal.

Since:

BlackBerry 10.0.0

virtual void disconnectNotify (
  • const char *signal)
Inherited

Overloaded to implement the event mechanism in Cascades.

If this function is overridden, it must be called by the derived class for events to work properly in Cascades.

Parameters
signal

The disconnected signal.

Since:

BlackBerry 10.0.0

Signals

void childrenBehaviorChanged (

Emitted when the childrenBehavior property has changed.

Parameters
newChildrenBehavior

The child navigation behavior when navigating the children of the control.

Since:

BlackBerry 10.3.1

void creationCompleted ()Inherited

Emitted when this object is instantiated as a result of loading a QML document and creating the root node (only after the root component that caused this instantiation has completed construction), or when the object is being constructed from its builder class.

This signal indicates that the construction and initialization of the object has been completed, the properties are initialized, and any QML binding values have been assigned to the object.

This signal is not emitted when the object is constructed from C++ using the constructor. If the object is constructed using its builder class, the signal is emitted when the the builder class returns the fully constructed object.

This signal can be used when there is an activity that needs to be performed, such as a property state integrity verification after the object is instantiated from a QML document or a builder, but before control is returned to the application.

See also:

QmlDocument

Since:

BlackBerry 10.0.0

void defaultHighlightEnabledChanged (
  • boolenabled)
Inherited

Emitted when the defaultHighlightEnabled property has changed.

Parameters
enabled

true if the default highlight is enabled, false otherwise.

Since:

BlackBerry 10.3.1

void downAllowedChanged (
  • boolallowed)
Inherited

Emitted when the downAllowed property has changed.

Parameters
allowed

If true down navigation is allowed, if false down navigation is not allowed.

Since:

BlackBerry 10.3.1

void downChanged (Inherited

Emitted when the target of down navigation has changed.

Parameters
target

The new target of a down navigation.

Since:

BlackBerry 10.3.1

void focusPolicyChanged (Inherited

Emitted when the focusPolicy property has changed.

Parameters
newFocusPolicy

The focus policy when navigating with the trackpad.

Since:

BlackBerry 10.3.1

void leftAllowedChanged (
  • boolallowed)
Inherited

Emitted when the leftAllowed property has changed.

Parameters
allowed

If true left navigation is allowed, if false left navigation is not allowed.

Since:

BlackBerry 10.3.1

void leftChanged (Inherited

Emitted when the target of left navigations has changed.

Parameters
target

The new target of a left navigation.

Since:

BlackBerry 10.3.1

void objectNameChanged (Inherited

This signal is emitted when the objectName property is changed.

Since:

BlackBerry 10.0.0

void rightAllowedChanged (
  • boolallowed)
Inherited

Emitted when the rightAllowed property has changed.

Parameters
allowed

If true right navigation is allowed, if false right navigation is not allowed.

Since:

BlackBerry 10.3.1

void rightChanged (Inherited

Emitted when the target of right navigation has changed.

Parameters
target

The new target of a right navigation.

Since:

BlackBerry 10.3.1

void upAllowedChanged (
  • boolallowed)
Inherited

Emitted when the upAllowed property has changed.

Parameters
allowed

If true up navigation is allowed, if false up navigation is not allowed.

Since:

BlackBerry 10.3.1

void upChanged (Inherited

Emitted when the target of up navigation has changed.

Parameters
target

The new target of an up navigation.

Since:

BlackBerry 10.3.1

void wantsHighlightChanged (
  • boolwantsHighlight)
Inherited

Emitted when the wantsHighlight property has changed.

Parameters
wantsHighlight

true if the control expects a highlight to be shown, false otherwise.

Since:

BlackBerry 10.3.1

Last modified: 2015-03-26



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

comments powered by Disqus