summaryrefslogtreecommitdiff
path: root/Diagram.qml
diff options
context:
space:
mode:
authorvincent.jeong <vincent.jeong@windriver.com>2015-12-29 02:28:00 +0900
committerJooncheol Park <jooncheol.park@windriver.com>2016-01-08 18:06:29 +0900
commiteea896440e5ad49622c7b1a4095f0d63c3465aa2 (patch)
tree1d4feb614fc82dd15bcf32cd663225abc316ea9e /Diagram.qml
parent30b7817bb5c2de17c725d6624d073092d3a821c0 (diff)
downloadaudiomanagerdemo-eea896440e5ad49622c7b1a4095f0d63c3465aa2.tar.gz
- Refactoring Graph for AudioManagerMonitor
1) Redesign Graph object with method and property. 2) Remove unnecessary code. 3) Adjust offset of line color for AudioManagerGraph. 4) Draw Tranisent line of PulseAudioGraph according to play's status Signed-off-by: vincent.jeong <vincent.jeong@windriver.com> Signed-off-by: Jooncheol Park <jooncheol.park@windriver.com>
Diffstat (limited to 'Diagram.qml')
-rw-r--r--Diagram.qml12
1 files changed, 7 insertions, 5 deletions
diff --git a/Diagram.qml b/Diagram.qml
index a320881..21f0a53 100644
--- a/Diagram.qml
+++ b/Diagram.qml
@@ -46,7 +46,7 @@ Item {
onSinkInfoChanged: {
console.log("onSinkInfoChanged " + sinkinfo.index + " Volume " + sinkinfo.volume);
Code.savePASinkInfo(sinkinfo);
- architectureDiagram.requestPaint();
+ architectureDiagram.requestPaint();
audiomanagerChart.updateData(sinkinfo.name, sinkinfo.index, sinkinfo.volume);
sinkInfoProcessed(0, sinkinfo.index);
@@ -262,12 +262,13 @@ Item {
id: audiomanagerChart
graphName : "AudiomanagerChart"
title: "Sinks of GENIVIĀ® Audio Manager"
- description: "AM's Sink volume changes by Control Plugin"
+ description: "AM's Sink volume changes by Control Plugin"
anchors.fill: parent
defaultValue : 0
maxDataLength: 100
width: parent.width
height: parent.height
+ type: Code.GraphType.CONTINUOUS_LINE
}
}
@@ -281,13 +282,14 @@ Item {
Graph {
id: pulseaudioChart
title: "Sink Inputs of PulseAudio"
- description: "PA's Sink Input volume changes"
+ description: "PA's Sink Input volume changes"
anchors.fill: parent
graphName : "PulseAudioChart"
defaultValue : 0
maxDataLength: 100
width: parent.width
height: parent.height
+ type: Code.GraphType.TRANSIENT_LINE
}
}
@@ -570,7 +572,7 @@ Item {
}
);
ctx.save();
- ctx.strokeStyle = Code.getGraphNodeData("AudiomanagerChart", sink.name).color;
+ ctx.strokeStyle = audiomanagerChart.getGraphNodeColor(sink.name);
ctx.beginPath();
ctx.moveTo(tx+tw, ty+(th+th/4)*i+th/2);
ctx.lineTo(tx+tw+tw*2/5, ty+(th+th/4)*i+th/2);
@@ -626,7 +628,7 @@ Item {
var sink = Code.paSinks[j];
if(sink.index == client.sinkInput.sinkIndex) {
ctx.fillText(" Stream idx: "+sinkInput.index, tx+tw,ty+(th+th/4)*i+th/2);
- ctx.strokeStyle = Code.getGraphNodeColor("PulseAudioChart", client.sinkInput.role);
+ ctx.strokeStyle = pulseaudioChart.getGraphNodeColor(client.sinkInput.role);
ctx.beginPath();
ctx.moveTo(tx+tw,ty+(th+th/4)*i+th/2);
ctx.lineTo(sinkJCX, sinkJCY+(sinkH+sinkH/4)*j+sinkH/2);