mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
53 lines
934 B
QML
53 lines
934 B
QML
import QtQuick 2.11
|
|
|
|
Rectangle {
|
|
id: root
|
|
|
|
signal moved()
|
|
|
|
width: radius * 2
|
|
height: width
|
|
color: "transparent"
|
|
border.width: 5
|
|
border.color: "yellow"
|
|
|
|
Behavior on x {
|
|
NumberAnimation {
|
|
duration: 100
|
|
}
|
|
}
|
|
|
|
Behavior on y {
|
|
NumberAnimation {
|
|
duration: 100
|
|
}
|
|
}
|
|
|
|
Behavior on radius {
|
|
NumberAnimation {
|
|
duration: 100
|
|
}
|
|
}
|
|
|
|
MouseArea {
|
|
id: mArea
|
|
anchors.fill: parent
|
|
cursorShape: Qt.OpenHandCursor
|
|
acceptedButtons: Qt.LeftButton
|
|
hoverEnabled: true
|
|
drag.target: parent
|
|
|
|
drag.onActiveChanged:
|
|
{
|
|
if(!drag.active)
|
|
{
|
|
cursorShape = Qt.OpenHandCursor;
|
|
moved();
|
|
}
|
|
else
|
|
{
|
|
cursorShape = Qt.ClosedHandCursor;
|
|
}
|
|
}
|
|
}
|
|
}
|