Files
qt-creator/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorPane.qml
Henning Gruendl b2ee8acafa QmlDesigner: Add QML views transient scrollbars
* Add transient scrollbars to all QML based views
* Remove version from QtQuick imports
* Fix missing AssetsLibraryBackend reference in AssetsDelegate

Task-number: QDS-9549
Change-Id: I7ab2e52106efae07caa37763b5b0592cfbf57c2e
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-01 13:54:14 +00:00

81 lines
1.9 KiB
QML

// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
import QtQuick
import QtQuickDesignerTheme 1.0
import HelperWidgets 2.0
PropertyEditorPane {
id: itemPane
width: 420
height: 420
signal toolBarAction(int action)
signal previewEnvChanged(string env)
signal previewModelChanged(string model)
// invoked from C++ to refresh material preview image
function refreshPreview()
{
topSection.refreshPreview()
}
// Called from C++ to close context menu on focus out
function closeContextMenu()
{
topSection.closeContextMenu()
Controller.closeContextMenu()
}
// Called from C++ to initialize preview menu checkmarks
function initPreviewData(env, model)
{
topSection.previewEnv = env;
topSection.previewModel = model
}
MaterialEditorTopSection {
id: topSection
onToolBarAction: (action) => itemPane.toolBarAction(action)
onPreviewEnvChanged: itemPane.previewEnvChanged(previewEnv)
onPreviewModelChanged: itemPane.previewModelChanged(previewModel)
}
Item { width: 1; height: 10 }
DynamicPropertiesSection {
propertiesModel: MaterialEditorDynamicPropertiesModel {}
}
Loader {
id: specificsTwo
property string theSource: specificQmlData
anchors.left: parent.left
anchors.right: parent.right
visible: specificsTwo.theSource !== ""
sourceComponent: specificQmlComponent
onTheSourceChanged: {
specificsTwo.active = false
specificsTwo.active = true
}
}
Item {
width: 1
height: 10
visible: specificsTwo.visible
}
Loader {
id: specificsOne
anchors.left: parent.left
anchors.right: parent.right
source: specificsUrl
}
}