aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator
diff options
context:
space:
mode:
authorMahmoud Badri <mahmoud.badri@qt.io>2024-04-09 17:50:11 +0300
committerMahmoud Badri <mahmoud.badri@qt.io>2024-04-16 14:01:58 +0000
commit4591293fd9103a57d611b64b9e2daa976cad594e (patch)
treeae5dc42862d72cb65f3073c00c3750b98c6f2eb5 /share/qtcreator
parentece3a60cfad87928342902021f94d0b1fd869801 (diff)
QmlDesigner: Add user texture bundle
Fixes: QDS-12390 Change-Id: I512a8748bbb6a282589f05293507c110162e7f1d Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'share/qtcreator')
-rw-r--r--share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml33
1 files changed, 25 insertions, 8 deletions
diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml
index d3d1dbad92..47d3c6ce77 100644
--- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml
+++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
import QtQuick
+import Qt.labs.qmlmodels
import HelperWidgets as HelperWidgets
import StudioControls as StudioControls
import StudioTheme as StudioTheme
@@ -99,17 +100,33 @@ HelperWidgets.ScrollView {
id: repeater
model: categoryItems
- delegate: ContentLibraryMaterial {
- width: root.cellWidth
- height: root.cellHeight
+ delegate: DelegateChooser {
+ role: "itemType"
- importerRunning: ContentLibraryBackend.userModel.importerRunning
+ DelegateChoice {
+ roleValue: "material"
+ ContentLibraryMaterial {
+ width: root.cellWidth
+ height: root.cellHeight
- onShowContextMenu: ctxMenu.popupMenu(modelData)
- onAddToProject: ContentLibraryBackend.userModel.addToProject(modelData)
+ importerRunning: ContentLibraryBackend.userModel.importerRunning
- onVisibleChanged: {
- section.numVisibleItem += visible ? 1 : -1
+ onShowContextMenu: ctxMenu.popupMenu(modelData)
+ onAddToProject: ContentLibraryBackend.userModel.addToProject(modelData)
+
+ onVisibleChanged: {
+ section.numVisibleItem += visible ? 1 : -1
+ }
+ }
+ }
+ DelegateChoice {
+ roleValue: "texture"
+ delegate: ContentLibraryTexture {
+ width: root.cellWidth
+ height: root.cellHeight
+
+ // onShowContextMenu: ctxMenu.popupMenu(modelData) // TODO
+ }
}
}