2019-12-19 22:46:16 +11:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
2019-12-07 23:56:32 +11:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
|
|
|
|
HColumnLayout {
|
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
|
Layout.fillWidth: false
|
|
|
|
Layout.fillHeight: false
|
2019-12-08 01:59:43 +11:00
|
|
|
Layout.maximumWidth: parent.width
|
2019-12-07 23:56:32 +11:00
|
|
|
|
|
|
|
property alias tabIndex: tabBar.currentIndex
|
|
|
|
property alias tabModel: tabRepeater.model
|
2019-12-10 00:29:57 +11:00
|
|
|
default property alias data: swipeView.contentData
|
2019-12-07 23:56:32 +11:00
|
|
|
|
|
|
|
HTabBar {
|
|
|
|
id: tabBar
|
|
|
|
Component.onCompleted: shortcuts.tabsTarget = this
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
id: tabRepeater
|
|
|
|
HTabButton { text: modelData }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SwipeView {
|
|
|
|
id: swipeView
|
|
|
|
clip: true
|
|
|
|
currentIndex: tabBar.currentIndex
|
|
|
|
interactive: false
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
Behavior on implicitWidth { HNumberAnimation {} }
|
|
|
|
Behavior on implicitHeight { HNumberAnimation {} }
|
|
|
|
}
|
|
|
|
}
|