-
Notifications
You must be signed in to change notification settings - Fork 0
/
Connections.qml
127 lines (113 loc) · 3.06 KB
/
Connections.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.1
Item {
id: item1
Layout.minimumHeight: 200
Canvas {
id: canvas;
anchors.fill: parent;
contextType: "2d";
renderStrategy: Canvas.Threaded;
renderTarget: Canvas.Image;
antialiasing: true;
smooth: true;
onPaint: {
if (context) {
console.log(rFFT.y);
context.clearRect (0, 0, width, height);
context.beginPath ();
context.moveTo(rIn.x + rIn.width / 2, rIn.y + rIn.height);
context.lineTo(rFFT.x + rFFT.width / 2, rFFT.y);
context.stroke();
}
}
}
/*
Canvas {
id: canvas
anchors.fill: parent
onPaint: {
var ctx = getContext("2d");
// inputToFFT
//ctx.fillStyle="#FF0000";
ctx.clearRect(0,0,canvas.width,canvas.height);
ctx.moveTo(rIn.x + rIn.width / 2, rIn.y + rIn.height)
ctx.lineTo(rFFT.x + rFFT.width / 2, rFFT.y)
ctx.stroke();
//
}
}
Rectangle {
id: rSim
width: 100
height: 20
color: "transparent"
anchors.right: parent.right
anchors.rightMargin: 30
anchors.top: parent.top
anchors.topMargin: 30
border.color: "black"
radius: 5
antialiasing: true
Label {
text: "soundSimulate"
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
}*/
Rectangle {
id: rFFT
width: 100
height: 20
color: "#00000000"
anchors.bottom: parent.bottom
anchors.bottomMargin: 30
anchors.left: parent.left
anchors.leftMargin: 30
border.color: "#000000"
radius: 5
antialiasing: true
Label {
text: "soundFFT"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
Rectangle {
id: rLoc
width: 100
height: 20
color: "#00000000"
anchors.right: parent.right
anchors.rightMargin: 30
anchors.bottom: parent.bottom
anchors.bottomMargin: 30
border.color: "#000000"
radius: 5
antialiasing: true
Label {
text: "soundLocate"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
Rectangle {
id: rIn
width: 100
height: 20
color: "#00000000"
anchors.left: parent.left
anchors.leftMargin: 30
anchors.top: parent.top
anchors.topMargin: 30
border.color: "#000000"
radius: 5
antialiasing: true
Label {
text: "soundInput"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
}