TabbedPane
Since: BlackBerry 10.0.0
#include <bb/cascades/TabbedPane>
A navigation control that allows the user to switch between tabs.

The tabs can be used to either completely replace displayed content by setting new panes or to filter existing content in a single pane based on which tab is currently selected.
The Tab objects in the TabbedPane are added to the Action bar, which is a horizontal bar displayed at the bottom of the screen. The tabs on the Action bar can be pressed to switch to display their content. The Tab objects take an AbstractPane as their content. If the content is not 0, it will be displayed in the TabbedPane when the corresponding tab is selected.
If the TabbedPane has only one Tab and the content of that Tab has no actions, the Action bar is not displayed since there aren't any additional tabs or actions to be displayed.
The first added Tab becomes the active one.
If the content of the Tab that is being displayed has any ActionItem objects associated with it, these actions take priority and are placed on the Action bar, while the other tabs are pushed to the side bar. This behavior can be changed by setting the showTabsOnActionBar property to true. If showTabsOnActionBar is true, tabs will be placed on the Action bar and actions will be placed in the Action menu.

The user can access tabs or actions that are not present on the Action bar by pressing the overflow tab, which is automatically added to the Action bar when it is needed.
If a tab is selected that is not currently present on the Action bar, the side bar will then change to the active-tab state and show the title and image of that tab along with an overflow symbol.
It is possible for the application to programmatically change the appearance of the sidebar by setting the property sidebarState.
A tab can display a visual notification image if there is new content available. If any tab that is only shown in the side bar contains such a visual notification, the overflow tab will also display such a visual notification. This visual notification will remain on the overflow tab until the corresponding tab(s) have been displayed (e.g. by opening the side bar) or the visual notification is removed from all tabs that are only visible in the side bar and that had new content.
Here's an example of a TabbedPane with three tabs, each with its own page and set of actions. The tabs are set to show on the Action bar so that the actions get pushed to the Action menu.

QML implementation:
TabbedPane { showTabsOnActionBar: true Tab { title: "Home" Page { id: page1 actions: [ ActionItem { title: "New" }, ActionItem { title: "Delete" } ] } } Tab { title: "Options" Page { id: page2 actions: [ ActionItem { title: "Edit" }, ActionItem { title: "Save" } ] } } Tab { title: "Help" Page { id: page3 actions: [ ActionItem { title: "Search" }, ActionItem { title: "Browse" } ] } } }
C++ implementation:
TabbedPane* tabbedPane = TabbedPane::create() .showTabsOnActionBar(true) .add(Tab::create() .title("Home") .content(Page::create() .addAction(ActionItem::create().title("New")) .addAction(ActionItem::create().title("Delete")))) .add(Tab::create() .title("Options") .content(Page::create() .addAction(ActionItem::create().title("Edit")) .addAction(ActionItem::create().title("Save")))) .add(Tab::create() .title("Help") .content(Page::create() .addAction(ActionItem::create().title("Search")) .addAction(ActionItem::create().title("Browse"))));
To get the actions displayed on the Action bar and the tabs in the Tab menu, the showTabsOnActionBar property must be set to false and the ActionBar.placement property for each action must be set to ActionBarPlacement.OnBar. Here's how a TabbedPane looks with the actions on the Action bar and the tabs in the Tab menu:

