2022-11-17 12:54:19 +02:00
|
|
|
// Copyright (C) 2022 The Qt Company Ltd.
|
2023-01-04 08:52:22 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2022-11-17 12:54:19 +02:00
|
|
|
|
2023-08-25 16:53:39 +02:00
|
|
|
import QtQuick
|
2024-01-16 12:30:29 +01:00
|
|
|
import HelperWidgets
|
2022-11-17 12:54:19 +02:00
|
|
|
|
|
|
|
|
PropertyEditorPane {
|
|
|
|
|
id: itemPane
|
|
|
|
|
|
2023-08-24 13:41:55 +03:00
|
|
|
width: 420
|
|
|
|
|
height: 420
|
|
|
|
|
|
2022-11-17 12:54:19 +02:00
|
|
|
signal toolBarAction(int action)
|
|
|
|
|
|
|
|
|
|
// invoked from C++ to refresh material preview image
|
|
|
|
|
function refreshPreview()
|
|
|
|
|
{
|
|
|
|
|
topSection.refreshPreview()
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-28 15:49:22 +03:00
|
|
|
// Called from C++ to close context menu on focus out
|
2022-11-17 12:54:19 +02:00
|
|
|
function closeContextMenu()
|
|
|
|
|
{
|
2023-03-28 15:49:22 +03:00
|
|
|
Controller.closeContextMenu()
|
2022-11-17 12:54:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TextureEditorTopSection {
|
|
|
|
|
id: topSection
|
|
|
|
|
|
|
|
|
|
onToolBarAction: (action) => itemPane.toolBarAction(action)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Item { width: 1; height: 10 }
|
|
|
|
|
|
|
|
|
|
DynamicPropertiesSection {
|
|
|
|
|
propertiesModel: TextureEditorDynamicPropertiesModel {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
|
id: specificsTwo
|
|
|
|
|
|
|
|
|
|
property string theSource: specificQmlData
|
|
|
|
|
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
2023-08-25 16:53:39 +02:00
|
|
|
visible: specificsTwo.theSource !== ""
|
2022-11-17 12:54:19 +02:00
|
|
|
sourceComponent: specificQmlComponent
|
|
|
|
|
|
|
|
|
|
onTheSourceChanged: {
|
2023-08-25 16:53:39 +02:00
|
|
|
specificsTwo.active = false
|
|
|
|
|
specificsTwo.active = true
|
2022-11-17 12:54:19 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
width: 1
|
|
|
|
|
height: 10
|
|
|
|
|
visible: specificsTwo.visible
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
|
id: specificsOne
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
source: specificsUrl
|
|
|
|
|
}
|
|
|
|
|
}
|