TabbedPane
#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!"
}
}
BlackBerry 10.0.0
Inheritance
| bb::cascades::BaseObject | ||||
| bb::cascades::UIObject | ||||
| bb::cascades::AbstractPane | ||||
| bb::cascades::TabbedPane | ||||
QML properties
| tabs | : QDeclarativeListProperty< bb::cascades::Tab > [read-only] |
| activeTab | : bb::cascades::Tab |
| activePane | : bb::cascades::AbstractPane |
| showTabsOnActionBar | : bool |
| sidebarState | : bb::cascades::SidebarState::Type |
| peekEnabled | : bool |
| sidebarVisualState | : bb::cascades::SidebarVisualState::Type [read-only] |
| accessibility | : bb::cascades::AbstractAccessibilityObject [read-only] |
| attachedObjects | : QDeclarativeListProperty< QObject > [read-only] |
| keyListeners | : QDeclarativeListProperty< bb::cascades::KeyListener > [read-only] |
| objectName | : QString |
| paneProperties | : bb::cascades::PaneProperties |
| parent | : QObject [read-only] |
| peekedAt | : bool [read-only] |
| shortcuts | : QDeclarativeListProperty< bb::cascades::AbstractShortcut > [read-only] |
QML signals
Properties Index
| QDeclarativeListProperty< bb::cascades::Tab > | tabs [read-only] |
| bb::cascades::Tab | activeTab |
| bb::cascades::AbstractPane | activePane |
| bool | showTabsOnActionBar |
| bb::cascades::SidebarState::Type | sidebarState |
| bool | peekEnabled |
| bb::cascades::SidebarVisualState::Type | sidebarVisualState [read-only] |
| bb::cascades::AbstractAccessibilityObject | accessibility [read-only] |
| QDeclarativeListProperty< QObject > | attachedObjects [read-only] |
| QDeclarativeListProperty< bb::cascades::KeyListener > | keyListeners [read-only] |
| QString | objectName |
| bb::cascades::PaneProperties | paneProperties |
| QObject | parent [read-only] |
| bool | peekedAt [read-only] |
| QDeclarativeListProperty< bb::cascades::AbstractShortcut > | shortcuts [read-only] |
Public Functions Index
| TabbedPane (QObject *parent=0) | |
| virtual | ~TabbedPane () |
| bb::cascades::SidebarState::Type | sidebarState () const |
| void | setSidebarState (bb::cascades::SidebarState::Type sidebarState) |
| Q_SLOT void | resetSidebarState () |
| bb::cascades::Tab * | activeTab () const |
| void | setActiveTab (bb::cascades::Tab *activeTab) |
| bb::cascades::AbstractPane * | activePane () const |
| void | setActivePane (bb::cascades::AbstractPane *activePane) |
| Q_INVOKABLE void | add (bb::cascades::Tab *tab) |
| Q_INVOKABLE void | insert (int index, bb::cascades::Tab *tab) |
| Q_INVOKABLE bb::cascades::Tab * | at (int index) const |
| Q_INVOKABLE int | indexOf (bb::cascades::Tab *tab) const |
| Q_INVOKABLE int | count () const |
| Q_INVOKABLE bool | remove (bb::cascades::Tab *tab) |
| Q_INVOKABLE void | removeAll () |
| bool | showTabsOnActionBar () const |
| Q_SLOT void | setShowTabsOnActionBar (bool showTabsOnActionBar) |
| Q_SLOT void | resetShowTabsOnActionBar () |
| bool | isPeekEnabled () const |
| Q_SLOT void | setPeekEnabled (bool enabled) |
| Q_SLOT void | resetPeekEnabled () |
| bb::cascades::SidebarVisualState::Type | sidebarVisualState () const |
| bb::cascades::AbstractAccessibilityObject * | accessibility () const |
| Q_INVOKABLE void | addKeyListener (bb::cascades::KeyListener *keyListener) |
| Q_INVOKABLE void | addShortcut (bb::cascades::AbstractShortcut *shortcut) |
| 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 | resetPaneProperties () |
| 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 |
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 | activeTabChanged (bb::cascades::Tab *activeTab) |
| void | activePaneChanged (bb::cascades::AbstractPane *activePane) |
| void | activePaneTransitionEnded (bb::cascades::AbstractPane *activePane) |
| void | tabAdded (bb::cascades::Tab *tab) |
| void | tabRemoved (bb::cascades::Tab *tab) |
| void | showTabsOnActionBarChanged (bool showTabsOnActionBar) |
| void | sidebarStateChanged (bb::cascades::SidebarState::Type newSidebarState) |
| void | peekEnabledChanged (bool enabled) |
| void | sidebarVisualStateChanged (bb::cascades::SidebarVisualState::Type newSidebarVisualState) |
| void | creationCompleted () |
| void | objectNameChanged (const QString &objectName) |
| void | panePropertiesChanged (bb::cascades::PaneProperties *paneProperties) |
| void | peekedAtChanged (bool peekedAt) |
| void | peekEnded () |
| void | peekStarted () |
Properties
QDeclarativeListProperty< bb::cascades::Tab >
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
bb::cascades::Tab
The Tab that is currently active in the TabbedPane.
The active tab is 0 of the TabbedPane doesn't have any children.
The activeTabChanged() signal is emitted when this property changes.
BlackBerry 10.0.0
bb::cascades::AbstractPane
The AbstractPane which is currently being shown by the TabbedPane.
The active pane is 0 of the TabbedPane doesn't have any children or there is no pane currently being displayed.
The value of this property may not match the value of the currently active tab's Tab::content property: if active Tab's content is 0 the active pane will not change.
when a new Tab with a non-0 Tab::content property becomes active the value this property will become the active Tab's content. If new active tab's content 0 this property doesn't change.
when a new active pane is set explicitly. An active pane may belong to one of the Tabs or be a separate pane belonging to the TabbedPane, or be 0.
when a Tab the active pane belonged to is removed
Here is how this property can be used to define common pane which will not change when active tab changes
TabbedPane {
showTabsOnActionBar: true
// there is only one content page, and it is explicitly
// set to be the active pane of this TabbedPane
activePane:
Page {
Label {
id: label
text: "Default"
}
}
Tab {
title: "Tab 1"
onTriggered: {
// change some content in the activePane
label.text = "Tab 1 Label";
}
}
Tab {
title: "Tab 2"
onTriggered: {
label.text = "Tab 2 Label";
}
}
}
If the more than one pane needs to be displayed:
TabbedPane {
id: tabbed
showTabsOnActionBar: true
// the first two tabs share their page and only change
// the content of a label
Tab {
id: firstTab
title: "Tab 1"
onTriggered: {
tabbed.activePane = defaultPane;
label.text = "Tab 1 Label";
}
}
Tab {
title: "Tab 2"
onTriggered: {
tabbed.activePane = defaultPane;
label.text = "Tab 2 Label";
}
}
// the third tab has its own pane which will be automatically
// set as the active pane when the tab becomes active
Tab {
title: "Tab 3"
Page {
Label {
text: "Tab 3 Label"
}
}
}
attachedObjects: [
Page {
id: defaultPane
Label {
id: label
text: "Default"
}
}
]
}
The activePaneChanged() signal is emitted when this property changes. The default value of this property is 0 .
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
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
bb::cascades::SidebarVisualState::Type
The current visual state of the sidebar.
BlackBerry 10.0.0
bb::cascades::AbstractAccessibilityObject
Defines this UIObject's accessibility object used by assistive technologies for people with disabilities or special needs, e.g.
QDeclarativeListProperty< QObject >
A hierarchical list of the UIObject's attached objects.
This QDeclarativeListProperty can contain any QObject. When a QObject is added to property, the UIObject takes ownership of the attached object.
This feature is typically used from QML to specify business logic object or any other shared objects for the subnodes of this UIObject. In C++ the same functionality can be achived by setting a parent of a QObject to be attached to the QObject which is going to own it.
QML usage example (MyObject is a custom class registered for QML using the qmlRegisterType() function):
Container {
Label { text: "Title: " + myObject.title }
Label { text: "Subject: " + myObject.subject }
attachedObjects: [
MyObject { id: myObject
title: "Hello World"
subject: "Nice Day"
}
]
}
BlackBerry 10.0.0
QDeclarativeListProperty< bb::cascades::KeyListener >
A list of key listeners attached to this abstract pane.
The order in which key listeners are added does not change their behavior.
BlackBerry 10.1.0
QString
This property is overridden from QObject.
As the objectName property is overridden from the QObject class, this signal will not be emitted if setObjectName() function is called directly on QObject.
The default value of this property is QString::null.
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
QDeclarativeListProperty< bb::cascades::AbstractShortcut >
A list of shortcuts that can be triggered via user actions.
The order in which they are added will determine which shortcut will be triggered in case of an overlap. Predefined shortcuts take precedence over shortcuts defined via QString in case of a collision.
BlackBerry 10.1.0
Public Functions
Constructs the TabbedPane.
BlackBerry 10.0.0
virtual
Destructor.
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
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
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
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
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
bb::cascades::AbstractPane *
Returns the currently active AbstractPane.
The active AbstractPane or 0 if one isn't currently being displayed.
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
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 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
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 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 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 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
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
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
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
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_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
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
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::AbstractAccessibilityObject * 
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 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
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
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 activeTab property has changed.
| Parameters | |
|---|---|
| activeTab |
The new active Tab. |
BlackBerry 10.0.0
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 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 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 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 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 
This signal is emitted only when this object is instantiated as a result of loading a QML document and creating the root node, or when an object is being constructed using its builder class.
This signal is emitted only 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 is emitted to indicate 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