2023-06-29 15:06:11 +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 QtQuickDesignerTheme
|
|
|
|
|
import HelperWidgets
|
|
|
|
|
import StudioControls as StudioControls
|
|
|
|
|
import StudioTheme 1.0 as StudioTheme
|
|
|
|
|
import EffectMakerBackend
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: root
|
|
|
|
|
|
2023-08-15 15:40:46 +03:00
|
|
|
width: 140
|
2023-09-04 14:17:01 +03:00
|
|
|
height: 32
|
2023-06-29 15:06:11 +03:00
|
|
|
|
2023-08-15 15:40:46 +03:00
|
|
|
color: mouseArea.containsMouse ? StudioTheme.Values.themeControlBackgroundInteraction
|
|
|
|
|
: "transparent"
|
2023-06-29 15:06:11 +03:00
|
|
|
|
2023-08-17 13:41:27 +03:00
|
|
|
signal addEffectNode(var nodeQenPath)
|
|
|
|
|
|
2023-06-29 15:06:11 +03:00
|
|
|
MouseArea {
|
|
|
|
|
id: mouseArea
|
|
|
|
|
|
|
|
|
|
anchors.fill: parent
|
2023-08-15 15:40:46 +03:00
|
|
|
hoverEnabled: true
|
|
|
|
|
acceptedButtons: Qt.LeftButton
|
2023-06-29 15:06:11 +03:00
|
|
|
|
2023-08-15 15:40:46 +03:00
|
|
|
onClicked: {
|
2023-08-17 13:41:27 +03:00
|
|
|
root.addEffectNode(modelData.nodeQenPath)
|
2023-06-29 15:06:11 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-15 15:40:46 +03:00
|
|
|
Row {
|
|
|
|
|
spacing: 5
|
2023-06-29 15:06:11 +03:00
|
|
|
|
2023-08-15 15:40:46 +03:00
|
|
|
IconImage {
|
|
|
|
|
id: nodeIcon
|
2023-06-29 15:06:11 +03:00
|
|
|
|
2023-09-04 14:17:01 +03:00
|
|
|
width: 32
|
|
|
|
|
height: 32
|
2023-08-15 15:40:46 +03:00
|
|
|
|
|
|
|
|
color: StudioTheme.Values.themeTextColor
|
|
|
|
|
source: modelData.nodeIcon
|
|
|
|
|
}
|
2023-06-29 15:06:11 +03:00
|
|
|
|
2023-08-15 15:40:46 +03:00
|
|
|
Text {
|
|
|
|
|
text: modelData.nodeName
|
|
|
|
|
color: StudioTheme.Values.themeTextColor
|
|
|
|
|
font.pointSize: StudioTheme.Values.smallFontSize
|
|
|
|
|
anchors.verticalCenter: nodeIcon.verticalCenter
|
2023-06-29 15:06:11 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|