summaryrefslogtreecommitdiff
path: root/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTabBar.qml
blob: ca8fb64eccfd012a46c16e62024963b0af96e94f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

import QtQuick
import HelperWidgets 2.0 as HelperWidgets
import StudioControls 1.0 as StudioControls
import StudioTheme 1.0 as StudioTheme

Row {
    id: root

    property int currIndex: 0
    property alias tabsModel: repeater.model

    spacing: 6

    Repeater {
        id: repeater

        ContentLibraryTabButton {
            required property int index
            required property var modelData
            name: modelData.name
            icon: modelData.icon
            selected: root.currIndex === index
            onClicked: root.currIndex = index
        }
    }
}