In addition to switching between pages, tabs can also be used for filtering content that appears on the screen. Here's an example that shows how to change the text for a label by using tabs.
TabbedPane { showTabsOnActionBar: true activePane: Page { Label { id: label text: "What do you like more, kittens or puppies?" } } Tab { title: "Puppies" onTriggered: label.text = "I love puppies!" } Tab { title: "Kittens" onTriggered: label.text = "I love kittens!" } }
Overview
Inheritance
bb::cascades::BaseObject | ||||
bb::cascades::UIObject | ||||
bb::cascades::AbstractPane | ||||
bb::cascades::TabbedPane |
QML properties
activePane | : bb::cascades::AbstractPane |
activeTab | : bb::cascades::Tab |
tabs | : QDeclarativeListProperty [read-only] |
peekEnabled | : bool |
showTabsOnActionBar | : bool |
sidebarState | : bb::cascades::SidebarState::Type |
sidebarVisualState | : bb::cascades::SidebarVisualState::Type [read-only] |
accessibility | : bb::cascades::AbstractA11yObject [read-only]![]() |
attachedObjects | : QDeclarativeListProperty< QObject > [read-only]![]() |
builtInShortcutsEnabled | : bool![]() |
objectName | : QString![]() |
paneProperties | : bb::cascades::PaneProperties![]() |
parent | : QObject [read-only]![]() |
peekedAt | : bool [read-only]![]() |
ui | : bb::cascades::UIConfig [read-only]![]() |
QML signals
Properties Index
bb::cascades::AbstractPane | activePane |
bb::cascades::Tab | activeTab |
QDeclarativeListProperty | tabs [read-only] |
bool | peekEnabled |
bool | showTabsOnActionBar |
bb::cascades::SidebarState::Type | sidebarState |
bb::cascades::SidebarVisualState::Type | sidebarVisualState [read-only] |
bb::cascades::AbstractA11yObject | accessibility [read-only]![]() |
QDeclarativeListProperty< QObject > | attachedObjects [read-only]![]() |
bool | builtInShortcutsEnabled![]() |
QString | objectName![]() |
bb::cascades::PaneProperties | paneProperties![]() |
QObject | parent [read-only]![]() |
bool | peekedAt [read-only]![]() |
bb::cascades::UIConfig | ui [read-only]![]() |
Public Functions Index
TabbedPane (QObject *parent=0) | |
virtual | ~TabbedPane () |
bb::cascades::AbstractPane * | activePane () const |
bb::cascades::Tab * | activeTab () const |
Q_INVOKABLE void | add (bb::cascades::Tab *tab) |
Q_INVOKABLE bb::cascades::Tab * | at (int index) const |
Q_INVOKABLE int | count () const |
Q_INVOKABLE int | indexOf (bb::cascades::Tab *tab) const |
Q_INVOKABLE void | insert (int index, bb::cascades::Tab *tab) |
bool | isPeekEnabled () const |
Q_INVOKABLE bool | remove (bb::cascades::Tab *tab) |
Q_INVOKABLE void | removeAll () |
Q_SLOT void | resetPeekEnabled () |
Q_SLOT void | resetShowTabsOnActionBar () |
Q_SLOT void | resetSidebarState () |
void | setActivePane (bb::cascades::AbstractPane *activePane) |
void | setActiveTab (bb::cascades::Tab *activeTab) |
Q_SLOT void | setPeekEnabled (bool enabled) |
Q_SLOT void | setShowTabsOnActionBar (bool showTabsOnActionBar) |
void | setSidebarState (bb::cascades::SidebarState::Type sidebarState) |
bool | showTabsOnActionBar () const |
bb::cascades::SidebarState::Type | sidebarState () const |
bb::cascades::SidebarVisualState::Type | sidebarVisualState () const |
bb::cascades::AbstractA11yObject * | accessibility () const ![]() |
Q_INVOKABLE void | addKeyListener (bb::cascades::KeyListener *keyListener)![]() |
Q_INVOKABLE void | addShortcut (bb::cascades::AbstractShortcut *shortcut)![]() |
Q_INVOKABLE bool | builtInShortcutsEnabled () const ![]() |
Q_INVOKABLE void | disableAllShortcuts ()![]() |
Q_INVOKABLE void | enableAllShortcuts ()![]() |
virtual bool | event (QEvent *event)![]() |
bool | isPeekedAt () const ![]() |
Q_INVOKABLE bb::cascades::KeyListener * | keyListenerAt (int index) const ![]() |
Q_INVOKABLE int | keyListenerCount () const ![]() |
bb::cascades::PaneProperties * | paneProperties () const ![]() |
Q_INVOKABLE void | removeAllKeyListeners ()![]() |
Q_INVOKABLE void | removeAllShortcuts ()![]() |
Q_INVOKABLE bool | removeKeyListener (bb::cascades::KeyListener *keyListener)![]() |
Q_INVOKABLE bool | removeShortcut (bb::cascades::AbstractShortcut *shortcut)![]() |
Q_SLOT void | resetBuiltInShortcutsEnabled ()![]() |
Q_SLOT void | resetPaneProperties ()![]() |
Q_INVOKABLE void | setBuiltInShortcutEnabled (bb::cascades::SystemShortcuts::Type type, bool enabled)![]() |
Q_SLOT void | setBuiltInShortcutsEnabled (bool enabled)![]() |
void | setObjectName (const QString &name)![]() |
Q_SLOT void | setPaneProperties (bb::cascades::PaneProperties *paneProperties)![]() |
Q_INVOKABLE bb::cascades::AbstractShortcut * | shortcutAt (int index) const ![]() |
Q_INVOKABLE int | shortcutCount () const ![]() |
virtual Q_INVOKABLE QString | toDebugString () const ![]() |
Q_INVOKABLE bb::cascades::UIConfig * | ui () const ![]() |
Static Public Functions Index
Builder | create () |
Protected Functions Index
Only has inherited protected functions
BaseObject (QObject *parent=0)![]() | |
virtual void | connectNotify (const char *signal)![]() |
virtual void | disconnectNotify (const char *signal)![]() |
Signals Index
void | activePaneChanged (bb::cascades::AbstractPane *activePane) |
void | activePaneTransitionEnded (bb::cascades::AbstractPane *activePane) |
void | activeTabChanged (bb::cascades::Tab *activeTab) |
void | peekEnabledChanged (bool enabled) |
void | showTabsOnActionBarChanged (bool showTabsOnActionBar) |
void | sidebarStateChanged (bb::cascades::SidebarState::Type newSidebarState) |
void | sidebarVisualStateChanged (bb::cascades::SidebarVisualState::Type newSidebarVisualState) |
void | tabAdded (bb::cascades::Tab *tab) |
void | tabRemoved (bb::cascades::Tab *tab) |
void | builtInShortcutsEnabledChanged (bool builtInShortcutsEnabled)![]() |
void | creationCompleted ()![]() |
void | objectNameChanged (const QString &objectName)![]() |
void | panePropertiesChanged (bb::cascades::PaneProperties *paneProperties)![]() |
void | peekedAtChanged (bool peekedAt)![]() |
void | peekEnded ()![]() |
void | peekStarted ()![]() |
Properties
bb::cascades::AbstractPane
The AbstractPane which is currently being shown by the TabbedPane.
BlackBerry 10.0.0
bb::cascades::Tab
The Tab that is currently active in the TabbedPane.
The active tab is 0 if the TabbedPane doesn't have any children.
The activeTabChanged() signal is emitted when this property changes.
BlackBerry 10.0.0
QDeclarativeListProperty
A set of Tab objects added to the TabbedPane.
For each Tab in the TabbedPane, a tab is added to the Action bar, which can be pressed to switch to its corresponding content. If the active Tab has actions added to it, they will be displayed in the Action bar.
BlackBerry 10.0.0
bool
Indicates whether peeking from within the current Page should be enabled.
When enabled, dragging or swiping to the right inside the content of the Page will reveal the Tab menu.
This property only controls whether or not peeking is enabled within the content area of the Page. Peeking is always enabled on the Action bar, even if this property is disabled.
The default value is true (enabled).
BlackBerry 10.0.0
bool
Specifies whether tabs should take priority in the Action bar instead of action items.
If the content of the Tab that is being displayed has any ActionItem objects associated with it, these actions take priority and are placed on the Action bar, while the other tabs are pushed to the side bar. This behavior can be changed by setting the showTabsOnActionBar property to true. If showTabsOnActionBar is true, tabs for will be placed on the Action bar and actions will be placed in the side bar.
The default value is false.
BlackBerry 10.0.0
bb::cascades::SidebarState::Type
The current visibility state of the sidebar.
The default state is Hidden. The other available visibility states are VisibleCompact, and VisibleFull.
BlackBerry 10.0.0
bb::cascades::SidebarVisualState::Type
The current visual state of the sidebar.
BlackBerry 10.0.0
bb::cascades::AbstractA11yObject
Defines this pane's accessibility object.
BlackBerry 10.2.0
QDeclarativeListProperty< QObject >
A hierarchical list of the UIObject's attached objects.
BlackBerry 10.0.0
bool
Enables or disables all AbstractPane's core shortcuts.
This property is used when all AbstractPane's core shortcuts should be enabled or disabled.
BlackBerry 10.2.0
QString
This property is overridden from QObject.
QObject::objectName().
BlackBerry 10.0.0
bb::cascades::PaneProperties
The pane properties for this AbstractPane.
The paneProperties property specifies data that the parent AbstractPane may use. The type of pane properties of the child must match up with parent. For example, if you add a Page to a NavigationPane, you must use NavigationPaneProperties.
By default, the paneProperties of an AbstractPane is 0.
BlackBerry 10.0.0
QObject
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.
BlackBerry 10.0.0
bool
Indicates whether this AbstractPane is being "peeked" at.
If true, the pane is currently being revealed by peeking from a Sheet or a Page within a NavigationPane. By default, the value is false, indicating that the pane is not currently being peeked at.
If a NavigationPane is being peeked at, both the NavigationPane and its currently visible page will return true for the peekedAt property.
As a convenience, there are two signals available called peekStarted and peekEnded, which are emitted when a peek on the AbstractPane starts or ends.
The peekedAtChanged() signal is emitted when peekedAt changes.
BlackBerry 10.0.0
bb::cascades::UIConfig
An object that gives access to unit conversion routines.
// 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));
Blackberry 10.3.0
Public Functions
Constructs the TabbedPane.
BlackBerry 10.0.0
virtual
Destructor.
BlackBerry 10.0.0
bb::cascades::AbstractPane *
Returns the currently active AbstractPane.
The active AbstractPane or 0 if one isn't currently being displayed.
BlackBerry 10.0.0
bb::cascades::Tab *
Returns the currently active Tab.
The active Tab or 0 if the TabbedPane doesn't have any children.
BlackBerry 10.0.0
Q_INVOKABLE void
Adds a Tab to the TabbedPane.
If this is the first Tab added to this pane it will become the active tab.
New tabs are added as the last child in the TabbedPane. The Tab that is passed must not be 0 or it will be ignored. If the Tab is already a child of the TabbedPane that it is being added to, the operation fails. If the Tab is currently a child of another TabbedPane, it is removed as a child from that TabbedPane, and ownership is transferred to the new TabbedPane.
Parameters | |
---|---|
tab |
The Tab to be added; must not be 0 or it will be ignored. |
BlackBerry 10.0.0
Q_INVOKABLE bb::cascades::Tab *
Returns a Tab at the specified index.
Once completed, ownership of the Tab remains with the TabbedPane.
Parameters | |
---|---|
index |
The index of the Tab. |
The requested Tab if the index was valid, 0 otherwise.
BlackBerry 10.0.0
Q_INVOKABLE int
Returns the number of Tabs in the tabs list property.
The number of Tabs in the tabs list property.
BlackBerry 10.0.0
Q_INVOKABLE int
Returns the index of a Tab.
If the Tab isn't a child of the TabbedPane or if the Tab is 0, -1 is returned.
Parameters | |
---|---|
tab |
The Tab to get the index from. |
The index of the specified Tab if the Tab is valid, -1 otherwise.
BlackBerry 10.0.0
Q_INVOKABLE void
Inserts a Tab at a specified index in the TabbedPane.
If this is the first Tab added to this pane it will become the active tab.
The Tab that is passed must not be 0 or it will be ignored. If the Tab is already a child of the TabbedPane that it is being added to, the operation fails. If the Tab is currently a child of another TabbedPane, it is removed as a child from that TabbedPane, and ownership is transferred to the new TabbedPane.
Parameters | |
---|---|
index |
The index where the Tab will be placed. If the index < 0 the the Tab is inserted as the first child. If the index > the number of children in the TabbedPane, it is added as the last child. |
tab |
The Tab to be inserted; must not be 0 or it will be ignored.. |
BlackBerry 10.0.0
bool
Indicates whether peeking from within the content area of the current Page is enabled.
However, peeking is always enabled on the Action bar, even if this property is disabled.
true if peeking is enabled, false otherwise.
BlackBerry 10.0.0
Q_INVOKABLE bool
Removes a Tab from the TabbedPane.
If the removed tab was the active tab, the activeTab property will be set to 0. If the content of the removed tab was the active pane, the activePane property will be set to 0.
Once the tab is removed, the TabbedPane no longer references it, but it is still owned by the TabbedPane. It is up to the application to either delete the removed tab, transfer its ownership (by setting its parent) to another object or leave it as a child of the TabbedPane (in which case it will be deleted with the TabbedPane).
Parameters | |
---|---|
tab |
The Tab to be removed; must not be 0. |
true if the Tab was a child of the TabbedPane, false otherwise.
BlackBerry 10.0.0
Q_INVOKABLE void
Removes all the tabs from the TabbedPane and deletes them.
Both activeTab and activePane properties will become 0 when this call is completed.
The tabRemoved() signal is emitted with 0 as its parameter.
BlackBerry 10.0.0
Q_SLOT void
Resets the peeking behavior of the TabbedPane to its default state, which is disabled.
Setting this property only controls whether or not peeking is enabled within the content area of the Page. Peeking is always enabled on the Action bar, even if this property is disabled.
BlackBerry 10.0.0
Q_SLOT void
Resets the showTabsOnActionBar property to its default value, which is 'false'.
The showTabsOnActionBarChanged() signal will be emitted if the property changed.
BlackBerry 10.0.0
Q_SLOT void
Resets the sidebarState property to its default value, which is 'Hidden'.
The sidebarStateChanged() signal will be emitted if property changed.
BlackBerry 10.0.0
void
Sets the active AbstractPane.
This method sets the pane to be displayed by this TabbedPane.
If the passed AbstractPane was already active or if it had a parent but did not belong to either this TabbedPane or one of its Tabs it is ignored. If 0 is passed no pane will be displayed.
The replaced pane (if one was set) will not change ownership and will continue to be owned by its parent.
The TabbedPane will only assume ownership of the passed pane if it doesn't already have a parent (which can only be either one of this TabbedPane's tabs or the TabbedPane itself).
The activePaneChanged() signal will be emitted if setting the new pane was successful.
Parameters | |
---|---|
activePane |
A pane to be set as the active pane or 0 |
BlackBerry 10.0.0
void
Sets the active Tab.
The activeTabChanged() signal will be emitted if the operation was successful. It will not be emitted if the Tab was already active.
Parameters | |
---|---|
activeTab |
The new active Tab. If tab is 0, if it doesn't belong to the TabbedPane, or if it already was active, nothing will happen. |
BlackBerry 10.0.0
Q_SLOT void
Sets whether peeking from within the current Page should be enabled.
Setting this property only controls whether or not peeking is enabled within the content area of the Page. Peeking is always enabled on the Action bar, even if this property is disabled.
Parameters | |
---|---|
enabled |
If true peeking be enabled, if false peeking is disabled. |
BlackBerry 10.0.0
Q_SLOT void
Sets the showTabsOnActionBar state, which specifies whether tabs take priority over actions on the Action bar.
The showTabsOnActionBarChanged() signal will be emitted if the property changed.
Parameters | |
---|---|
showTabsOnActionBar |
true if tabs should take priority over actions on the Action bar, otherwise false. |
BlackBerry 10.0.0
void
Specifies the current value of the sidebarState property.
The sidebarStateChanged() signal will be emitted if the value of the sidebarState property changed.
Parameters | |
---|---|
sidebarState |
The new SidebarState. |
BlackBerry 10.0.0
bool
Returns the showTabsOnActionBar state, which specifies whether tabs take priority over actions on the Action bar.
true if tabs should take priority over actions on the Action bar, otherwise false.
BlackBerry 10.0.0
bb::cascades::SidebarState::Type
Returns the current value of the sidebarState property.
The current state of the sidebar.
BlackBerry 10.0.0
bb::cascades::SidebarVisualState::Type
Returns the current visual state of the sidebar.
The current visual state of the sidebar.
BlackBerry 10.0.0
bb::cascades::AbstractA11yObject * 
Returns the accessibility object.
The accessibility object.
BlackBerry 10.2.0
Q_INVOKABLE void 
Adds a key listener to the AbstractPane.
AbstractPane will always take ownership as key listener should never be shared. If the key listener already belongs to the AbstractPane or the key listener is 0, nothing will happen.
Parameters | |
---|---|
keyListener |
The KeyListener to add to the AbstractPane. |
BlackBerry 10.1.0
Q_INVOKABLE void 
Adds a shortcut to the AbstractPane.
AbstractPane will always take ownership as shortcuts should never be shared. If the shortcut already belongs to the AbstractPane or the shortcut is 0, nothing will happen. The order in which shortcuts are added will determine which shortcut will be triggered in case of an overlap.
Parameters | |
---|---|
shortcut |
The AbstractShortcut to add to the AbstractPane. |
BlackBerry 10.1.0
Q_INVOKABLE bool 
Returns a builtInShortcutsEnabled property value.
true if builtInShortcutsEnabled property is set to true and false otherwise
BlackBerry 10.2.0
Q_INVOKABLE void 
Disables all shortcuts attached to the AbstractPane.
Shortcuts that are attached afterward will use the default enabled state.
BlackBerry 10.1.0
Q_INVOKABLE void 
Enables all shortcuts attached to the AbstractPane.
BlackBerry 10.1.0
virtual bool 
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 | |
---|---|
event |
The received event. |
True if the received event was recognized and processed, false otherwise.
BlackBerry 10.0.0
bool 
Indicates if this AbstractPane is being peeked at.
true if being peeked at, false otherwise.
BlackBerry 10.0.0
Q_INVOKABLE bb::cascades::KeyListener * 
Returns a key listener at the specified index.
Ownership of the key listener remains with the AbstractPane.
Parameters | |
---|---|
index |
The index of the key listener. |
The requested key listener if the index was valid, 0 otherwise.
BlackBerry 10.1.0
Q_INVOKABLE int 
Returns the number of key listeners.
The number of key listeners.
BlackBerry 10.1.0
bb::cascades::PaneProperties * 
Returns the PaneProperties object for the pane.
Ownership of the PaneProperties object remains unchanged.
The PaneProperties for the pane.
BlackBerry 10.0.0
Q_INVOKABLE void 
Removes all of AbstractPane's key listeners and frees up their memory.
BlackBerry 10.1.0
Q_INVOKABLE void 
Removes all of AbstractPane's shortcuts and frees up their memory.
BlackBerry 10.1.0
Q_INVOKABLE bool 
Removes a key listener from the AbstractPane.
Once the key listener is removed, the AbstractPane no longer references it, but it is still owned by the AbstractPane. It is up to the application to either delete the removed key listener, transfer its ownership (by setting its parent) to another object, or leave it as a child of the AbstractPane (in which case it will be deleted with the AbstractPane).
Parameters | |
---|---|
keyListener |
The KeyListener to remove. |
true if the key listener was owned by the AbstractPane, false otherwise.
BlackBerry 10.1.0
Q_INVOKABLE bool 
Removes a shortcut from the AbstractPane.
Once the shortcut is removed, the AbstractPane no longer references it, but it is still owned by the AbstractPane. It is up to the application to either delete the removed shortcut, transfer its ownership (by setting its parent) to another object, or leave it as a child of the AbstractPane (in which case it will be deleted with the AbstractPane).
Parameters | |
---|---|
shortcut |
The AbstractShortcut to remove. |
true if the shortcut was owned by the AbstractPane, false otherwise.
BlackBerry 10.1.0
Q_SLOT void 
Resets a builtInShortcutsEnabled property to default value.
Default value is true.
BlackBerry 10.2.0
Q_INVOKABLE void 
Sets the enabled state of the built-in shortcuts attached to the AbstractPane at a system level.
Built-in shortcuts that are attached afterward will use the specified enabled state.
Selected Built-in shortcut can be enabled or disbaled only if AbstractPane::builtInShortcutsEnabled property is set to true.
Parameters | |
---|---|
type |
The system shortcut type |
enabled |
If true the shortcut is enabled, and if false the shortcut is disabled. |
BlackBerry 10.2.0
Q_SLOT void 
Sets the enabled state of all built-in shortcut attached to the AbstractPane at a system level.
Parameters | |
---|---|
enabled |
If true all built-in shortcuts are enabled, and if false all shortcut are disabled. |
BlackBerry 10.2.0
void 
Sets the objectName property.
Parameters | |
---|---|
name |
The new name for the object. |
BlackBerry 10.0.0
Q_SLOT void 
Sets the paneProperties property for the pane.
The pane takes ownership of the PaneProperties object if no other pane owns it already. If the PaneProperties object already has an owner, the properties are applied to the pane, but ownership of the PaneProperties object remains unchanged. If the pane already owns a PaneProperties object, the existing settings are replaced by the specified PaneProperties object and the pane retains ownership of both.
Parameters | |
---|---|
paneProperties |
The new PaneProperties for the pane. |
BlackBerry 10.0.0
Q_INVOKABLE bb::cascades::AbstractShortcut * 
Returns a shortcut at the specified index.
Ownership of the shortcut remains with the AbstractPane.
Parameters | |
---|---|
index |
The index of the shortcut. |
The requested shortcut if the index was valid, 0 otherwise.
BlackBerry 10.1.0
Q_INVOKABLE int 
Returns the number of shortcuts.
The number of shortcuts.
BlackBerry 10.1.0
virtual Q_INVOKABLE QString 
Returns a debug string representing this object.
A debug string for the object.
BlackBerry 10.0.0
Q_INVOKABLE bb::cascades::UIConfig * 
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.
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));
The UIConfig for this ui object.
BlackBerry 10.3.0
Static Public Functions
Builder
Creates and returns a Builder for constructing a TabbedPane.
Using the builder model to create a TabbedPane with a page:
TabbedPane* tabbedPane = TabbedPane::create() .showTabsOnActionBar(true); .add(Tab::create() .title("My tab") .content(Page::create()) )
A builder for constructing a TabbedPane.
BlackBerry 10.0.0
Protected Functions
(Only has inherited protected functions)
Constructs an instance of BaseObject's subclass.
Parameters | |
---|---|
parent |
An optional parent, defaults to 0. |
BlackBerry 10.0.0
virtual void 
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. |
BlackBerry 10.0.0
virtual void 
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. |
BlackBerry 10.0.0
Signals
void
Emitted when the activePane property has changed.
Parameters | |
---|---|
activePane |
The new active AbstractPane. |
BlackBerry 10.0.0
void
Emitted when the transition to a new active pane has finished.
Parameters | |
---|---|
activePane |
The new active AbstractPane. |
BlackBerry 10.0.0
void
Emitted when the activeTab property has changed.
Parameters | |
---|---|
activeTab |
The new active Tab. |
BlackBerry 10.0.0
void
Emitted when peeking on the TabbedPane is enabled or disabled.
Parameters | |
---|---|
enabled |
If true peeking is enabled, if false peeking is disabled. |
BlackBerry 10.0.0
void
Emitted when the showTabsOnActionBar property has changed.
Parameters | |
---|---|
showTabsOnActionBar |
The new value of the showTabsOnActionBar property. |
BlackBerry 10.0.0
void
Emitted when sidebarState property changed.
Due to a work around for a Qt Core issue with accessing enums from QML the argument of this signal doesn't follow naming convention for signals in which the signal arguments are typically named to match the associated property's name. Use the object's property to access current property value instead of the signal argument to avoid runtime errors (i.e. use sidebarState instead of newSidebarState).
Parameters | |
---|---|
newSidebarState |
The new value of the sidebarState property. |
BlackBerry 10.0.0
void
Emitted when sidebarVisualState property changed.
Due to a work around for a Qt Core issue with accessing enums from QML the argument of this signal doesn't follow naming convention for signals in which the signal arguments are typically named to match the associated property's name. Use the object's property to access current property value instead of the signal argument to avoid runtime errors (i.e. use sidebarVisualState instead of newSidebarVisualState).
Parameters | |
---|---|
newSidebarVisualState |
The new value of the sidebarVisualState property. |
BlackBerry 10.0.0
void
Emitted when a Tab has been added to the TabbedPane.
Parameters | |
---|---|
tab |
The Tab that has been added. |
BlackBerry 10.0.0
void
Emitted when a Tab has been removed from the TabbedPane.
Parameters | |
---|---|
tab |
The Tab that has been removed. 0 if emitted by removeAll(). |
BlackBerry 10.0.0
void 
Emitted when the builtInShortcutsEnabled property changes.
Parameters | |
---|---|
builtInShortcutsEnabled |
The new value. |
BlackBerry 10.2.0
void 
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.
BlackBerry 10.0.0
void 
This signal is emitted when the objectName property is changed.
BlackBerry 10.0.0
void 
Emitted when the paneProperties of the pane changes.
Parameters | |
---|---|
paneProperties |
The new PaneProperties for the AbstractPane. |
BlackBerry 10.0.0
void 
Emitted when the peekedAt property of this AbstractPane changes.
Parameters | |
---|---|
peekedAt |
If true the AbstractPane is being peeked at, otherwise false. |
BlackBerry 10.0.0
void 
Emitted when a peek on this AbstractPane ends.
BlackBerry 10.0.0
void 
Emitted when a peek on this AbstractPane starts.
BlackBerry 10.0.0