2024-11-13 18:58:30 +02:00
|
|
|
// Copyright (C) 2024 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
|
|
|
|
import QtQuick
|
2024-11-17 00:29:04 +02:00
|
|
|
import QtQuick.Layouts
|
2024-11-17 07:36:01 +02:00
|
|
|
import StudioControls as StudioControls
|
2024-11-13 18:58:30 +02:00
|
|
|
import StudioTheme as StudioTheme
|
|
|
|
|
|
|
|
Rectangle {
|
2024-11-17 07:36:01 +02:00
|
|
|
id: root
|
|
|
|
|
2024-11-27 16:30:22 +02:00
|
|
|
property var rootEditor: shaderEditor
|
2024-11-17 07:36:01 +02:00
|
|
|
|
2024-11-13 18:58:30 +02:00
|
|
|
color: StudioTheme.Values.themeToolbarBackground
|
|
|
|
|
2024-11-17 00:29:04 +02:00
|
|
|
ColumnLayout {
|
2024-11-13 18:58:30 +02:00
|
|
|
anchors.fill: parent
|
2024-11-17 00:29:04 +02:00
|
|
|
|
|
|
|
RowLayout {
|
2024-11-26 18:35:47 +02:00
|
|
|
Layout.topMargin: StudioTheme.Values.toolbarVerticalMargin
|
|
|
|
Layout.leftMargin: StudioTheme.Values.toolbarHorizontalMargin
|
|
|
|
Layout.rightMargin: StudioTheme.Values.toolbarHorizontalMargin
|
|
|
|
|
|
|
|
StudioControls.TopLevelComboBox {
|
|
|
|
id: nodesComboBox
|
|
|
|
style: StudioTheme.Values.toolbarStyle
|
|
|
|
Layout.preferredWidth: 400
|
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
model: editableCompositionsModel
|
|
|
|
textRole: "display"
|
|
|
|
Binding on currentIndex {
|
|
|
|
value: editableCompositionsModel.selectedIndex
|
|
|
|
}
|
|
|
|
onActivated: (idx) => {
|
|
|
|
editableCompositionsModel.openCodeEditor(idx)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-11-17 00:29:04 +02:00
|
|
|
Item { // Spacer
|
|
|
|
Layout.preferredHeight: 1
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
|
|
|
|
ColumnChooser {
|
|
|
|
table: uniformsView.tableView
|
2024-11-17 07:36:01 +02:00
|
|
|
text: qsTr("Columns")
|
|
|
|
style: StudioTheme.Values.viewBarControlStyle
|
2024-11-26 18:35:47 +02:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
2024-11-17 07:36:01 +02:00
|
|
|
}
|
2024-11-17 00:29:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
CodeEditorUniformsView {
|
|
|
|
id: uniformsView
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
model: uniformsTableModel
|
|
|
|
}
|
2024-11-13 18:58:30 +02:00
|
|
|
}
|
|
|
|
}
|