How to send & receive signals

Please can you help me with this:

I want an object (gallery) within it´s user script to send a signal, other objects in their user script to receive this signal.

In the sender I defined a signal:

Item
{
id: root
signal manipulated(real var1, real var2)


}

later on, I call “root.manipulated(x,y)”

In the receiver I used your binding-example with Connections

Connections {
target: page.getBlockByName(“gal”) //.blockData
//onRotationZChanged: updatestate()
//onXChanged: updatestate()
onManipulated: {console.log(“manipulate”)}
}

“onRotationZChanged” etc. needs the blockData as target.
But how can I get access to the signal defined in the user-script of the target-object?

How to send and receive signals:

Connections {
target: page.getPageItemByName(“Sender”).qmlItem
onManipulated: console.log(var1 + “\n” + var2)
}

Also check the rotate_center.pma


Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.