PageHeadButton {
id: tabsButton
objectName: "tabsButton"
iconName: "navigation-menu"
visible: styledItem.tabsModel !== null &&
styledItem.tabsModel !== undefined &&
!backButton.visible &&
!customBackButton.visible
text: visible ? styledItem.tabsModel.count + " tabs" : ""
color: headerStyle.buttonColor
onTriggered: PopupUtils.open(tabsPopoverComponent, tabsButton)
Component {
id: tabsPopoverComponent
OverflowPanel {
id: tabsPopover
objectName: "tabsPopover"
actions: actionsFromTabs(styledItem.tabsModel)
function getActionFromTab(tab) {
return tab.__protected.action;
}
function actionsFromTabs(tabsList) {
var result = [];
var tab;
for (var i=0; i < tabsList.count; i++) {
tab = tabsList.get(i).tab;
result.push(getActionFromTab(tab));
}
return result;
}
backgroundColor: headerStyle.panelBackgroundColor
foregroundColor: headerStyle.panelForegroundColor
highlightColor: headerStyle.panelHighlightColor
}
}
}