2023-08-17 15:59:46 +03:00
|
|
|
// Copyright (C) 2023 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
|
|
|
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import HelperWidgets as HelperWidgets
|
|
|
|
|
import StudioControls as StudioControls
|
2024-01-16 12:30:29 +01:00
|
|
|
import StudioTheme as StudioTheme
|
2024-01-26 14:55:50 +02:00
|
|
|
import EffectComposerBackend
|
2023-08-17 15:59:46 +03:00
|
|
|
|
|
|
|
|
HelperWidgets.Section {
|
|
|
|
|
id: root
|
|
|
|
|
|
2023-11-20 17:38:25 +02:00
|
|
|
property int modelIndex: 0
|
|
|
|
|
|
2023-11-02 12:43:59 +02:00
|
|
|
caption: nodeName
|
2024-01-26 14:55:50 +02:00
|
|
|
category: "EffectComposer"
|
2023-08-17 15:59:46 +03:00
|
|
|
|
2023-12-07 18:32:55 +02:00
|
|
|
draggable: !isDependency
|
2023-09-04 14:17:01 +03:00
|
|
|
fillBackground: true
|
2023-12-07 18:32:55 +02:00
|
|
|
showCloseButton: !isDependency
|
2023-08-29 16:24:43 +03:00
|
|
|
closeButtonToolTip: qsTr("Remove")
|
2023-12-07 18:32:55 +02:00
|
|
|
visible: repeater.count > 0 || !isDependency
|
2023-09-04 14:17:01 +03:00
|
|
|
|
2023-08-29 16:24:43 +03:00
|
|
|
onCloseButtonClicked: {
|
2024-01-26 14:55:50 +02:00
|
|
|
EffectComposerBackend.effectComposerModel.removeNode(root.modelIndex)
|
2023-09-06 15:18:02 +03:00
|
|
|
}
|
|
|
|
|
|
2023-12-07 18:32:55 +02:00
|
|
|
showEyeButton: !isDependency
|
2023-11-02 12:43:59 +02:00
|
|
|
eyeEnabled: nodeEnabled
|
2023-09-06 15:18:02 +03:00
|
|
|
eyeButtonToolTip: qsTr("Enable/Disable Node")
|
|
|
|
|
|
|
|
|
|
onEyeButtonClicked: {
|
2023-11-02 12:43:59 +02:00
|
|
|
nodeEnabled = root.eyeEnabled
|
2023-08-29 16:24:43 +03:00
|
|
|
}
|
|
|
|
|
|
2023-08-17 15:59:46 +03:00
|
|
|
Column {
|
2023-08-21 11:52:11 +03:00
|
|
|
spacing: 10
|
|
|
|
|
|
|
|
|
|
Repeater {
|
2023-12-07 18:32:55 +02:00
|
|
|
id: repeater
|
2023-11-02 12:43:59 +02:00
|
|
|
model: nodeUniformsModel
|
2023-08-17 15:59:46 +03:00
|
|
|
|
2023-08-21 11:52:11 +03:00
|
|
|
EffectCompositionNodeUniform {
|
|
|
|
|
width: root.width
|
2024-03-19 14:52:20 +02:00
|
|
|
|
|
|
|
|
onReset: nodeUniformsModel.resetData(index)
|
2023-08-21 11:52:11 +03:00
|
|
|
}
|
|
|
|
|
}
|
2023-08-17 15:59:46 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|