NavigationTabBar

Search for usage in LXR

NavigationTabBar Class Reference

Properties

listTAction actions
 
real buttonWidth
 
int count
 
int currentIndex
 
real maximumContentWidth
 
TButtonGroup tabGroup
 
listTAction visibleActions
 

Detailed Description

Page navigation tab-bar, used as an alternative to sidebars for 3-5 elements.

Can be combined with secondary toolbars above (if in the footer) to provide page actions.

Example usage:

import QtQuick
import org.kde.kirigami as Kirigami
Kirigami.ApplicationWindow {
title: "Clock"
pageStack.initialPage: worldPage
Kirigami.Page {
id: worldPage
title: "World"
visible: false
}
Kirigami.Page {
id: timersPage
title: "Timers"
visible: false
}
Kirigami.Page {
id: stopwatchPage
title: "Stopwatch"
visible: false
}
Kirigami.Page {
id: alarmsPage
title: "Alarms"
visible: false
}
footer: Kirigami.NavigationTabBar {
Kirigami.Action {
icon.name: "globe"
text: "World"
checked: worldPage.visible
onTriggered: {
if (!worldPage.visible) {
while (pageStack.depth > 0) {
pageStack.pop();
}
pageStack.push(worldPage);
}
}
},
Kirigami.Action {
icon.name: "player-time"
text: "Timers"
checked: timersPage.visible
onTriggered: {
if (!timersPage.visible) {
while (pageStack.depth > 0) {
pageStack.pop();
}
pageStack.push(timersPage);
}
}
},
Kirigami.Action {
icon.name: "chronometer"
text: "Stopwatch"
checked: stopwatchPage.visible
onTriggered: {
if (!stopwatchPage.visible) {
while (pageStack.depth > 0) {
pageStack.pop();
}
pageStack.push(stopwatchPage);
}
}
},
Kirigami.Action {
icon.name: "notifications"
text: "Alarms"
checked: alarmsPage.visible
onTriggered: {
if (!alarmsPage.visible) {
while (pageStack.depth > 0) {
pageStack.pop();
}
pageStack.push(alarmsPage);
}
}
}
]
}
}
listTAction actions
This property holds the list of actions to be displayed in the toolbar.
See also
NavigationTabButton
Since
5.87
org.kde.kirigami 2.19

Definition at line 112 of file NavigationTabBar.qml.

Property Documentation

◆ actions

listTAction NavigationTabBar::actions
read

This property holds the list of actions to be displayed in the toolbar.

Definition at line 118 of file NavigationTabBar.qml.

◆ buttonWidth

real NavigationTabBar::buttonWidth
read

This property holds the calculated width that buttons on the tab bar use.

Since
5.102

Definition at line 154 of file NavigationTabBar.qml.

◆ count

int NavigationTabBar::count
read

This property holds the number of tab buttons.

Remarks
This property is read-only

Definition at line 143 of file NavigationTabBar.qml.

◆ currentIndex

int NavigationTabBar::currentIndex
read

This property holds the index of currently checked tab.

If the index set is out of bounds, or the triggered signal did not change any checked property of an action, the index will remain the same.

Definition at line 138 of file NavigationTabBar.qml.

◆ maximumContentWidth

real NavigationTabBar::maximumContentWidth
read

The property holds the maximum width of the toolbar actions, before margins are added.

Definition at line 131 of file NavigationTabBar.qml.

◆ tabGroup

TButtonGroup NavigationTabBar::tabGroup
read

This property holds the ButtonGroup used to manage the tabs.

Remarks
This property is read-only

Definition at line 148 of file NavigationTabBar.qml.

◆ visibleActions

listTAction NavigationTabBar::visibleActions
read

This property holds a subset of visible actions of the list of actions.

An action is considered visible if it is either a Kirigami.Action with visible property set to true, or it is a plain QQC2.Action.

Remarks
This property is read-only

Definition at line 126 of file NavigationTabBar.qml.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:21 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.