QmlDesigner: Rename effect maker plugin files to effect composer
Change-Id: I1d09c1088b4067a479f2e7cc396a348f1b48614f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
@@ -201,7 +201,7 @@ TreeViewDelegate {
|
||||
mouseArea.allowTooltip = false
|
||||
AssetsLibraryBackend.tooltipBackend.hideTooltip()
|
||||
if (mouse.button === Qt.LeftButton && root.isEffect)
|
||||
AssetsLibraryBackend.rootView.openEffectMaker(filePath)
|
||||
AssetsLibraryBackend.rootView.openEffectComposer(filePath)
|
||||
}
|
||||
|
||||
ToolTip {
|
||||
|
||||
@@ -7,7 +7,7 @@ import QtQuick.Layouts
|
||||
import HelperWidgets as HelperWidgets
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@@ -23,15 +23,15 @@ Item {
|
||||
|
||||
// Invoked from C++ side when open composition is requested and there are unsaved changes
|
||||
function promptToSaveBeforeOpen() {
|
||||
root.onSaveChangesCallback = () => { EffectMakerBackend.rootView.doOpenComposition() }
|
||||
root.onSaveChangesCallback = () => { EffectComposerBackend.rootView.doOpenComposition() }
|
||||
|
||||
saveChangesDialog.open()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: EffectMakerBackend.effectMakerModel
|
||||
target: EffectComposerBackend.effectComposerModel
|
||||
function onIsEmptyChanged() {
|
||||
if (EffectMakerBackend.effectMakerModel.isEmpty)
|
||||
if (EffectComposerBackend.effectComposerModel.isEmpty)
|
||||
saveAsDialog.close()
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
|
||||
onSave: {
|
||||
if (EffectMakerBackend.effectMakerModel.currentComposition === "") {
|
||||
if (EffectComposerBackend.effectComposerModel.currentComposition === "") {
|
||||
// if current composition is unsaved, show save as dialog and clear afterwards
|
||||
saveAsDialog.clearOnClose = true
|
||||
saveAsDialog.open()
|
||||
@@ -69,35 +69,35 @@ Item {
|
||||
SplitView.minimumHeight: 200
|
||||
SplitView.preferredHeight: 300
|
||||
|
||||
EffectMakerTopBar {
|
||||
EffectComposerTopBar {
|
||||
Layout.fillWidth: true
|
||||
|
||||
onAddClicked: {
|
||||
root.onSaveChangesCallback = () => { EffectMakerBackend.effectMakerModel.clear(true) }
|
||||
root.onSaveChangesCallback = () => { EffectComposerBackend.effectComposerModel.clear(true) }
|
||||
|
||||
if (EffectMakerBackend.effectMakerModel.hasUnsavedChanges)
|
||||
if (EffectComposerBackend.effectComposerModel.hasUnsavedChanges)
|
||||
saveChangesDialog.open()
|
||||
else
|
||||
EffectMakerBackend.effectMakerModel.clear(true)
|
||||
EffectComposerBackend.effectComposerModel.clear(true)
|
||||
}
|
||||
|
||||
onSaveClicked: {
|
||||
let name = EffectMakerBackend.effectMakerModel.currentComposition
|
||||
let name = EffectComposerBackend.effectComposerModel.currentComposition
|
||||
|
||||
if (name === "")
|
||||
saveAsDialog.open()
|
||||
else
|
||||
EffectMakerBackend.effectMakerModel.saveComposition(name)
|
||||
EffectComposerBackend.effectComposerModel.saveComposition(name)
|
||||
}
|
||||
|
||||
onSaveAsClicked: saveAsDialog.open()
|
||||
|
||||
onAssignToSelectedClicked: {
|
||||
EffectMakerBackend.effectMakerModel.assignToSelected()
|
||||
EffectComposerBackend.effectComposerModel.assignToSelected()
|
||||
}
|
||||
}
|
||||
|
||||
EffectMakerPreview {
|
||||
EffectComposerPreview {
|
||||
mainRoot: root
|
||||
|
||||
Layout.fillWidth: true
|
||||
@@ -139,9 +139,9 @@ Item {
|
||||
style: StudioTheme.Values.viewBarButtonStyle
|
||||
buttonIcon: StudioTheme.Constants.clearList_medium
|
||||
tooltip: qsTr("Remove all effect nodes.")
|
||||
enabled: !EffectMakerBackend.effectMakerModel.isEmpty
|
||||
enabled: !EffectComposerBackend.effectComposerModel.isEmpty
|
||||
|
||||
onClicked: EffectMakerBackend.effectMakerModel.clear()
|
||||
onClicked: EffectComposerBackend.effectComposerModel.clear()
|
||||
}
|
||||
|
||||
HelperWidgets.AbstractButton {
|
||||
@@ -184,10 +184,10 @@ Item {
|
||||
id: repeater
|
||||
|
||||
width: root.width
|
||||
model: EffectMakerBackend.effectMakerModel
|
||||
model: EffectComposerBackend.effectComposerModel
|
||||
|
||||
onCountChanged: {
|
||||
HelperWidgets.Controller.setCount("EffectMaker", repeater.count)
|
||||
HelperWidgets.Controller.setCount("EffectComposer", repeater.count)
|
||||
}
|
||||
|
||||
delegate: EffectCompositionNode {
|
||||
@@ -216,7 +216,7 @@ Item {
|
||||
if (root.moveFromIdx === root.moveToIdx)
|
||||
root.draggedSec.y = root.secsY[root.moveFromIdx]
|
||||
else
|
||||
EffectMakerBackend.effectMakerModel.moveNode(root.moveFromIdx, root.moveToIdx)
|
||||
EffectComposerBackend.effectComposerModel.moveNode(root.moveFromIdx, root.moveToIdx)
|
||||
|
||||
highlightBorder = false
|
||||
root.draggedSec = null
|
||||
@@ -267,6 +267,6 @@ Item {
|
||||
x: scrollView.x + (scrollView.width - emptyText.width) * .5
|
||||
y: lowerSplitCol.y + lowerSplitCol.height * .5
|
||||
|
||||
visible: EffectMakerBackend.effectMakerModel.isEmpty
|
||||
visible: EffectComposerBackend.effectComposerModel.isEmpty
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import QtQuick
|
||||
import HelperWidgets as HelperWidgets
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
Column {
|
||||
id: root
|
||||
@@ -15,7 +15,7 @@ Column {
|
||||
property bool timeRunning: previewAnimationRunning
|
||||
|
||||
required property Item mainRoot
|
||||
property var effectMakerModel: EffectMakerBackend.effectMakerModel
|
||||
property var effectComposerModel: EffectComposerBackend.effectComposerModel
|
||||
property alias source: source
|
||||
// The delay in ms to wait until updating the effect
|
||||
readonly property int updateDelay: 100
|
||||
@@ -31,11 +31,11 @@ Column {
|
||||
oldComponent.destroy();
|
||||
try {
|
||||
const newObject = Qt.createQmlObject(
|
||||
effectMakerModel.qmlComponentString,
|
||||
effectComposerModel.qmlComponentString,
|
||||
componentParent,
|
||||
""
|
||||
);
|
||||
effectMakerModel.resetEffectError(0);
|
||||
effectComposerModel.resetEffectError(0);
|
||||
} catch (error) {
|
||||
let errorString = "QML: ERROR: ";
|
||||
let errorLine = -1;
|
||||
@@ -45,7 +45,7 @@ Column {
|
||||
errorString += e.lineNumber + ": " + e.message;
|
||||
errorLine = e.lineNumber;
|
||||
}
|
||||
effectMakerModel.setEffectError(errorString, 0, errorLine);
|
||||
effectComposerModel.setEffectError(errorString, 0, errorLine);
|
||||
source.visible = true;
|
||||
}
|
||||
}
|
||||
@@ -210,7 +210,7 @@ Column {
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: effectMakerModel
|
||||
target: effectComposerModel
|
||||
function onShadersBaked() {
|
||||
console.log("Shaders Baked!")
|
||||
updateTimer.restart()
|
||||
@@ -221,7 +221,7 @@ Column {
|
||||
id: updateTimer
|
||||
interval: updateDelay
|
||||
onTriggered: {
|
||||
effectMakerModel.updateQmlComponent()
|
||||
effectComposerModel.updateQmlComponent()
|
||||
createNewComponent()
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import QtQuick
|
||||
import HelperWidgets as HelperWidgets
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
@@ -34,8 +34,8 @@ Rectangle {
|
||||
style: StudioTheme.Values.viewBarButtonStyle
|
||||
buttonIcon: StudioTheme.Constants.save_medium
|
||||
tooltip: qsTr("Save current composition")
|
||||
enabled: EffectMakerBackend.effectMakerModel.hasUnsavedChanges
|
||||
|| EffectMakerBackend.effectMakerModel.currentComposition === ""
|
||||
enabled: EffectComposerBackend.effectComposerModel.hasUnsavedChanges
|
||||
|| EffectComposerBackend.effectComposerModel.currentComposition === ""
|
||||
|
||||
onClicked: root.saveClicked()
|
||||
}
|
||||
@@ -44,7 +44,7 @@ Rectangle {
|
||||
style: StudioTheme.Values.viewBarButtonStyle
|
||||
buttonIcon: StudioTheme.Constants.saveAs_medium
|
||||
tooltip: qsTr("Save current composition with a new name")
|
||||
enabled: !EffectMakerBackend.effectMakerModel.isEmpty
|
||||
enabled: !EffectComposerBackend.effectComposerModel.isEmpty
|
||||
|
||||
onClicked: root.saveAsClicked()
|
||||
}
|
||||
@@ -53,7 +53,7 @@ Rectangle {
|
||||
style: StudioTheme.Values.viewBarButtonStyle
|
||||
buttonIcon: StudioTheme.Constants.assignTo_medium
|
||||
tooltip: qsTr("Assign current composition to selected item")
|
||||
enabled: EffectMakerBackend.effectMakerModel.currentComposition !== ""
|
||||
enabled: EffectComposerBackend.effectComposerModel.currentComposition !== ""
|
||||
|
||||
onClicked: root.assignToSelectedClicked()
|
||||
}
|
||||
@@ -61,7 +61,7 @@ Rectangle {
|
||||
|
||||
|
||||
Text {
|
||||
readonly property string compName: EffectMakerBackend.effectMakerModel.currentComposition
|
||||
readonly property string compName: EffectComposerBackend.effectComposerModel.currentComposition
|
||||
|
||||
text: compName !== "" ? compName : qsTr("Untitled")
|
||||
anchors.centerIn: parent
|
||||
@@ -6,7 +6,7 @@ import QtQuick.Controls
|
||||
import HelperWidgets as HelperWidgets
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
HelperWidgets.Section {
|
||||
id: root
|
||||
@@ -14,7 +14,7 @@ HelperWidgets.Section {
|
||||
property int modelIndex: 0
|
||||
|
||||
caption: nodeName
|
||||
category: "EffectMaker"
|
||||
category: "EffectComposer"
|
||||
|
||||
draggable: !isDependency
|
||||
fillBackground: true
|
||||
@@ -23,7 +23,7 @@ HelperWidgets.Section {
|
||||
visible: repeater.count > 0 || !isDependency
|
||||
|
||||
onCloseButtonClicked: {
|
||||
EffectMakerBackend.effectMakerModel.removeNode(root.modelIndex)
|
||||
EffectComposerBackend.effectComposerModel.removeNode(root.modelIndex)
|
||||
}
|
||||
|
||||
showEyeButton: !isDependency
|
||||
@@ -7,7 +7,7 @@ import QtQuick.Layouts
|
||||
import HelperWidgets as HelperWidgets
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@@ -6,7 +6,7 @@ import QtQuick.Controls
|
||||
import HelperWidgets
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
@@ -5,7 +5,7 @@ import QtQuick
|
||||
import HelperWidgets as HelperWidgets
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
StudioControls.ComboBox {
|
||||
id: root
|
||||
@@ -23,8 +23,8 @@ StudioControls.ComboBox {
|
||||
readonly property int popupHeight: Math.min(800, row.height + 2)
|
||||
|
||||
function calculateWindowGeometry() {
|
||||
var globalPos = EffectMakerBackend.rootView.globalPos(mainRoot.mapFromItem(root, 0, 0))
|
||||
var screenRect = EffectMakerBackend.rootView.screenRect();
|
||||
var globalPos = EffectComposerBackend.rootView.globalPos(mainRoot.mapFromItem(root, 0, 0))
|
||||
var screenRect = EffectComposerBackend.rootView.screenRect();
|
||||
|
||||
window.width = row.width + 2 // 2: scrollView left and right 1px margins
|
||||
|
||||
@@ -97,7 +97,7 @@ StudioControls.ComboBox {
|
||||
spacing: 10
|
||||
|
||||
Repeater {
|
||||
model: EffectMakerBackend.effectMakerNodesModel
|
||||
model: EffectComposerBackend.effectComposerNodesModel
|
||||
|
||||
Column {
|
||||
spacing: 10
|
||||
@@ -115,7 +115,7 @@ StudioControls.ComboBox {
|
||||
|
||||
EffectNode {
|
||||
onAddEffectNode: (nodeQenPath) => {
|
||||
EffectMakerBackend.rootView.addEffectNode(modelData.nodeQenPath)
|
||||
EffectComposerBackend.rootView.addEffectNode(modelData.nodeQenPath)
|
||||
root.popup.close()
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import QtQuick
|
||||
import HelperWidgets as HelperWidgets
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
StudioControls.ComboBox {
|
||||
id: root
|
||||
@@ -32,8 +32,8 @@ StudioControls.ComboBox {
|
||||
readonly property int popupHeight: Math.min(800, col.height + 2)
|
||||
|
||||
function calculateWindowGeometry() {
|
||||
var globalPos = EffectMakerBackend.rootView.globalPos(mainRoot.mapFromItem(root, 0, 0))
|
||||
var screenRect = EffectMakerBackend.rootView.screenRect();
|
||||
var globalPos = EffectComposerBackend.rootView.globalPos(mainRoot.mapFromItem(root, 0, 0))
|
||||
var screenRect = EffectComposerBackend.rootView.screenRect();
|
||||
|
||||
window.width = col.width + 2 // 2: scrollView left and right 1px margins
|
||||
|
||||
@@ -6,7 +6,7 @@ import QtQuick.Controls
|
||||
import HelperWidgets as HelperWidgets
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
StudioControls.Dialog {
|
||||
id: root
|
||||
@@ -21,7 +21,7 @@ StudioControls.Dialog {
|
||||
property bool clearOnClose: false // clear the effect composer after saving
|
||||
|
||||
onOpened: {
|
||||
nameText.text = EffectMakerBackend.effectMakerModel.getUniqueEffectName()
|
||||
nameText.text = EffectComposerBackend.effectComposerModel.getUniqueEffectName()
|
||||
nameText.selectAll()
|
||||
nameText.forceActiveFocus()
|
||||
emptyText.text = ""
|
||||
@@ -87,10 +87,10 @@ StudioControls.Dialog {
|
||||
if (!enabled) // needed since this event handler can be triggered from keyboard events
|
||||
return
|
||||
|
||||
EffectMakerBackend.effectMakerModel.saveComposition(nameText.text)
|
||||
EffectComposerBackend.effectComposerModel.saveComposition(nameText.text)
|
||||
|
||||
if (root.clearOnClose) {
|
||||
EffectMakerBackend.effectMakerModel.clear()
|
||||
EffectComposerBackend.effectComposerModel.clear()
|
||||
root.clearOnClose = false
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ StudioControls.Dialog {
|
||||
|
||||
onClicked: {
|
||||
if (root.clearOnClose) {
|
||||
EffectMakerBackend.effectMakerModel.clear()
|
||||
EffectComposerBackend.effectComposerModel.clear()
|
||||
root.clearOnClose = false
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import QtQuick.Controls
|
||||
import HelperWidgets as HelperWidgets
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
StudioControls.Dialog {
|
||||
id: root
|
||||
@@ -43,9 +43,9 @@ StudioControls.Dialog {
|
||||
width: 50
|
||||
text: qsTr("Save")
|
||||
onClicked: {
|
||||
let name = EffectMakerBackend.effectMakerModel.currentComposition
|
||||
let name = EffectComposerBackend.effectComposerModel.currentComposition
|
||||
if (name !== "")
|
||||
EffectMakerBackend.effectMakerModel.saveComposition(name)
|
||||
EffectComposerBackend.effectComposerModel.saveComposition(name)
|
||||
|
||||
root.save()
|
||||
root.accept()
|
||||
@@ -4,7 +4,7 @@
|
||||
import QtQuick
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
Item { // The wrapper Item is used to limit hovering and clicking the CheckBox to its area
|
||||
StudioControls.CheckBox {
|
||||
@@ -4,7 +4,7 @@
|
||||
import QtQuick
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
Row {
|
||||
id: itemPane
|
||||
@@ -4,7 +4,7 @@
|
||||
import QtQuick
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
Row {
|
||||
width: parent.width
|
||||
@@ -4,7 +4,7 @@
|
||||
import QtQuick
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
Row {
|
||||
width: parent.width
|
||||
@@ -4,7 +4,7 @@
|
||||
import QtQuick
|
||||
import HelperWidgets as HelperWidgets
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
Row {
|
||||
id: itemPane
|
||||
@@ -4,7 +4,7 @@
|
||||
import QtQuick
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
Row {
|
||||
width: parent.width
|
||||
@@ -5,7 +5,7 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
@@ -5,7 +5,7 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
@@ -5,7 +5,7 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import StudioControls as StudioControls
|
||||
import StudioTheme as StudioTheme
|
||||
import EffectMakerBackend
|
||||
import EffectComposerBackend
|
||||
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -103,7 +103,7 @@ if (WITH_QMLDESIGNER)
|
||||
set(qmldesigner_builddir ${PROJECT_BINARY_DIR}/qmldsgnr)
|
||||
endif()
|
||||
add_subdirectory(qmldesigner ${qmldesigner_builddir})
|
||||
add_subdirectory(effectmakernew)
|
||||
add_subdirectory(effectcomposer)
|
||||
add_subdirectory(studiowelcome)
|
||||
add_subdirectory(insight)
|
||||
endif()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
add_qtc_plugin(EffectMakerNew
|
||||
add_qtc_plugin(EffectComposer
|
||||
CONDITION TARGET Qt::Quick AND TARGET QtCreator::QmlDesigner
|
||||
PLUGIN_DEPENDS
|
||||
QtCreator::QmlDesigner QtCreator::ProjectExplorer QtCreator::QmlProjectManager
|
||||
@@ -6,18 +6,18 @@ add_qtc_plugin(EffectMakerNew
|
||||
Qt::Core Qt::CorePrivate Qt::Widgets Qt::Qml Qt::QmlPrivate Qt::Quick
|
||||
QtCreator::Utils
|
||||
SOURCES
|
||||
effectmakerplugin.cpp effectmakerplugin.h
|
||||
effectmakerwidget.cpp effectmakerwidget.h
|
||||
effectmakerview.cpp effectmakerview.h
|
||||
effectmakermodel.cpp effectmakermodel.h
|
||||
effectmakernodesmodel.cpp effectmakernodesmodel.h
|
||||
effectmakeruniformsmodel.cpp effectmakeruniformsmodel.h
|
||||
effectcomposerplugin.cpp effectcomposerplugin.h
|
||||
effectcomposerwidget.cpp effectcomposerwidget.h
|
||||
effectcomposerview.cpp effectcomposerview.h
|
||||
effectcomposermodel.cpp effectcomposermodel.h
|
||||
effectcomposernodesmodel.cpp effectcomposernodesmodel.h
|
||||
effectcomposeruniformsmodel.cpp effectcomposeruniformsmodel.h
|
||||
effectnode.cpp effectnode.h
|
||||
effectnodescategory.cpp effectnodescategory.h
|
||||
compositionnode.cpp compositionnode.h
|
||||
uniform.cpp uniform.h
|
||||
effectutils.cpp effectutils.h
|
||||
effectmakercontextobject.cpp effectmakercontextobject.h
|
||||
effectcomposercontextobject.cpp effectcomposercontextobject.h
|
||||
shaderfeatures.cpp shaderfeatures.h
|
||||
syntaxhighlighterdata.cpp syntaxhighlighterdata.h
|
||||
propertyhandler.cpp propertyhandler.h
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"Name" : "EffectMakerNew",
|
||||
"Name" : "EffectComposer",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "compositionnode.h"
|
||||
|
||||
#include "effectutils.h"
|
||||
#include "effectmakeruniformsmodel.h"
|
||||
#include "effectcomposeruniformsmodel.h"
|
||||
#include "propertyhandler.h"
|
||||
#include "uniform.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
CompositionNode::CompositionNode(const QString &effectName, const QString &qenPath,
|
||||
const QJsonObject &jsonObject)
|
||||
@@ -187,5 +187,5 @@ QString CompositionNode::name() const
|
||||
return m_name;
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "effectmakeruniformsmodel.h"
|
||||
#include "effectcomposeruniformsmodel.h"
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QObject>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class CompositionNode : public QObject
|
||||
{
|
||||
@@ -70,10 +70,9 @@ private:
|
||||
bool m_isEnabled = true;
|
||||
int m_refCount = 0;
|
||||
|
||||
QList<Uniform*> m_uniforms;
|
||||
QList<Uniform *> m_uniforms;
|
||||
|
||||
EffectMakerUniformsModel m_unifomrsModel;
|
||||
EffectComposerUniformsModel m_unifomrsModel;
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
|
||||
} // namespace EffectComposer
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "effectmakercontextobject.h"
|
||||
#include "effectcomposercontextobject.h"
|
||||
|
||||
#include <abstractview.h>
|
||||
#include <bindingproperty.h>
|
||||
@@ -27,15 +27,15 @@
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
EffectMakerContextObject::EffectMakerContextObject(QQmlContext *context, QObject *parent)
|
||||
EffectComposerContextObject::EffectComposerContextObject(QQmlContext *context, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_qmlContext(context)
|
||||
{
|
||||
}
|
||||
|
||||
QString EffectMakerContextObject::convertColorToString(const QVariant &color)
|
||||
QString EffectComposerContextObject::convertColorToString(const QVariant &color)
|
||||
{
|
||||
QString colorString;
|
||||
QColor theColor;
|
||||
@@ -52,17 +52,17 @@ QString EffectMakerContextObject::convertColorToString(const QVariant &color)
|
||||
}
|
||||
|
||||
// TODO: this method is used by the ColorEditor helper widget, check if at all needed?
|
||||
QColor EffectMakerContextObject::colorFromString(const QString &colorString)
|
||||
QColor EffectComposerContextObject::colorFromString(const QString &colorString)
|
||||
{
|
||||
return colorString;
|
||||
}
|
||||
|
||||
int EffectMakerContextObject::majorVersion() const
|
||||
int EffectComposerContextObject::majorVersion() const
|
||||
{
|
||||
return m_majorVersion;
|
||||
}
|
||||
|
||||
void EffectMakerContextObject::setMajorVersion(int majorVersion)
|
||||
void EffectComposerContextObject::setMajorVersion(int majorVersion)
|
||||
{
|
||||
if (m_majorVersion == majorVersion)
|
||||
return;
|
||||
@@ -72,7 +72,7 @@ void EffectMakerContextObject::setMajorVersion(int majorVersion)
|
||||
emit majorVersionChanged();
|
||||
}
|
||||
|
||||
void EffectMakerContextObject::setStateName(const QString &newStateName)
|
||||
void EffectComposerContextObject::setStateName(const QString &newStateName)
|
||||
{
|
||||
if (newStateName == m_stateName)
|
||||
return;
|
||||
@@ -81,7 +81,7 @@ void EffectMakerContextObject::setStateName(const QString &newStateName)
|
||||
emit stateNameChanged();
|
||||
}
|
||||
|
||||
void EffectMakerContextObject::setAllStateNames(const QStringList &allStates)
|
||||
void EffectComposerContextObject::setAllStateNames(const QStringList &allStates)
|
||||
{
|
||||
if (allStates == m_allStateNames)
|
||||
return;
|
||||
@@ -90,7 +90,7 @@ void EffectMakerContextObject::setAllStateNames(const QStringList &allStates)
|
||||
emit allStateNamesChanged();
|
||||
}
|
||||
|
||||
void EffectMakerContextObject::setIsBaseState(bool newIsBaseState)
|
||||
void EffectComposerContextObject::setIsBaseState(bool newIsBaseState)
|
||||
{
|
||||
if (newIsBaseState == m_isBaseState)
|
||||
return;
|
||||
@@ -99,7 +99,7 @@ void EffectMakerContextObject::setIsBaseState(bool newIsBaseState)
|
||||
emit isBaseStateChanged();
|
||||
}
|
||||
|
||||
void EffectMakerContextObject::setSelectionChanged(bool newSelectionChanged)
|
||||
void EffectComposerContextObject::setSelectionChanged(bool newSelectionChanged)
|
||||
{
|
||||
if (newSelectionChanged == m_selectionChanged)
|
||||
return;
|
||||
@@ -108,7 +108,7 @@ void EffectMakerContextObject::setSelectionChanged(bool newSelectionChanged)
|
||||
emit selectionChangedChanged();
|
||||
}
|
||||
|
||||
void EffectMakerContextObject::setBackendValues(QQmlPropertyMap *newBackendValues)
|
||||
void EffectComposerContextObject::setBackendValues(QQmlPropertyMap *newBackendValues)
|
||||
{
|
||||
if (newBackendValues == m_backendValues)
|
||||
return;
|
||||
@@ -117,17 +117,17 @@ void EffectMakerContextObject::setBackendValues(QQmlPropertyMap *newBackendValue
|
||||
emit backendValuesChanged();
|
||||
}
|
||||
|
||||
void EffectMakerContextObject::setModel(QmlDesigner::Model *model)
|
||||
void EffectComposerContextObject::setModel(QmlDesigner::Model *model)
|
||||
{
|
||||
m_model = model;
|
||||
}
|
||||
|
||||
void EffectMakerContextObject::triggerSelectionChanged()
|
||||
void EffectComposerContextObject::triggerSelectionChanged()
|
||||
{
|
||||
setSelectionChanged(!m_selectionChanged);
|
||||
}
|
||||
|
||||
void EffectMakerContextObject::hideCursor()
|
||||
void EffectComposerContextObject::hideCursor()
|
||||
{
|
||||
if (QApplication::overrideCursor())
|
||||
return;
|
||||
@@ -138,7 +138,7 @@ void EffectMakerContextObject::hideCursor()
|
||||
m_lastPos = QCursor::pos(w->screen());
|
||||
}
|
||||
|
||||
void EffectMakerContextObject::restoreCursor()
|
||||
void EffectComposerContextObject::restoreCursor()
|
||||
{
|
||||
if (!QApplication::overrideCursor())
|
||||
return;
|
||||
@@ -149,7 +149,7 @@ void EffectMakerContextObject::restoreCursor()
|
||||
QCursor::setPos(w->screen(), m_lastPos);
|
||||
}
|
||||
|
||||
void EffectMakerContextObject::holdCursorInPlace()
|
||||
void EffectComposerContextObject::holdCursorInPlace()
|
||||
{
|
||||
if (!QApplication::overrideCursor())
|
||||
return;
|
||||
@@ -158,7 +158,7 @@ void EffectMakerContextObject::holdCursorInPlace()
|
||||
QCursor::setPos(w->screen(), m_lastPos);
|
||||
}
|
||||
|
||||
int EffectMakerContextObject::devicePixelRatio()
|
||||
int EffectComposerContextObject::devicePixelRatio()
|
||||
{
|
||||
if (QWidget *w = QApplication::activeWindow())
|
||||
return w->devicePixelRatio();
|
||||
@@ -166,7 +166,7 @@ int EffectMakerContextObject::devicePixelRatio()
|
||||
return 1;
|
||||
}
|
||||
|
||||
QStringList EffectMakerContextObject::allStatesForId(const QString &id)
|
||||
QStringList EffectComposerContextObject::allStatesForId(const QString &id)
|
||||
{
|
||||
if (m_model && m_model->rewriterView()) {
|
||||
const QmlDesigner::QmlObjectNode node = m_model->rewriterView()->modelNodeForId(id);
|
||||
@@ -177,10 +177,10 @@ QStringList EffectMakerContextObject::allStatesForId(const QString &id)
|
||||
return {};
|
||||
}
|
||||
|
||||
bool EffectMakerContextObject::isBlocked(const QString &) const
|
||||
bool EffectComposerContextObject::isBlocked(const QString &) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
#include <QPoint>
|
||||
#include <QMouseEvent>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class EffectMakerContextObject : public QObject
|
||||
class EffectComposerContextObject : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -32,7 +32,7 @@ class EffectMakerContextObject : public QObject
|
||||
Q_PROPERTY(QQmlPropertyMap *backendValues READ backendValues WRITE setBackendValues NOTIFY backendValuesChanged)
|
||||
|
||||
public:
|
||||
EffectMakerContextObject(QQmlContext *context, QObject *parent = nullptr);
|
||||
EffectComposerContextObject(QQmlContext *context, QObject *parent = nullptr);
|
||||
|
||||
QString stateName() const { return m_stateName; }
|
||||
QStringList allStateNames() const { return m_allStateNames; }
|
||||
@@ -98,5 +98,5 @@ private:
|
||||
bool m_selectionChanged = false;
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "effectmakermodel.h"
|
||||
#include "effectcomposermodel.h"
|
||||
|
||||
#include "compositionnode.h"
|
||||
#include "effectutils.h"
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QLibraryInfo>
|
||||
#include <QVector2D>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
enum class FileType
|
||||
{
|
||||
@@ -49,12 +49,12 @@ static bool writeToFile(const QByteArray &buf, const QString &filename, FileType
|
||||
return true;
|
||||
}
|
||||
|
||||
EffectMakerModel::EffectMakerModel(QObject *parent)
|
||||
EffectComposerModel::EffectComposerModel(QObject *parent)
|
||||
: QAbstractListModel{parent}
|
||||
{
|
||||
}
|
||||
|
||||
QHash<int, QByteArray> EffectMakerModel::roleNames() const
|
||||
QHash<int, QByteArray> EffectComposerModel::roleNames() const
|
||||
{
|
||||
QHash<int, QByteArray> roles;
|
||||
roles[NameRole] = "nodeName";
|
||||
@@ -64,14 +64,14 @@ QHash<int, QByteArray> EffectMakerModel::roleNames() const
|
||||
return roles;
|
||||
}
|
||||
|
||||
int EffectMakerModel::rowCount(const QModelIndex &parent) const
|
||||
int EffectComposerModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
|
||||
return m_nodes.count();
|
||||
}
|
||||
|
||||
QVariant EffectMakerModel::data(const QModelIndex &index, int role) const
|
||||
QVariant EffectComposerModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
QTC_ASSERT(index.isValid() && index.row() < m_nodes.size(), return {});
|
||||
QTC_ASSERT(roleNames().contains(role), return {});
|
||||
@@ -79,7 +79,7 @@ QVariant EffectMakerModel::data(const QModelIndex &index, int role) const
|
||||
return m_nodes.at(index.row())->property(roleNames().value(role));
|
||||
}
|
||||
|
||||
bool EffectMakerModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
bool EffectComposerModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
if (!index.isValid() || !roleNames().contains(role))
|
||||
return false;
|
||||
@@ -95,7 +95,7 @@ bool EffectMakerModel::setData(const QModelIndex &index, const QVariant &value,
|
||||
return true;
|
||||
}
|
||||
|
||||
void EffectMakerModel::setIsEmpty(bool val)
|
||||
void EffectComposerModel::setIsEmpty(bool val)
|
||||
{
|
||||
if (m_isEmpty != val) {
|
||||
m_isEmpty = val;
|
||||
@@ -106,12 +106,12 @@ void EffectMakerModel::setIsEmpty(bool val)
|
||||
}
|
||||
}
|
||||
|
||||
void EffectMakerModel::addNode(const QString &nodeQenPath)
|
||||
void EffectComposerModel::addNode(const QString &nodeQenPath)
|
||||
{
|
||||
beginResetModel();
|
||||
auto *node = new CompositionNode({}, nodeQenPath);
|
||||
connect(qobject_cast<EffectMakerUniformsModel *>(node->uniformsModel()),
|
||||
&EffectMakerUniformsModel::dataChanged, this, [this] {
|
||||
connect(qobject_cast<EffectComposerUniformsModel *>(node->uniformsModel()),
|
||||
&EffectComposerUniformsModel::dataChanged, this, [this] {
|
||||
setHasUnsavedChanges(true);
|
||||
});
|
||||
|
||||
@@ -125,8 +125,8 @@ void EffectMakerModel::addNode(const QString &nodeQenPath)
|
||||
|
||||
const QString path = EffectUtils::nodesSourcesPath() + "/common/" + requiredId + ".qen";
|
||||
auto requiredNode = new CompositionNode({}, path);
|
||||
connect(qobject_cast<EffectMakerUniformsModel *>(requiredNode->uniformsModel()),
|
||||
&EffectMakerUniformsModel::dataChanged, this, [this] {
|
||||
connect(qobject_cast<EffectComposerUniformsModel *>(requiredNode->uniformsModel()),
|
||||
&EffectComposerUniformsModel::dataChanged, this, [this] {
|
||||
setHasUnsavedChanges(true);
|
||||
});
|
||||
requiredNode->setRefCount(1);
|
||||
@@ -144,7 +144,7 @@ void EffectMakerModel::addNode(const QString &nodeQenPath)
|
||||
emit nodesChanged();
|
||||
}
|
||||
|
||||
CompositionNode *EffectMakerModel::findNodeById(const QString &id) const
|
||||
CompositionNode *EffectComposerModel::findNodeById(const QString &id) const
|
||||
{
|
||||
for (CompositionNode *node : std::as_const(m_nodes)) {
|
||||
if (node->id() == id)
|
||||
@@ -153,7 +153,7 @@ CompositionNode *EffectMakerModel::findNodeById(const QString &id) const
|
||||
return {};
|
||||
}
|
||||
|
||||
void EffectMakerModel::moveNode(int fromIdx, int toIdx)
|
||||
void EffectComposerModel::moveNode(int fromIdx, int toIdx)
|
||||
{
|
||||
if (fromIdx == toIdx)
|
||||
return;
|
||||
@@ -167,7 +167,7 @@ void EffectMakerModel::moveNode(int fromIdx, int toIdx)
|
||||
bakeShaders();
|
||||
}
|
||||
|
||||
void EffectMakerModel::removeNode(int idx)
|
||||
void EffectComposerModel::removeNode(int idx)
|
||||
{
|
||||
beginResetModel();
|
||||
CompositionNode *node = m_nodes.takeAt(idx);
|
||||
@@ -193,7 +193,7 @@ void EffectMakerModel::removeNode(int idx)
|
||||
emit nodesChanged();
|
||||
}
|
||||
|
||||
void EffectMakerModel::clear(bool clearName)
|
||||
void EffectComposerModel::clear(bool clearName)
|
||||
{
|
||||
beginResetModel();
|
||||
qDeleteAll(m_nodes);
|
||||
@@ -209,14 +209,14 @@ void EffectMakerModel::clear(bool clearName)
|
||||
emit nodesChanged();
|
||||
}
|
||||
|
||||
void EffectMakerModel::assignToSelected()
|
||||
void EffectComposerModel::assignToSelected()
|
||||
{
|
||||
const QString effectsAssetsDir = QmlDesigner::ModelNodeOperations::getEffectsDefaultDirectory();
|
||||
const QString path = effectsAssetsDir + QDir::separator() + m_currentComposition + ".qep";
|
||||
emit assignToSelectedTriggered(path);
|
||||
}
|
||||
|
||||
QString EffectMakerModel::getUniqueEffectName() const
|
||||
QString EffectComposerModel::getUniqueEffectName() const
|
||||
{
|
||||
const QString effectsDir = QmlDesigner::ModelNodeOperations::getEffectsDefaultDirectory();
|
||||
const QString path = effectsDir + QDir::separator() + "Effect%1.qep";
|
||||
@@ -229,12 +229,12 @@ QString EffectMakerModel::getUniqueEffectName() const
|
||||
return QString("Effect%1").arg(num, 2, 10, QChar('0'));
|
||||
}
|
||||
|
||||
QString EffectMakerModel::fragmentShader() const
|
||||
QString EffectComposerModel::fragmentShader() const
|
||||
{
|
||||
return m_fragmentShader;
|
||||
}
|
||||
|
||||
void EffectMakerModel::setFragmentShader(const QString &newFragmentShader)
|
||||
void EffectComposerModel::setFragmentShader(const QString &newFragmentShader)
|
||||
{
|
||||
if (m_fragmentShader == newFragmentShader)
|
||||
return;
|
||||
@@ -242,12 +242,12 @@ void EffectMakerModel::setFragmentShader(const QString &newFragmentShader)
|
||||
m_fragmentShader = newFragmentShader;
|
||||
}
|
||||
|
||||
QString EffectMakerModel::vertexShader() const
|
||||
QString EffectComposerModel::vertexShader() const
|
||||
{
|
||||
return m_vertexShader;
|
||||
}
|
||||
|
||||
void EffectMakerModel::setVertexShader(const QString &newVertexShader)
|
||||
void EffectComposerModel::setVertexShader(const QString &newVertexShader)
|
||||
{
|
||||
if (m_vertexShader == newVertexShader)
|
||||
return;
|
||||
@@ -255,20 +255,20 @@ void EffectMakerModel::setVertexShader(const QString &newVertexShader)
|
||||
m_vertexShader = newVertexShader;
|
||||
}
|
||||
|
||||
const QString &EffectMakerModel::qmlComponentString() const
|
||||
const QString &EffectComposerModel::qmlComponentString() const
|
||||
{
|
||||
return m_qmlComponentString;
|
||||
}
|
||||
|
||||
const QList<Uniform *> EffectMakerModel::allUniforms() const
|
||||
const QList<Uniform *> EffectComposerModel::allUniforms() const
|
||||
{
|
||||
QList<Uniform *> uniforms = {};
|
||||
for (const auto &node : std::as_const(m_nodes))
|
||||
uniforms.append(static_cast<EffectMakerUniformsModel *>(node->uniformsModel())->uniforms());
|
||||
uniforms.append(static_cast<EffectComposerUniformsModel *>(node->uniformsModel())->uniforms());
|
||||
return uniforms;
|
||||
}
|
||||
|
||||
const QString EffectMakerModel::getBufUniform()
|
||||
const QString EffectComposerModel::getBufUniform()
|
||||
{
|
||||
QList<Uniform *> uniforms = allUniforms();
|
||||
QString s;
|
||||
@@ -295,7 +295,7 @@ const QString EffectMakerModel::getBufUniform()
|
||||
return s;
|
||||
}
|
||||
|
||||
const QString EffectMakerModel::getVSUniforms()
|
||||
const QString EffectComposerModel::getVSUniforms()
|
||||
{
|
||||
QString s;
|
||||
s += "#version 440\n";
|
||||
@@ -313,7 +313,7 @@ const QString EffectMakerModel::getVSUniforms()
|
||||
return s;
|
||||
}
|
||||
|
||||
const QString EffectMakerModel::getFSUniforms()
|
||||
const QString EffectComposerModel::getFSUniforms()
|
||||
{
|
||||
const QList<Uniform *> uniforms = allUniforms();
|
||||
QString s;
|
||||
@@ -359,7 +359,7 @@ const QString EffectMakerModel::getFSUniforms()
|
||||
|
||||
// Detects common GLSL error messages and returns potential
|
||||
// additional error information related to them.
|
||||
QString EffectMakerModel::detectErrorMessage(const QString &errorMessage)
|
||||
QString EffectComposerModel::detectErrorMessage(const QString &errorMessage)
|
||||
{
|
||||
static QHash<QString, QString> nodeErrors {
|
||||
{ "'BLUR_HELPER_MAX_LEVEL' : undeclared identifier", "BlurHelper"},
|
||||
@@ -380,7 +380,7 @@ QString EffectMakerModel::detectErrorMessage(const QString &errorMessage)
|
||||
}
|
||||
|
||||
// Return first error message (if any)
|
||||
EffectError EffectMakerModel::effectError() const
|
||||
EffectError EffectComposerModel::effectError() const
|
||||
{
|
||||
for (const EffectError &e : std::as_const(m_effectErrors)) {
|
||||
if (!e.m_message.isEmpty())
|
||||
@@ -392,7 +392,7 @@ EffectError EffectMakerModel::effectError() const
|
||||
// Set the effect error message with optional type and lineNumber.
|
||||
// Type comes from ErrorTypes, defaulting to common errors (-1).
|
||||
// Note that type must match with UI editor tab index.
|
||||
void EffectMakerModel::setEffectError(const QString &errorMessage, int type, int lineNumber)
|
||||
void EffectComposerModel::setEffectError(const QString &errorMessage, int type, int lineNumber)
|
||||
{
|
||||
EffectError error;
|
||||
error.m_type = type;
|
||||
@@ -557,7 +557,7 @@ QJsonObject nodeToJson(const CompositionNode &node)
|
||||
return nodeObject;
|
||||
}
|
||||
|
||||
QString EffectMakerModel::getQmlEffectString()
|
||||
QString EffectComposerModel::getQmlEffectString()
|
||||
{
|
||||
QString s;
|
||||
|
||||
@@ -650,7 +650,7 @@ R"(
|
||||
return s;
|
||||
}
|
||||
|
||||
void EffectMakerModel::saveComposition(const QString &name)
|
||||
void EffectComposerModel::saveComposition(const QString &name)
|
||||
{
|
||||
const QString effectsAssetsDir = QmlDesigner::ModelNodeOperations::getEffectsDefaultDirectory();
|
||||
const QString path = effectsAssetsDir + QDir::separator() + name + ".qep";
|
||||
@@ -687,7 +687,7 @@ void EffectMakerModel::saveComposition(const QString &name)
|
||||
saveResources(name);
|
||||
}
|
||||
|
||||
void EffectMakerModel::openComposition(const QString &path)
|
||||
void EffectComposerModel::openComposition(const QString &path)
|
||||
{
|
||||
clear(true);
|
||||
|
||||
@@ -743,8 +743,8 @@ void EffectMakerModel::openComposition(const QString &path)
|
||||
|
||||
for (const auto &nodeElement : nodesArray) {
|
||||
auto *node = new CompositionNode(effectName, {}, nodeElement.toObject());
|
||||
connect(qobject_cast<EffectMakerUniformsModel *>(node->uniformsModel()),
|
||||
&EffectMakerUniformsModel::dataChanged, this, [this] {
|
||||
connect(qobject_cast<EffectComposerUniformsModel *>(node->uniformsModel()),
|
||||
&EffectComposerUniformsModel::dataChanged, this, [this] {
|
||||
setHasUnsavedChanges(true);
|
||||
});
|
||||
m_nodes.append(node);
|
||||
@@ -769,7 +769,7 @@ void EffectMakerModel::openComposition(const QString &path)
|
||||
emit nodesChanged();
|
||||
}
|
||||
|
||||
void EffectMakerModel::saveResources(const QString &name)
|
||||
void EffectComposerModel::saveResources(const QString &name)
|
||||
{
|
||||
// Make sure that uniforms are up-to-date
|
||||
updateCustomUniforms();
|
||||
@@ -880,7 +880,7 @@ void EffectMakerModel::saveResources(const QString &name)
|
||||
emit resourcesSaved(QString("Effects.%1.%1").arg(name).toUtf8(), effectPath);
|
||||
}
|
||||
|
||||
void EffectMakerModel::resetEffectError(int type)
|
||||
void EffectComposerModel::resetEffectError(int type)
|
||||
{
|
||||
if (m_effectErrors.contains(type)) {
|
||||
m_effectErrors.remove(type);
|
||||
@@ -889,7 +889,7 @@ void EffectMakerModel::resetEffectError(int type)
|
||||
}
|
||||
|
||||
// Get value in QML format that used for exports
|
||||
QString EffectMakerModel::valueAsString(const Uniform &uniform)
|
||||
QString EffectComposerModel::valueAsString(const Uniform &uniform)
|
||||
{
|
||||
if (uniform.type() == Uniform::Type::Bool) {
|
||||
return uniform.value().toBool() ? QString("true") : QString("false");
|
||||
@@ -919,7 +919,7 @@ QString EffectMakerModel::valueAsString(const Uniform &uniform)
|
||||
}
|
||||
|
||||
// Get value in QML binding that used for previews
|
||||
QString EffectMakerModel::valueAsBinding(const Uniform &uniform)
|
||||
QString EffectComposerModel::valueAsBinding(const Uniform &uniform)
|
||||
{
|
||||
if (uniform.type() == Uniform::Type::Bool
|
||||
|| uniform.type() == Uniform::Type::Int
|
||||
@@ -951,7 +951,7 @@ QString EffectMakerModel::valueAsBinding(const Uniform &uniform)
|
||||
}
|
||||
|
||||
// Get value in GLSL format that is used for non-exported const properties
|
||||
QString EffectMakerModel::valueAsVariable(const Uniform &uniform)
|
||||
QString EffectComposerModel::valueAsVariable(const Uniform &uniform)
|
||||
{
|
||||
if (uniform.type() == Uniform::Type::Bool) {
|
||||
return uniform.value().toBool() ? QString("true") : QString("false");
|
||||
@@ -978,7 +978,7 @@ QString EffectMakerModel::valueAsVariable(const Uniform &uniform)
|
||||
}
|
||||
|
||||
// Return name for the image property Image element
|
||||
QString EffectMakerModel::getImageElementName(const Uniform &uniform, bool localFiles)
|
||||
QString EffectComposerModel::getImageElementName(const Uniform &uniform, bool localFiles)
|
||||
{
|
||||
if (localFiles && uniform.value().toString().isEmpty())
|
||||
return QStringLiteral("null");
|
||||
@@ -987,7 +987,7 @@ QString EffectMakerModel::getImageElementName(const Uniform &uniform, bool local
|
||||
return QStringLiteral("imageItem") + simplifiedName;
|
||||
}
|
||||
|
||||
const QString EffectMakerModel::getConstVariables()
|
||||
const QString EffectComposerModel::getConstVariables()
|
||||
{
|
||||
const QList<Uniform *> uniforms = allUniforms();
|
||||
QString s;
|
||||
@@ -1003,7 +1003,7 @@ const QString EffectMakerModel::getConstVariables()
|
||||
return s;
|
||||
}
|
||||
|
||||
const QString EffectMakerModel::getDefineProperties()
|
||||
const QString EffectComposerModel::getDefineProperties()
|
||||
{
|
||||
const QList<Uniform *> uniforms = allUniforms();
|
||||
QString s;
|
||||
@@ -1020,7 +1020,7 @@ const QString EffectMakerModel::getDefineProperties()
|
||||
return s;
|
||||
}
|
||||
|
||||
int EffectMakerModel::getTagIndex(const QStringList &code, const QString &tag)
|
||||
int EffectComposerModel::getTagIndex(const QStringList &code, const QString &tag)
|
||||
{
|
||||
int index = -1;
|
||||
int line = 0;
|
||||
@@ -1042,7 +1042,7 @@ int EffectMakerModel::getTagIndex(const QStringList &code, const QString &tag)
|
||||
return index;
|
||||
}
|
||||
|
||||
QString EffectMakerModel::processVertexRootLine(const QString &line)
|
||||
QString EffectComposerModel::processVertexRootLine(const QString &line)
|
||||
{
|
||||
QString output;
|
||||
QStringList lineList = line.split(m_spaceReg, Qt::SkipEmptyParts);
|
||||
@@ -1056,7 +1056,7 @@ QString EffectMakerModel::processVertexRootLine(const QString &line)
|
||||
return output;
|
||||
}
|
||||
|
||||
QString EffectMakerModel::processFragmentRootLine(const QString &line)
|
||||
QString EffectComposerModel::processFragmentRootLine(const QString &line)
|
||||
{
|
||||
QString output;
|
||||
QStringList lineList = line.split(m_spaceReg, Qt::SkipEmptyParts);
|
||||
@@ -1067,7 +1067,7 @@ QString EffectMakerModel::processFragmentRootLine(const QString &line)
|
||||
return output;
|
||||
}
|
||||
|
||||
QStringList EffectMakerModel::getDefaultRootVertexShader()
|
||||
QStringList EffectComposerModel::getDefaultRootVertexShader()
|
||||
{
|
||||
if (m_defaultRootVertexShader.isEmpty()) {
|
||||
m_defaultRootVertexShader << "void main() {";
|
||||
@@ -1081,7 +1081,7 @@ QStringList EffectMakerModel::getDefaultRootVertexShader()
|
||||
return m_defaultRootVertexShader;
|
||||
}
|
||||
|
||||
QStringList EffectMakerModel::getDefaultRootFragmentShader()
|
||||
QStringList EffectComposerModel::getDefaultRootFragmentShader()
|
||||
{
|
||||
if (m_defaultRootFragmentShader.isEmpty()) {
|
||||
m_defaultRootFragmentShader << "void main() {";
|
||||
@@ -1095,7 +1095,7 @@ QStringList EffectMakerModel::getDefaultRootFragmentShader()
|
||||
|
||||
// Remove all post-processing tags ("@tag") from the code.
|
||||
// Except "@nodes" tag as that is handled later.
|
||||
QStringList EffectMakerModel::removeTagsFromCode(const QStringList &codeLines)
|
||||
QStringList EffectComposerModel::removeTagsFromCode(const QStringList &codeLines)
|
||||
{
|
||||
QStringList s;
|
||||
for (const QString &line : codeLines) {
|
||||
@@ -1120,13 +1120,13 @@ QStringList EffectMakerModel::removeTagsFromCode(const QStringList &codeLines)
|
||||
return s;
|
||||
}
|
||||
|
||||
QString EffectMakerModel::removeTagsFromCode(const QString &code)
|
||||
QString EffectComposerModel::removeTagsFromCode(const QString &code)
|
||||
{
|
||||
QStringList codeLines = removeTagsFromCode(code.split('\n'));
|
||||
return codeLines.join('\n');
|
||||
}
|
||||
|
||||
QString EffectMakerModel::getCustomShaderVaryings(bool outState)
|
||||
QString EffectComposerModel::getCustomShaderVaryings(bool outState)
|
||||
{
|
||||
QString output;
|
||||
QString direction = outState ? QStringLiteral("out") : QStringLiteral("in");
|
||||
@@ -1138,7 +1138,7 @@ QString EffectMakerModel::getCustomShaderVaryings(bool outState)
|
||||
return output;
|
||||
}
|
||||
|
||||
QString EffectMakerModel::generateVertexShader(bool includeUniforms)
|
||||
QString EffectComposerModel::generateVertexShader(bool includeUniforms)
|
||||
{
|
||||
QString s;
|
||||
|
||||
@@ -1194,7 +1194,7 @@ QString EffectMakerModel::generateVertexShader(bool includeUniforms)
|
||||
return s;
|
||||
}
|
||||
|
||||
QString EffectMakerModel::generateFragmentShader(bool includeUniforms)
|
||||
QString EffectComposerModel::generateFragmentShader(bool includeUniforms)
|
||||
{
|
||||
QString s;
|
||||
|
||||
@@ -1249,7 +1249,7 @@ QString EffectMakerModel::generateFragmentShader(bool includeUniforms)
|
||||
return s;
|
||||
}
|
||||
|
||||
void EffectMakerModel::handleQsbProcessExit(Utils::Process *qsbProcess, const QString &shader, bool preview)
|
||||
void EffectComposerModel::handleQsbProcessExit(Utils::Process *qsbProcess, const QString &shader, bool preview)
|
||||
{
|
||||
--m_remainingQsbTargets;
|
||||
|
||||
@@ -1281,7 +1281,7 @@ void EffectMakerModel::handleQsbProcessExit(Utils::Process *qsbProcess, const QS
|
||||
|
||||
// Generates string of the custom properties (uniforms) into ShaderEffect component
|
||||
// Also generates QML images elements for samplers.
|
||||
void EffectMakerModel::updateCustomUniforms()
|
||||
void EffectComposerModel::updateCustomUniforms()
|
||||
{
|
||||
QString exportedRootPropertiesString;
|
||||
QString previewEffectPropertiesString;
|
||||
@@ -1347,7 +1347,7 @@ void EffectMakerModel::updateCustomUniforms()
|
||||
m_exportedEffectPropertiesString = exportedEffectPropertiesString;
|
||||
}
|
||||
|
||||
void EffectMakerModel::createFiles()
|
||||
void EffectComposerModel::createFiles()
|
||||
{
|
||||
if (QFileInfo(m_vertexShaderFilename).exists())
|
||||
QFile(m_vertexShaderFilename).remove();
|
||||
@@ -1380,7 +1380,7 @@ void EffectMakerModel::createFiles()
|
||||
}
|
||||
}
|
||||
|
||||
void EffectMakerModel::bakeShaders()
|
||||
void EffectComposerModel::bakeShaders()
|
||||
{
|
||||
const QString failMessage = "Shader baking failed: ";
|
||||
|
||||
@@ -1462,12 +1462,12 @@ void EffectMakerModel::bakeShaders()
|
||||
|
||||
}
|
||||
|
||||
bool EffectMakerModel::shadersUpToDate() const
|
||||
bool EffectComposerModel::shadersUpToDate() const
|
||||
{
|
||||
return m_shadersUpToDate;
|
||||
}
|
||||
|
||||
void EffectMakerModel::setShadersUpToDate(bool UpToDate)
|
||||
void EffectComposerModel::setShadersUpToDate(bool UpToDate)
|
||||
{
|
||||
if (m_shadersUpToDate == UpToDate)
|
||||
return;
|
||||
@@ -1477,7 +1477,7 @@ void EffectMakerModel::setShadersUpToDate(bool UpToDate)
|
||||
|
||||
// Returns name for image mipmap property.
|
||||
// e.g. "myImage" -> "myImageMipmap".
|
||||
QString EffectMakerModel::mipmapPropertyName(const QString &name) const
|
||||
QString EffectComposerModel::mipmapPropertyName(const QString &name) const
|
||||
{
|
||||
QString simplifiedName = name.simplified();
|
||||
simplifiedName = simplifiedName.remove(' ');
|
||||
@@ -1485,7 +1485,7 @@ QString EffectMakerModel::mipmapPropertyName(const QString &name) const
|
||||
return simplifiedName;
|
||||
}
|
||||
|
||||
QString EffectMakerModel::getQmlImagesString(bool localFiles)
|
||||
QString EffectComposerModel::getQmlImagesString(bool localFiles)
|
||||
{
|
||||
QString imagesString;
|
||||
const QList<Uniform *> uniforms = allUniforms();
|
||||
@@ -1521,7 +1521,7 @@ QString EffectMakerModel::getQmlImagesString(bool localFiles)
|
||||
return imagesString;
|
||||
}
|
||||
|
||||
QString EffectMakerModel::getQmlComponentString(bool localFiles)
|
||||
QString EffectComposerModel::getQmlComponentString(bool localFiles)
|
||||
{
|
||||
auto addProperty = [localFiles](const QString &name, const QString &var,
|
||||
const QString &type, bool blurHelper = false)
|
||||
@@ -1608,12 +1608,12 @@ QString EffectMakerModel::getQmlComponentString(bool localFiles)
|
||||
return s;
|
||||
}
|
||||
|
||||
QString EffectMakerModel::currentComposition() const
|
||||
QString EffectComposerModel::currentComposition() const
|
||||
{
|
||||
return m_currentComposition;
|
||||
}
|
||||
|
||||
void EffectMakerModel::setCurrentComposition(const QString &newCurrentComposition)
|
||||
void EffectComposerModel::setCurrentComposition(const QString &newCurrentComposition)
|
||||
{
|
||||
if (m_currentComposition == newCurrentComposition)
|
||||
return;
|
||||
@@ -1622,12 +1622,12 @@ void EffectMakerModel::setCurrentComposition(const QString &newCurrentCompositio
|
||||
emit currentCompositionChanged();
|
||||
}
|
||||
|
||||
bool EffectMakerModel::hasUnsavedChanges() const
|
||||
bool EffectComposerModel::hasUnsavedChanges() const
|
||||
{
|
||||
return m_hasUnsavedChanges;
|
||||
}
|
||||
|
||||
void EffectMakerModel::setHasUnsavedChanges(bool val)
|
||||
void EffectComposerModel::setHasUnsavedChanges(bool val)
|
||||
{
|
||||
if (m_hasUnsavedChanges == val)
|
||||
return;
|
||||
@@ -1636,7 +1636,7 @@ void EffectMakerModel::setHasUnsavedChanges(bool val)
|
||||
emit hasUnsavedChangesChanged();
|
||||
}
|
||||
|
||||
QStringList EffectMakerModel::uniformNames() const
|
||||
QStringList EffectComposerModel::uniformNames() const
|
||||
{
|
||||
QStringList usedList;
|
||||
const QList<Uniform *> uniforms = allUniforms();
|
||||
@@ -1645,14 +1645,14 @@ QStringList EffectMakerModel::uniformNames() const
|
||||
return usedList;
|
||||
}
|
||||
|
||||
bool EffectMakerModel::isDependencyNode(int index) const
|
||||
bool EffectComposerModel::isDependencyNode(int index) const
|
||||
{
|
||||
if (m_nodes.size() > index)
|
||||
return m_nodes[index]->isDependency();
|
||||
return false;
|
||||
}
|
||||
|
||||
void EffectMakerModel::updateQmlComponent()
|
||||
void EffectComposerModel::updateQmlComponent()
|
||||
{
|
||||
// Clear possible QML runtime errors
|
||||
resetEffectError(ErrorQMLRuntime);
|
||||
@@ -1661,11 +1661,11 @@ void EffectMakerModel::updateQmlComponent()
|
||||
|
||||
// Removes "file:" from the URL path.
|
||||
// So e.g. "file:///C:/myimages/steel1.jpg" -> "C:/myimages/steel1.jpg"
|
||||
QString EffectMakerModel::stripFileFromURL(const QString &urlString) const
|
||||
QString EffectComposerModel::stripFileFromURL(const QString &urlString) const
|
||||
{
|
||||
QUrl url(urlString);
|
||||
QString filePath = (url.scheme() == QStringLiteral("file")) ? url.toLocalFile() : url.toString();
|
||||
return filePath;
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
@@ -21,7 +21,7 @@ namespace Utils {
|
||||
class Process;
|
||||
}
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class CompositionNode;
|
||||
class Uniform;
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
int m_type = -1;
|
||||
};
|
||||
|
||||
class EffectMakerModel : public QAbstractListModel
|
||||
class EffectComposerModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -50,7 +50,7 @@ class EffectMakerModel : public QAbstractListModel
|
||||
Q_PROPERTY(QString currentComposition READ currentComposition WRITE setCurrentComposition NOTIFY currentCompositionChanged)
|
||||
|
||||
public:
|
||||
EffectMakerModel(QObject *parent = nullptr);
|
||||
EffectComposerModel(QObject *parent = nullptr);
|
||||
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
int rowCount(const QModelIndex & parent = QModelIndex()) const override;
|
||||
@@ -206,5 +206,5 @@ private:
|
||||
const QRegularExpression m_spaceReg = QRegularExpression("\\s+");
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "effectmakernodesmodel.h"
|
||||
#include "effectcomposernodesmodel.h"
|
||||
#include "effectutils.h"
|
||||
|
||||
#include <utils/filepath.h>
|
||||
@@ -9,14 +9,14 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
EffectMakerNodesModel::EffectMakerNodesModel(QObject *parent)
|
||||
EffectComposerNodesModel::EffectComposerNodesModel(QObject *parent)
|
||||
: QAbstractListModel{parent}
|
||||
{
|
||||
}
|
||||
|
||||
QHash<int, QByteArray> EffectMakerNodesModel::roleNames() const
|
||||
QHash<int, QByteArray> EffectComposerNodesModel::roleNames() const
|
||||
{
|
||||
QHash<int, QByteArray> roles;
|
||||
roles[CategoryNameRole] = "categoryName";
|
||||
@@ -25,14 +25,14 @@ QHash<int, QByteArray> EffectMakerNodesModel::roleNames() const
|
||||
return roles;
|
||||
}
|
||||
|
||||
int EffectMakerNodesModel::rowCount(const QModelIndex &parent) const
|
||||
int EffectComposerNodesModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
|
||||
return m_categories.count();
|
||||
}
|
||||
|
||||
QVariant EffectMakerNodesModel::data(const QModelIndex &index, int role) const
|
||||
QVariant EffectComposerNodesModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
QTC_ASSERT(index.isValid() && index.row() < m_categories.size(), return {});
|
||||
QTC_ASSERT(roleNames().contains(role), return {});
|
||||
@@ -40,7 +40,7 @@ QVariant EffectMakerNodesModel::data(const QModelIndex &index, int role) const
|
||||
return m_categories.at(index.row())->property(roleNames().value(role));
|
||||
}
|
||||
|
||||
void EffectMakerNodesModel::loadModel()
|
||||
void EffectComposerNodesModel::loadModel()
|
||||
{
|
||||
if (m_modelLoaded)
|
||||
return;
|
||||
@@ -86,13 +86,13 @@ void EffectMakerNodesModel::loadModel()
|
||||
resetModel();
|
||||
}
|
||||
|
||||
void EffectMakerNodesModel::resetModel()
|
||||
void EffectComposerNodesModel::resetModel()
|
||||
{
|
||||
beginResetModel();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void EffectMakerNodesModel::updateCanBeAdded(const QStringList &uniforms)
|
||||
void EffectComposerNodesModel::updateCanBeAdded(const QStringList &uniforms)
|
||||
{
|
||||
for (const EffectNodesCategory *cat : std::as_const(m_categories)) {
|
||||
const QList<EffectNode *> nodes = cat->nodes();
|
||||
@@ -108,4 +108,4 @@ void EffectMakerNodesModel::updateCanBeAdded(const QStringList &uniforms)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
#include <QStandardItemModel>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class EffectMakerNodesModel : public QAbstractListModel
|
||||
class EffectComposerNodesModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -19,7 +19,7 @@ class EffectMakerNodesModel : public QAbstractListModel
|
||||
};
|
||||
|
||||
public:
|
||||
EffectMakerNodesModel(QObject *parent = nullptr);
|
||||
EffectComposerNodesModel(QObject *parent = nullptr);
|
||||
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
int rowCount(const QModelIndex & parent = QModelIndex()) const override;
|
||||
@@ -40,5 +40,5 @@ private:
|
||||
bool m_modelLoaded = false;
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "effectmakerplugin.h"
|
||||
#include "effectcomposerplugin.h"
|
||||
|
||||
#include "effectmakerview.h"
|
||||
#include "effectcomposerview.h"
|
||||
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
@@ -25,23 +25,23 @@
|
||||
#include <QJsonDocument>
|
||||
#include <QMap>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
static bool enableEffectMaker()
|
||||
static bool enableEffectComposer()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EffectMakerPlugin::delayedInitialize()
|
||||
bool EffectComposerPlugin::delayedInitialize()
|
||||
{
|
||||
if (m_delayedInitialized)
|
||||
return true;
|
||||
|
||||
if (enableEffectMaker()) {
|
||||
if (enableEffectComposer()) {
|
||||
auto *designerPlugin = QmlDesigner::QmlDesignerPlugin::instance();
|
||||
auto &viewManager = designerPlugin->viewManager();
|
||||
|
||||
viewManager.registerView(std::make_unique<EffectMakerView>(
|
||||
viewManager.registerView(std::make_unique<EffectComposerView>(
|
||||
QmlDesigner::QmlDesignerPlugin::externalDependenciesForPluginInitializationOnly()));
|
||||
}
|
||||
|
||||
@@ -50,5 +50,4 @@ bool EffectMakerPlugin::delayedInitialize()
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
|
||||
} // namespace EffectComposer
|
||||
@@ -11,16 +11,16 @@ class ActionContainer;
|
||||
class ExternalTool;
|
||||
}
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class EffectMakerPlugin : public ExtensionSystem::IPlugin
|
||||
class EffectComposerPlugin : public ExtensionSystem::IPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "EffectMakerNew.json")
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "EffectComposer.json")
|
||||
|
||||
public:
|
||||
EffectMakerPlugin() {}
|
||||
~EffectMakerPlugin() override {}
|
||||
EffectComposerPlugin() {}
|
||||
~EffectComposerPlugin() override {}
|
||||
|
||||
bool delayedInitialize() override;
|
||||
|
||||
@@ -28,5 +28,5 @@ private:
|
||||
bool m_delayedInitialized = false;
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "effectmakeruniformsmodel.h"
|
||||
#include "effectcomposeruniformsmodel.h"
|
||||
|
||||
#include "propertyhandler.h"
|
||||
#include "uniform.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
EffectMakerUniformsModel::EffectMakerUniformsModel(QObject *parent)
|
||||
EffectComposerUniformsModel::EffectComposerUniformsModel(QObject *parent)
|
||||
: QAbstractListModel{parent}
|
||||
{
|
||||
}
|
||||
|
||||
QHash<int, QByteArray> EffectMakerUniformsModel::roleNames() const
|
||||
QHash<int, QByteArray> EffectComposerUniformsModel::roleNames() const
|
||||
{
|
||||
QHash<int, QByteArray> roles;
|
||||
roles[NameRole] = "uniformName";
|
||||
@@ -30,14 +30,14 @@ QHash<int, QByteArray> EffectMakerUniformsModel::roleNames() const
|
||||
return roles;
|
||||
}
|
||||
|
||||
int EffectMakerUniformsModel::rowCount(const QModelIndex &parent) const
|
||||
int EffectComposerUniformsModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
|
||||
return m_uniforms.size();
|
||||
}
|
||||
|
||||
QVariant EffectMakerUniformsModel::data(const QModelIndex &index, int role) const
|
||||
QVariant EffectComposerUniformsModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
QTC_ASSERT(index.isValid() && index.row() < m_uniforms.size(), return {});
|
||||
QTC_ASSERT(roleNames().contains(role), return {});
|
||||
@@ -45,7 +45,7 @@ QVariant EffectMakerUniformsModel::data(const QModelIndex &index, int role) cons
|
||||
return m_uniforms.at(index.row())->property(roleNames().value(role));
|
||||
}
|
||||
|
||||
bool EffectMakerUniformsModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
bool EffectComposerUniformsModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
if (!index.isValid() || !roleNames().contains(role))
|
||||
return false;
|
||||
@@ -71,23 +71,23 @@ bool EffectMakerUniformsModel::setData(const QModelIndex &index, const QVariant
|
||||
return true;
|
||||
}
|
||||
|
||||
void EffectMakerUniformsModel::resetModel()
|
||||
void EffectComposerUniformsModel::resetModel()
|
||||
{
|
||||
beginResetModel();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void EffectMakerUniformsModel::addUniform(Uniform *uniform)
|
||||
void EffectComposerUniformsModel::addUniform(Uniform *uniform)
|
||||
{
|
||||
beginInsertRows({}, m_uniforms.size(), m_uniforms.size());
|
||||
m_uniforms.append(uniform);
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
QList<Uniform *> EffectMakerUniformsModel::uniforms() const
|
||||
QList<Uniform *> EffectComposerUniformsModel::uniforms() const
|
||||
{
|
||||
return m_uniforms;
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
|
||||
#include <QStandardItemModel>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class Uniform;
|
||||
|
||||
class EffectMakerUniformsModel : public QAbstractListModel
|
||||
class EffectComposerUniformsModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EffectMakerUniformsModel(QObject *parent = nullptr);
|
||||
EffectComposerUniformsModel(QObject *parent = nullptr);
|
||||
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
int rowCount(const QModelIndex & parent = QModelIndex()) const override;
|
||||
@@ -43,5 +43,5 @@ private:
|
||||
QList<Uniform *> m_uniforms;
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "effectmakerview.h"
|
||||
#include "effectcomposerview.h"
|
||||
|
||||
#include "effectmakermodel.h"
|
||||
#include "effectmakernodesmodel.h"
|
||||
#include "effectmakerwidget.h"
|
||||
#include "effectcomposermodel.h"
|
||||
#include "effectcomposernodesmodel.h"
|
||||
#include "effectcomposerwidget.h"
|
||||
|
||||
#include <documentmanager.h>
|
||||
#include <modelnodeoperations.h>
|
||||
@@ -13,49 +13,49 @@
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
EffectMakerContext::EffectMakerContext(QWidget *widget)
|
||||
EffectComposerContext::EffectComposerContext(QWidget *widget)
|
||||
: IContext(widget)
|
||||
{
|
||||
setWidget(widget);
|
||||
setContext(Core::Context(QmlDesigner::Constants::C_QMLEFFECTMAKER,
|
||||
setContext(Core::Context(QmlDesigner::Constants::C_QMLEFFECTCOMPOSER,
|
||||
QmlDesigner::Constants::C_QT_QUICK_TOOLS_MENU));
|
||||
}
|
||||
|
||||
void EffectMakerContext::contextHelp(const HelpCallback &callback) const
|
||||
void EffectComposerContext::contextHelp(const HelpCallback &callback) const
|
||||
{
|
||||
qobject_cast<EffectMakerWidget *>(m_widget)->contextHelp(callback);
|
||||
qobject_cast<EffectComposerWidget *>(m_widget)->contextHelp(callback);
|
||||
}
|
||||
|
||||
EffectMakerView::EffectMakerView(QmlDesigner::ExternalDependenciesInterface &externalDependencies)
|
||||
EffectComposerView::EffectComposerView(QmlDesigner::ExternalDependenciesInterface &externalDependencies)
|
||||
: AbstractView{externalDependencies}
|
||||
{
|
||||
}
|
||||
|
||||
EffectMakerView::~EffectMakerView()
|
||||
EffectComposerView::~EffectComposerView()
|
||||
{}
|
||||
|
||||
bool EffectMakerView::hasWidget() const
|
||||
bool EffectComposerView::hasWidget() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
QmlDesigner::WidgetInfo EffectMakerView::widgetInfo()
|
||||
QmlDesigner::WidgetInfo EffectComposerView::widgetInfo()
|
||||
{
|
||||
if (m_widget.isNull()) {
|
||||
m_widget = new EffectMakerWidget{this};
|
||||
m_widget = new EffectComposerWidget{this};
|
||||
|
||||
connect(m_widget->effectMakerModel(), &EffectMakerModel::assignToSelectedTriggered, this,
|
||||
connect(m_widget->effectComposerModel(), &EffectComposerModel::assignToSelectedTriggered, this,
|
||||
[&] (const QString &effectPath) {
|
||||
executeInTransaction("EffectMakerView::widgetInfo", [&] {
|
||||
executeInTransaction("EffectComposerView::widgetInfo", [&] {
|
||||
const QList<QmlDesigner::ModelNode> selectedNodes = selectedModelNodes();
|
||||
for (const QmlDesigner::ModelNode &node : selectedNodes)
|
||||
QmlDesigner::ModelNodeOperations::handleItemLibraryEffectDrop(effectPath, node);
|
||||
});
|
||||
});
|
||||
|
||||
auto context = new EffectMakerContext(m_widget.data());
|
||||
auto context = new EffectComposerContext(m_widget.data());
|
||||
Core::ICore::addContextObject(context);
|
||||
}
|
||||
|
||||
@@ -63,37 +63,37 @@ QmlDesigner::WidgetInfo EffectMakerView::widgetInfo()
|
||||
QmlDesigner::WidgetInfo::LeftPane, 0, tr("Effect Composer [beta]"));
|
||||
}
|
||||
|
||||
void EffectMakerView::customNotification([[maybe_unused]] const AbstractView *view,
|
||||
void EffectComposerView::customNotification([[maybe_unused]] const AbstractView *view,
|
||||
const QString &identifier,
|
||||
[[maybe_unused]] const QList<QmlDesigner::ModelNode> &nodeList,
|
||||
const QList<QVariant> &data)
|
||||
{
|
||||
if (identifier == "open_effectmaker_composition" && data.count() > 0) {
|
||||
if (identifier == "open_effectcomposer_composition" && data.count() > 0) {
|
||||
const QString compositionPath = data[0].toString();
|
||||
m_widget->openComposition(compositionPath);
|
||||
}
|
||||
}
|
||||
|
||||
void EffectMakerView::modelAttached(QmlDesigner::Model *model)
|
||||
void EffectComposerView::modelAttached(QmlDesigner::Model *model)
|
||||
{
|
||||
AbstractView::modelAttached(model);
|
||||
|
||||
m_widget->effectMakerNodesModel()->loadModel();
|
||||
m_widget->effectComposerNodesModel()->loadModel();
|
||||
|
||||
QString currProjectPath = QmlDesigner::DocumentManager::currentProjectDirPath().toString();
|
||||
|
||||
// if starting a new project, clear the effect composer
|
||||
if (m_currProjectPath != currProjectPath)
|
||||
m_widget->effectMakerModel()->clear();
|
||||
m_widget->effectComposerModel()->clear();
|
||||
|
||||
m_currProjectPath = currProjectPath;
|
||||
|
||||
m_widget->initView();
|
||||
}
|
||||
|
||||
void EffectMakerView::modelAboutToBeDetached(QmlDesigner::Model *model)
|
||||
void EffectComposerView::modelAboutToBeDetached(QmlDesigner::Model *model)
|
||||
{
|
||||
AbstractView::modelAboutToBeDetached(model);
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
@@ -9,24 +9,24 @@
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class EffectMakerWidget;
|
||||
class EffectComposerWidget;
|
||||
|
||||
class EffectMakerContext : public Core::IContext
|
||||
class EffectComposerContext : public Core::IContext
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EffectMakerContext(QWidget *widget);
|
||||
EffectComposerContext(QWidget *widget);
|
||||
void contextHelp(const Core::IContext::HelpCallback &callback) const override;
|
||||
};
|
||||
|
||||
class EffectMakerView : public QmlDesigner::AbstractView
|
||||
class EffectComposerView : public QmlDesigner::AbstractView
|
||||
{
|
||||
public:
|
||||
EffectMakerView(QmlDesigner::ExternalDependenciesInterface &externalDependencies);
|
||||
~EffectMakerView() override;
|
||||
EffectComposerView(QmlDesigner::ExternalDependenciesInterface &externalDependencies);
|
||||
~EffectComposerView() override;
|
||||
|
||||
bool hasWidget() const override;
|
||||
QmlDesigner::WidgetInfo widgetInfo() override;
|
||||
@@ -39,8 +39,8 @@ private:
|
||||
void customNotification(const AbstractView *view, const QString &identifier,
|
||||
const QList<QmlDesigner::ModelNode> &nodeList, const QList<QVariant> &data) override;
|
||||
|
||||
QPointer<EffectMakerWidget> m_widget;
|
||||
QPointer<EffectComposerWidget> m_widget;
|
||||
QString m_currProjectPath;
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
@@ -1,12 +1,12 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "effectmakerwidget.h"
|
||||
#include "effectcomposerwidget.h"
|
||||
|
||||
#include "effectmakercontextobject.h"
|
||||
#include "effectmakermodel.h"
|
||||
#include "effectmakernodesmodel.h"
|
||||
#include "effectmakerview.h"
|
||||
#include "effectcomposercontextobject.h"
|
||||
#include "effectcomposermodel.h"
|
||||
#include "effectcomposernodesmodel.h"
|
||||
#include "effectcomposerview.h"
|
||||
#include "effectutils.h"
|
||||
#include "propertyhandler.h"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <QQuickItem>
|
||||
#include <QTimer>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
static QString propertyEditorResourcesPath()
|
||||
{
|
||||
@@ -46,10 +46,10 @@ static QString propertyEditorResourcesPath()
|
||||
return Core::ICore::resourcePath("qmldesigner/propertyEditorQmlSources").toString();
|
||||
}
|
||||
|
||||
EffectMakerWidget::EffectMakerWidget(EffectMakerView *view)
|
||||
: m_effectMakerModel{new EffectMakerModel(this)}
|
||||
, m_effectMakerNodesModel{new EffectMakerNodesModel(this)}
|
||||
, m_effectMakerView(view)
|
||||
EffectComposerWidget::EffectComposerWidget(EffectComposerView *view)
|
||||
: m_effectComposerModel{new EffectComposerModel(this)}
|
||||
, m_effectComposerNodesModel{new EffectComposerNodesModel(this)}
|
||||
, m_effectComposerView(view)
|
||||
, m_quickWidget{new StudioQuickWidget(this)}
|
||||
{
|
||||
setWindowTitle(tr("Effect Composer", "Title of effect composer widget"));
|
||||
@@ -58,7 +58,7 @@ EffectMakerWidget::EffectMakerWidget(EffectMakerView *view)
|
||||
m_quickWidget->quickWidget()->installEventFilter(this);
|
||||
|
||||
// create the inner widget
|
||||
m_quickWidget->quickWidget()->setObjectName(QmlDesigner::Constants::OBJECT_NAME_EFFECT_MAKER);
|
||||
m_quickWidget->quickWidget()->setObjectName(QmlDesigner::Constants::OBJECT_NAME_EFFECT_COMPOSER);
|
||||
m_quickWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||
QmlDesigner::Theme::setupTheme(m_quickWidget->engine());
|
||||
m_quickWidget->engine()->addImportPath(propertyEditorResourcesPath() + "/imports");
|
||||
@@ -74,7 +74,7 @@ EffectMakerWidget::EffectMakerWidget(EffectMakerView *view)
|
||||
setStyleSheet(QmlDesigner::Theme::replaceCssColors(
|
||||
QString::fromUtf8(Utils::FileReader::fetchQrc(":/qmldesigner/stylesheet.css"))));
|
||||
|
||||
QmlDesigner::QmlDesignerPlugin::trackWidgetFocusTime(this, QmlDesigner::Constants::EVENT_EFFECTMAKER_TIME);
|
||||
QmlDesigner::QmlDesignerPlugin::trackWidgetFocusTime(this, QmlDesigner::Constants::EVENT_EFFECTCOMPOSER_TIME);
|
||||
|
||||
m_quickWidget->rootContext()->setContextProperty("g_propertyData", &g_propertyData);
|
||||
|
||||
@@ -82,23 +82,21 @@ EffectMakerWidget::EffectMakerWidget(EffectMakerView *view)
|
||||
g_propertyData.insert(QString("blur_vs_path"), QString(blurPath + "bluritems.vert.qsb"));
|
||||
g_propertyData.insert(QString("blur_fs_path"), QString(blurPath + "bluritems.frag.qsb"));
|
||||
|
||||
auto map = m_quickWidget->registerPropertyMap("EffectMakerBackend");
|
||||
map->setProperties({{"effectMakerNodesModel", QVariant::fromValue(m_effectMakerNodesModel.data())},
|
||||
{"effectMakerModel", QVariant::fromValue(m_effectMakerModel.data())},
|
||||
auto map = m_quickWidget->registerPropertyMap("EffectComposerBackend");
|
||||
map->setProperties({{"effectComposerNodesModel", QVariant::fromValue(m_effectComposerNodesModel.data())},
|
||||
{"effectComposerModel", QVariant::fromValue(m_effectComposerModel.data())},
|
||||
{"rootView", QVariant::fromValue(this)}});
|
||||
QmlDesigner::QmlDesignerPlugin::trackWidgetFocusTime(
|
||||
this, QmlDesigner::Constants::EVENT_NEWEFFECTMAKER_TIME);
|
||||
|
||||
connect(m_effectMakerModel.data(), &EffectMakerModel::nodesChanged, this, [this]() {
|
||||
m_effectMakerNodesModel->updateCanBeAdded(m_effectMakerModel->uniformNames());
|
||||
connect(m_effectComposerModel.data(), &EffectComposerModel::nodesChanged, this, [this]() {
|
||||
m_effectComposerNodesModel->updateCanBeAdded(m_effectComposerModel->uniformNames());
|
||||
});
|
||||
|
||||
connect(m_effectMakerModel.data(), &EffectMakerModel::resourcesSaved,
|
||||
connect(m_effectComposerModel.data(), &EffectComposerModel::resourcesSaved,
|
||||
this, [this](const QmlDesigner::TypeName &type, const Utils::FilePath &path) {
|
||||
if (!m_importScan.timer) {
|
||||
m_importScan.timer = new QTimer(this);
|
||||
connect(m_importScan.timer, &QTimer::timeout,
|
||||
this, &EffectMakerWidget::handleImportScanTimer);
|
||||
this, &EffectComposerWidget::handleImportScanTimer);
|
||||
}
|
||||
|
||||
if (m_importScan.timer->isActive() && !m_importScan.future.isFinished())
|
||||
@@ -113,7 +111,7 @@ EffectMakerWidget::EffectMakerWidget(EffectMakerView *view)
|
||||
}
|
||||
|
||||
|
||||
bool EffectMakerWidget::eventFilter(QObject *obj, QEvent *event)
|
||||
bool EffectComposerWidget::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
Q_UNUSED(obj)
|
||||
Q_UNUSED(event)
|
||||
@@ -123,70 +121,70 @@ bool EffectMakerWidget::eventFilter(QObject *obj, QEvent *event)
|
||||
return false;
|
||||
}
|
||||
|
||||
void EffectMakerWidget::contextHelp(const Core::IContext::HelpCallback &callback) const
|
||||
void EffectComposerWidget::contextHelp(const Core::IContext::HelpCallback &callback) const
|
||||
{
|
||||
Q_UNUSED(callback)
|
||||
}
|
||||
|
||||
StudioQuickWidget *EffectMakerWidget::quickWidget() const
|
||||
StudioQuickWidget *EffectComposerWidget::quickWidget() const
|
||||
{
|
||||
return m_quickWidget.data();
|
||||
}
|
||||
|
||||
QPointer<EffectMakerModel> EffectMakerWidget::effectMakerModel() const
|
||||
QPointer<EffectComposerModel> EffectComposerWidget::effectComposerModel() const
|
||||
{
|
||||
return m_effectMakerModel;
|
||||
return m_effectComposerModel;
|
||||
}
|
||||
|
||||
QPointer<EffectMakerNodesModel> EffectMakerWidget::effectMakerNodesModel() const
|
||||
QPointer<EffectComposerNodesModel> EffectComposerWidget::effectComposerNodesModel() const
|
||||
{
|
||||
return m_effectMakerNodesModel;
|
||||
return m_effectComposerNodesModel;
|
||||
}
|
||||
|
||||
void EffectMakerWidget::addEffectNode(const QString &nodeQenPath)
|
||||
void EffectComposerWidget::addEffectNode(const QString &nodeQenPath)
|
||||
{
|
||||
m_effectMakerModel->addNode(nodeQenPath);
|
||||
m_effectComposerModel->addNode(nodeQenPath);
|
||||
}
|
||||
|
||||
void EffectMakerWidget::focusSection(int section)
|
||||
void EffectComposerWidget::focusSection(int section)
|
||||
{
|
||||
Q_UNUSED(section)
|
||||
}
|
||||
|
||||
QRect EffectMakerWidget::screenRect() const
|
||||
QRect EffectComposerWidget::screenRect() const
|
||||
{
|
||||
if (m_quickWidget && m_quickWidget->screen())
|
||||
return m_quickWidget->screen()->availableGeometry();
|
||||
return {};
|
||||
}
|
||||
|
||||
QPoint EffectMakerWidget::globalPos(const QPoint &point) const
|
||||
QPoint EffectComposerWidget::globalPos(const QPoint &point) const
|
||||
{
|
||||
if (m_quickWidget)
|
||||
return m_quickWidget->mapToGlobal(point);
|
||||
return point;
|
||||
}
|
||||
|
||||
QSize EffectMakerWidget::sizeHint() const
|
||||
QSize EffectComposerWidget::sizeHint() const
|
||||
{
|
||||
return {420, 420};
|
||||
}
|
||||
|
||||
QString EffectMakerWidget::qmlSourcesPath()
|
||||
QString EffectComposerWidget::qmlSourcesPath()
|
||||
{
|
||||
#ifdef SHARE_QML_PATH
|
||||
if (Utils::qtcEnvironmentVariableIsSet("LOAD_QML_FROM_SOURCE"))
|
||||
return QLatin1String(SHARE_QML_PATH) + "/effectMakerQmlSources";
|
||||
return QLatin1String(SHARE_QML_PATH) + "/effectComposerQmlSources";
|
||||
#endif
|
||||
return Core::ICore::resourcePath("qmldesigner/effectMakerQmlSources").toString();
|
||||
return Core::ICore::resourcePath("qmldesigner/effectComposerQmlSources").toString();
|
||||
}
|
||||
|
||||
void EffectMakerWidget::initView()
|
||||
void EffectComposerWidget::initView()
|
||||
{
|
||||
auto ctxObj = new EffectMakerContextObject(m_quickWidget->rootContext());
|
||||
auto ctxObj = new EffectComposerContextObject(m_quickWidget->rootContext());
|
||||
m_quickWidget->rootContext()->setContextObject(ctxObj);
|
||||
|
||||
m_backendModelNode.setup(m_effectMakerView->rootModelNode());
|
||||
m_backendModelNode.setup(m_effectComposerView->rootModelNode());
|
||||
m_quickWidget->rootContext()->setContextProperty("anchorBackend", &m_backendAnchorBinding);
|
||||
m_quickWidget->rootContext()->setContextProperty("modelNodeBackend", &m_backendModelNode);
|
||||
m_quickWidget->rootContext()->setContextProperty("activeDragSuffix", "");
|
||||
@@ -200,29 +198,29 @@ void EffectMakerWidget::initView()
|
||||
reloadQmlSource();
|
||||
}
|
||||
|
||||
void EffectMakerWidget::openComposition(const QString &path)
|
||||
void EffectComposerWidget::openComposition(const QString &path)
|
||||
{
|
||||
m_compositionPath = path;
|
||||
|
||||
if (effectMakerModel()->hasUnsavedChanges())
|
||||
if (effectComposerModel()->hasUnsavedChanges())
|
||||
QMetaObject::invokeMethod(quickWidget()->rootObject(), "promptToSaveBeforeOpen");
|
||||
else
|
||||
doOpenComposition();
|
||||
}
|
||||
|
||||
void EffectMakerWidget::doOpenComposition()
|
||||
void EffectComposerWidget::doOpenComposition()
|
||||
{
|
||||
effectMakerModel()->openComposition(m_compositionPath);
|
||||
effectComposerModel()->openComposition(m_compositionPath);
|
||||
}
|
||||
|
||||
void EffectMakerWidget::reloadQmlSource()
|
||||
void EffectComposerWidget::reloadQmlSource()
|
||||
{
|
||||
const QString effectMakerQmlPath = qmlSourcesPath() + "/EffectMaker.qml";
|
||||
QTC_ASSERT(QFileInfo::exists(effectMakerQmlPath), return);
|
||||
m_quickWidget->setSource(QUrl::fromLocalFile(effectMakerQmlPath));
|
||||
const QString effectComposerQmlPath = qmlSourcesPath() + "/EffectComposer.qml";
|
||||
QTC_ASSERT(QFileInfo::exists(effectComposerQmlPath), return);
|
||||
m_quickWidget->setSource(QUrl::fromLocalFile(effectComposerQmlPath));
|
||||
}
|
||||
|
||||
void EffectMakerWidget::handleImportScanTimer()
|
||||
void EffectComposerWidget::handleImportScanTimer()
|
||||
{
|
||||
++m_importScan.counter;
|
||||
|
||||
@@ -247,24 +245,24 @@ void EffectMakerWidget::handleImportScanTimer()
|
||||
m_importScan.timer->stop();
|
||||
m_importScan.counter = 0;
|
||||
} else if (m_importScan.counter == 101) {
|
||||
if (m_effectMakerView->model() && m_effectMakerView->model()->rewriterView()) {
|
||||
if (m_effectComposerView->model() && m_effectComposerView->model()->rewriterView()) {
|
||||
QmlDesigner::QmlDesignerPlugin::instance()->documentManager().resetPossibleImports();
|
||||
m_effectMakerView->model()->rewriterView()->forceAmend();
|
||||
m_effectComposerView->model()->rewriterView()->forceAmend();
|
||||
}
|
||||
} else if (m_importScan.counter == 102) {
|
||||
if (m_effectMakerView->model()) {
|
||||
if (m_effectComposerView->model()) {
|
||||
// If type is in use, we have to reset puppet to update 2D view
|
||||
if (!m_effectMakerView->allModelNodesOfType(
|
||||
m_effectMakerView->model()->metaInfo(m_importScan.type)).isEmpty()) {
|
||||
m_effectMakerView->resetPuppet();
|
||||
if (!m_effectComposerView->allModelNodesOfType(
|
||||
m_effectComposerView->model()->metaInfo(m_importScan.type)).isEmpty()) {
|
||||
m_effectComposerView->resetPuppet();
|
||||
}
|
||||
}
|
||||
} else if (m_importScan.counter >= 103) {
|
||||
// Refresh property view by resetting selection if any selected node is of updated type
|
||||
if (m_effectMakerView->model() && m_effectMakerView->hasSelectedModelNodes()) {
|
||||
const auto nodes = m_effectMakerView->selectedModelNodes();
|
||||
if (m_effectComposerView->model() && m_effectComposerView->hasSelectedModelNodes()) {
|
||||
const auto nodes = m_effectComposerView->selectedModelNodes();
|
||||
QmlDesigner::MetaInfoType metaType
|
||||
= m_effectMakerView->model()->metaInfo(m_importScan.type).type();
|
||||
= m_effectComposerView->model()->metaInfo(m_importScan.type).type();
|
||||
bool match = false;
|
||||
for (const QmlDesigner::ModelNode &node : nodes) {
|
||||
if (node.metaInfo().type() == metaType) {
|
||||
@@ -273,8 +271,8 @@ void EffectMakerWidget::handleImportScanTimer()
|
||||
}
|
||||
}
|
||||
if (match) {
|
||||
m_effectMakerView->clearSelectedModelNodes();
|
||||
m_effectMakerView->setSelectedModelNodes(nodes);
|
||||
m_effectComposerView->clearSelectedModelNodes();
|
||||
m_effectComposerView->setSelectedModelNodes(nodes);
|
||||
}
|
||||
}
|
||||
m_importScan.timer->stop();
|
||||
@@ -282,5 +280,5 @@ void EffectMakerWidget::handleImportScanTimer()
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "qmldesigner/components/propertyeditor/qmlanchorbindingproxy.h"
|
||||
#include "qmldesigner/components/propertyeditor/qmlmodelnodeproxy.h"
|
||||
#include <qmldesigner/components/propertyeditor/qmlanchorbindingproxy.h>
|
||||
#include <qmldesigner/components/propertyeditor/qmlmodelnodeproxy.h>
|
||||
|
||||
#include <coreplugin/icontext.h>
|
||||
|
||||
@@ -17,19 +17,19 @@ QT_BEGIN_NAMESPACE
|
||||
class QTimer;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class EffectMakerView;
|
||||
class EffectMakerModel;
|
||||
class EffectMakerNodesModel;
|
||||
class EffectComposerView;
|
||||
class EffectComposerModel;
|
||||
class EffectComposerNodesModel;
|
||||
|
||||
class EffectMakerWidget : public QFrame
|
||||
class EffectComposerWidget : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EffectMakerWidget(EffectMakerView *view);
|
||||
~EffectMakerWidget() = default;
|
||||
EffectComposerWidget(EffectComposerView *view);
|
||||
~EffectComposerWidget() = default;
|
||||
|
||||
void contextHelp(const Core::IContext::HelpCallback &callback) const;
|
||||
|
||||
@@ -42,8 +42,8 @@ public:
|
||||
void openComposition(const QString &path);
|
||||
|
||||
StudioQuickWidget *quickWidget() const;
|
||||
QPointer<EffectMakerModel> effectMakerModel() const;
|
||||
QPointer<EffectMakerNodesModel> effectMakerNodesModel() const;
|
||||
QPointer<EffectComposerModel> effectComposerModel() const;
|
||||
QPointer<EffectComposerNodesModel> effectComposerNodesModel() const;
|
||||
|
||||
Q_INVOKABLE void addEffectNode(const QString &nodeQenPath);
|
||||
Q_INVOKABLE void focusSection(int section);
|
||||
@@ -60,9 +60,9 @@ private:
|
||||
void reloadQmlSource();
|
||||
void handleImportScanTimer();
|
||||
|
||||
QPointer<EffectMakerModel> m_effectMakerModel;
|
||||
QPointer<EffectMakerNodesModel> m_effectMakerNodesModel;
|
||||
QPointer<EffectMakerView> m_effectMakerView;
|
||||
QPointer<EffectComposerModel> m_effectComposerModel;
|
||||
QPointer<EffectComposerNodesModel> m_effectComposerNodesModel;
|
||||
QPointer<EffectComposerView> m_effectComposerView;
|
||||
QPointer<StudioQuickWidget> m_quickWidget;
|
||||
QmlDesigner::QmlModelNodeProxy m_backendModelNode;
|
||||
QmlDesigner::QmlAnchorBindingProxy m_backendAnchorBinding;
|
||||
@@ -79,5 +79,5 @@ private:
|
||||
QString m_compositionPath;
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
EffectNode::EffectNode(const QString &qenPath)
|
||||
: m_qenPath(qenPath)
|
||||
@@ -63,5 +63,5 @@ bool EffectNode::hasUniform(const QString &name)
|
||||
return m_uniformNames.contains(name);
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <QSet>
|
||||
#include <QUrl>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class EffectNode : public QObject
|
||||
{
|
||||
@@ -42,5 +42,5 @@ private:
|
||||
QSet<QString> m_uniformNames;
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "effectnodescategory.h"
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
EffectNodesCategory::EffectNodesCategory(const QString &name, const QList<EffectNode *> &nodes)
|
||||
: m_name(name),
|
||||
@@ -19,5 +19,5 @@ QList<EffectNode *> EffectNodesCategory::nodes() const
|
||||
return m_categoryNodes;
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class EffectNodesCategory : public QObject
|
||||
{
|
||||
@@ -27,5 +27,5 @@ private:
|
||||
QList<EffectNode *> m_categoryNodes;
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <QJsonArray>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
QString EffectUtils::codeFromJsonArray(const QJsonArray &codeArray)
|
||||
{
|
||||
@@ -26,10 +26,9 @@ QString EffectUtils::nodesSourcesPath()
|
||||
{
|
||||
#ifdef SHARE_QML_PATH
|
||||
if (Utils::qtcEnvironmentVariableIsSet("LOAD_QML_FROM_SOURCE"))
|
||||
return QLatin1String(SHARE_QML_PATH) + "/effectMakerNodes";
|
||||
return QLatin1String(SHARE_QML_PATH) + "/effectComposerNodes";
|
||||
#endif
|
||||
return Core::ICore::resourcePath("qmldesigner/effectMakerNodes").toString();
|
||||
return Core::ICore::resourcePath("qmldesigner/effectComposerNodes").toString();
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
|
||||
} // namespace EffectComposer
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QJsonArray)
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class EffectUtils
|
||||
{
|
||||
@@ -19,5 +19,5 @@ public:
|
||||
static QString nodesSourcesPath();
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "propertyhandler.h"
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
QQmlPropertyMap g_propertyData;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <QQmlPropertyMap>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
// This will be used for binding dynamic properties
|
||||
// changes between C++ and QML.
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <QStringList>
|
||||
#include <QDebug>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
ShaderFeatures::ShaderFeatures()
|
||||
{
|
||||
@@ -87,5 +87,5 @@ int ShaderFeatures::gridMeshWidth() const
|
||||
return m_gridMeshWidth;
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <QFlags>
|
||||
#include <QString>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class ShaderFeatures
|
||||
{
|
||||
@@ -40,5 +40,5 @@ private:
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(ShaderFeatures::Features)
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "syntaxhighlighterdata.h"
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
static constexpr QByteArrayView shader_arg_names[] {
|
||||
{ "gl_Position" },
|
||||
@@ -186,6 +186,6 @@ QList<QByteArrayView> SyntaxHighlighterData::reservedFunctionNames()
|
||||
return { std::begin(shader_function_names), std::end(shader_function_names) };
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <QByteArrayView>
|
||||
#include <QList>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class SyntaxHighlighterData
|
||||
{
|
||||
@@ -18,6 +18,6 @@ public:
|
||||
static QList<QByteArrayView> reservedFunctionNames();
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <QJsonObject>
|
||||
#include <QVector2D>
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
Uniform::Uniform(const QString &effectName, const QJsonObject &propObj, const QString &qenPath)
|
||||
: m_qenPath(qenPath)
|
||||
@@ -342,4 +342,4 @@ QString Uniform::typeToProperty(Uniform::Type type)
|
||||
return QString();
|
||||
}
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
@@ -12,7 +12,7 @@ QT_FORWARD_DECLARE_CLASS(QColor)
|
||||
QT_FORWARD_DECLARE_CLASS(QJsonObject)
|
||||
QT_FORWARD_DECLARE_CLASS(QVector2D)
|
||||
|
||||
namespace EffectMaker {
|
||||
namespace EffectComposer {
|
||||
|
||||
class Uniform : public QObject
|
||||
{
|
||||
@@ -109,4 +109,4 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace EffectMaker
|
||||
} // namespace EffectComposer
|
||||
@@ -190,12 +190,12 @@ QString AssetsLibraryWidget::getUniqueEffectPath(const QString &parentFolder, co
|
||||
return path;
|
||||
}
|
||||
|
||||
bool AssetsLibraryWidget::createNewEffect(const QString &effectPath, bool openInEffectMaker)
|
||||
bool AssetsLibraryWidget::createNewEffect(const QString &effectPath, bool openInEffectComposer)
|
||||
{
|
||||
bool created = QFile(effectPath).open(QIODevice::WriteOnly);
|
||||
|
||||
if (created && openInEffectMaker) {
|
||||
openEffectMaker(effectPath);
|
||||
if (created && openInEffectComposer) {
|
||||
openEffectComposer(effectPath);
|
||||
emit directoryCreated(QFileInfo(effectPath).absolutePath());
|
||||
}
|
||||
|
||||
@@ -432,9 +432,9 @@ QSet<QString> AssetsLibraryWidget::supportedAssetSuffixes(bool complex)
|
||||
return suffixes;
|
||||
}
|
||||
|
||||
void AssetsLibraryWidget::openEffectMaker(const QString &filePath)
|
||||
void AssetsLibraryWidget::openEffectComposer(const QString &filePath)
|
||||
{
|
||||
ModelNodeOperations::openEffectMaker(filePath);
|
||||
ModelNodeOperations::openEffectComposer(filePath);
|
||||
}
|
||||
|
||||
QString AssetsLibraryWidget::qmlSourcesPath()
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
const QString &targetDirPath = {});
|
||||
|
||||
Q_INVOKABLE QSet<QString> supportedAssetSuffixes(bool complex);
|
||||
Q_INVOKABLE void openEffectMaker(const QString &filePath);
|
||||
Q_INVOKABLE void openEffectComposer(const QString &filePath);
|
||||
Q_INVOKABLE int qtVersion() const;
|
||||
Q_INVOKABLE void invalidateThumbnail(const QString &id);
|
||||
Q_INVOKABLE QSize imageSize(const QString &id);
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
Q_INVOKABLE void updateContextMenuActionsEnableState();
|
||||
|
||||
Q_INVOKABLE QString getUniqueEffectPath(const QString &parentFolder, const QString &effectName);
|
||||
Q_INVOKABLE bool createNewEffect(const QString &effectPath, bool openInEffectMaker = true);
|
||||
Q_INVOKABLE bool createNewEffect(const QString &effectPath, bool openInEffectComposer = true);
|
||||
|
||||
Q_INVOKABLE bool canCreateEffects() const;
|
||||
|
||||
|
||||
@@ -1623,21 +1623,21 @@ void updateImported3DAsset(const SelectionContext &selectionContext)
|
||||
}
|
||||
}
|
||||
|
||||
bool isNewEffectMakerActivated()
|
||||
bool isEffectComposerActivated()
|
||||
{
|
||||
const QVector<ExtensionSystem::PluginSpec *> specs = ExtensionSystem::PluginManager::plugins();
|
||||
return std::find_if(specs.begin(), specs.end(),
|
||||
[](ExtensionSystem::PluginSpec *spec) {
|
||||
return spec->name() == "EffectMakerNew" && spec->isEffectivelyEnabled();
|
||||
return spec->name() == "EffectComposer" && spec->isEffectivelyEnabled();
|
||||
})
|
||||
!= specs.end();
|
||||
}
|
||||
|
||||
void openEffectMaker(const QString &filePath)
|
||||
void openEffectComposer(const QString &filePath)
|
||||
{
|
||||
if (ModelNodeOperations::isNewEffectMakerActivated()) {
|
||||
if (ModelNodeOperations::isEffectComposerActivated()) {
|
||||
QmlDesignerPlugin::instance()->viewManager()
|
||||
.emitCustomNotification("open_effectmaker_composition", {}, {filePath});
|
||||
.emitCustomNotification("open_effectcomposer_composition", {}, {filePath});
|
||||
QmlDesignerPlugin::instance()->mainWidget()->showDockWidget("Effect Composer", true);
|
||||
} else {
|
||||
ModelNodeOperations::openOldEffectMaker(filePath);
|
||||
@@ -1748,7 +1748,7 @@ bool validateEffect(const QString &effectPath)
|
||||
msgBox.setDefaultButton(QMessageBox::Yes);
|
||||
msgBox.setIcon(QMessageBox::Question);
|
||||
if (msgBox.exec() == QMessageBox::Yes)
|
||||
ModelNodeOperations::openEffectMaker(effectPath);
|
||||
ModelNodeOperations::openEffectComposer(effectPath);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -126,12 +126,12 @@ void updateImported3DAsset(const SelectionContext &selectionContext);
|
||||
|
||||
QMLDESIGNERCOMPONENTS_EXPORT Utils::FilePath getEffectsImportDirectory();
|
||||
QMLDESIGNERCOMPONENTS_EXPORT QString getEffectsDefaultDirectory(const QString &defaultDir = {});
|
||||
void openEffectMaker(const QString &filePath);
|
||||
void openEffectComposer(const QString &filePath);
|
||||
void openOldEffectMaker(const QString &filePath);
|
||||
QString getEffectIcon(const QString &effectPath);
|
||||
bool useLayerEffect();
|
||||
bool validateEffect(const QString &effectPath);
|
||||
bool isNewEffectMakerActivated();
|
||||
bool isEffectComposerActivated();
|
||||
|
||||
Utils::FilePath getImagesDefaultDirectory();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ const char C_DUPLICATE[] = "QmlDesigner.Duplicate";
|
||||
const char C_QMLDESIGNER[] = "QmlDesigner::QmlDesignerMain";
|
||||
const char C_QMLFORMEDITOR[] = "QmlDesigner::FormEditor";
|
||||
const char C_QMLEDITOR3D[] = "QmlDesigner::Editor3D";
|
||||
const char C_QMLEFFECTMAKER[] = "QmlDesigner::EffectMaker";
|
||||
const char C_QMLEFFECTCOMPOSER[] = "QmlDesigner::EffectComposer";
|
||||
const char C_QMLNAVIGATOR[] = "QmlDesigner::Navigator";
|
||||
const char C_QMLTEXTEDITOR[] = "QmlDesigner::TextEditor";
|
||||
const char C_QMLMATERIALBROWSER[] = "QmlDesigner::MaterialBrowser";
|
||||
@@ -126,7 +126,7 @@ const char EVENT_TEXTEDITOR_TIME[] = "textEditor";
|
||||
const char EVENT_TEXTUREEDITOR_TIME[] = "textureEditor";
|
||||
const char EVENT_PROPERTYEDITOR_TIME[] = "propertyEditor";
|
||||
const char EVENT_ASSETSLIBRARY_TIME[] = "assetsLibrary";
|
||||
const char EVENT_EFFECTMAKER_TIME[] = "effectMaker";
|
||||
const char EVENT_EFFECTCOMPOSER_TIME[] = "effectComposer";
|
||||
const char EVENT_ITEMLIBRARY_TIME[] = "itemLibrary";
|
||||
const char EVENT_TRANSLATIONVIEW_TIME[] = "translationView";
|
||||
const char EVENT_NAVIGATORVIEW_TIME[] = "navigatorView";
|
||||
@@ -136,7 +136,6 @@ const char EVENT_MATERIALBROWSER_TIME[] = "materialBrowser";
|
||||
const char EVENT_CONTENTLIBRARY_TIME[] = "contentLibrary";
|
||||
const char EVENT_INSIGHT_TIME[] = "insight";
|
||||
const char EVENT_MODELEDITOR_TIME[] = "modelEditor";
|
||||
const char EVENT_NEWEFFECTMAKER_TIME[] = "newEffectMaker";
|
||||
const char EVENT_TOOLBAR_MODE_CHANGE[] = "ToolBarTriggerModeChange";
|
||||
const char EVENT_TOOLBAR_PROJECT_SETTINGS[] = "ToolBarTriggerProjectSettings";
|
||||
const char EVENT_TOOLBAR_RUN_PROJECT[] = "ToolBarRunProject";
|
||||
@@ -159,7 +158,7 @@ const char OBJECT_NAME_ASSET_LIBRARY[] = "QQuickWidgetAssetLibrary";
|
||||
const char OBJECT_NAME_CONTENT_LIBRARY[] = "QQuickWidgetContentLibrary";
|
||||
const char OBJECT_NAME_BUSY_INDICATOR[] = "QQuickWidgetBusyIndicator";
|
||||
const char OBJECT_NAME_COMPONENT_LIBRARY[] = "QQuickWidgetComponentLibrary";
|
||||
const char OBJECT_NAME_EFFECT_MAKER[] = "QQuickWidgetEffectMaker";
|
||||
const char OBJECT_NAME_EFFECT_COMPOSER[] = "QQuickWidgetEffectComposer";
|
||||
const char OBJECT_NAME_MATERIAL_BROWSER[] = "QQuickWidgetMaterialBrowser";
|
||||
const char OBJECT_NAME_MATERIAL_EDITOR[] = "QQuickWidgetMaterialEditor";
|
||||
const char OBJECT_NAME_PROPERTY_EDITOR[] = "QQuickWidgetPropertyEditor";
|
||||
|
||||