2022-11-17 12:54:19 +02:00
|
|
|
// Copyright (C) 2022 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
|
|
|
|
|
|
|
|
|
import QtQuick
|
|
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
signal toolBarAction(int action)
|
|
|
|
|
|
|
|
|
|
function refreshPreview()
|
|
|
|
|
{
|
|
|
|
|
texturePreview.source = ""
|
2022-11-24 17:30:12 +02:00
|
|
|
texturePreview.source = "image://qmldesigner_thumbnails/" + resolveResourcePath(backendValues.source.valueToString)
|
2022-11-17 12:54:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
TextureEditorToolBar {
|
|
|
|
|
width: root.width
|
|
|
|
|
|
|
|
|
|
onToolBarAction: (action) => root.toolBarAction(action)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Item { width: 1; height: 10 } // spacer
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: previewRect
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
width: 152
|
|
|
|
|
height: 152
|
|
|
|
|
color: "#000000"
|
|
|
|
|
|
|
|
|
|
Image {
|
|
|
|
|
id: texturePreview
|
2022-11-24 17:30:12 +02:00
|
|
|
asynchronous: true
|
2022-11-17 12:54:19 +02:00
|
|
|
sourceSize.width: 150
|
|
|
|
|
sourceSize.height: 150
|
|
|
|
|
anchors.centerIn: parent
|
2022-11-24 17:30:12 +02:00
|
|
|
source: "image://qmldesigner_thumbnails/" + resolveResourcePath(backendValues.source.valueToString)
|
2022-11-17 12:54:19 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|