##// END OF EJS Templates
Added logging for signals in qml property tester
Tero Ahola -
r1383:955f59270da8
parent child
Show More
@@ -28,6 +28,20 Flow {
28 flow: Flow.TopToBottom
28 flow: Flow.TopToBottom
29 property variant series
29 property variant series
30
30
31 onSeriesChanged: {
32 seriesConnections.target = series;
33 }
34
35 Connections {
36 id: seriesConnections
37 ignoreUnknownSignals: true
38 onNameChanged: console.log("series.onNameChanged: " + series.name);
39 onVisibleChanged: console.log("series.onVisibleChanged: " + series.visible);
40 onColorChanged: console.log("series.onColorChanged: " + series.color);
41 onBorderColorChanged: console.log("series.onBorderColorChanged: " + series.borderColor);
42 onCountChanged: console.log("series.onCountChanged: " + series.count);
43 }
44
31 Button {
45 Button {
32 text: "visible"
46 text: "visible"
33 onClicked: series.visible = !series.visible;
47 onClicked: series.visible = !series.visible;
@@ -27,6 +27,29 Flow {
27 flow: Flow.TopToBottom
27 flow: Flow.TopToBottom
28 property variant series
28 property variant series
29
29
30 onSeriesChanged: {
31 seriesConnections.target = series;
32 setConnections.target = series.at(0);
33 }
34
35 Connections {
36 id: seriesConnections
37 ignoreUnknownSignals: true
38 onNameChanged: console.log("series.onNameChanged: " + series.name);
39 onVisibleChanged: console.log("series.onVisibleChanged: " + series.visible);
40 onLabelsVisibleChanged: console.log("series.onLabelsVisibleChanged: " + series.labelsVisible);
41 onCountChanged: console.log("series.onCountChanged: " + series.count);
42 }
43
44 Connections {
45 id: setConnections
46 ignoreUnknownSignals: true
47 onColorChanged: console.log("series.onColorChanged: " + series.color);
48 onBorderColorChanged: console.log("series.onBorderColorChanged: " + series.borderColor);
49 onLabelColorChanged: console.log("series.onLabelColorChanged: " + series.labelColor);
50 onCountChanged: console.log("series.onCountChanged: " + series.count);
51 }
52
30 Button {
53 Button {
31 text: "visible"
54 text: "visible"
32 onClicked: series.visible = !series.visible;
55 onClicked: series.visible = !series.visible;
@@ -58,7 +58,7 Rectangle {
58
58
59 Timer {
59 Timer {
60 id: repeatTimer
60 id: repeatTimer
61 interval: 200
61 interval: 140
62 repeat: true
62 repeat: true
63 triggeredOnStart: false
63 triggeredOnStart: false
64 running: false
64 running: false
@@ -28,8 +28,13 Flow {
28 flow: Flow.TopToBottom
28 flow: Flow.TopToBottom
29 property variant series // TODO: rename to chart
29 property variant series // TODO: rename to chart
30
30
31 onSeriesChanged: {
32 legendConnections.target = series.legend
33 }
34
31 Connections {
35 Connections {
32 target: series
36 target: series
37 ignoreUnknownSignals: true
33 onVisibleChanged: console.log("chart.onVisibleChanged: " + series.visible);
38 onVisibleChanged: console.log("chart.onVisibleChanged: " + series.visible);
34 onThemeChanged: console.log("chart.onThemeChanged: " + series.theme);
39 onThemeChanged: console.log("chart.onThemeChanged: " + series.theme);
35 onLegendChanged: console.log("chart.onLegendChanged: " + series.legend);
40 onLegendChanged: console.log("chart.onLegendChanged: " + series.legend);
@@ -37,8 +42,10 Flow {
37 onTitleColorChanged: console.log("chart.onTitleColorChanged: " + series.titleColor);
42 onTitleColorChanged: console.log("chart.onTitleColorChanged: " + series.titleColor);
38 onBackgroundColorChanged: console.log("chart.onBackgroundColorChanged: " + series.backgroundColor);
43 onBackgroundColorChanged: console.log("chart.onBackgroundColorChanged: " + series.backgroundColor);
39 }
44 }
45
40 Connections {
46 Connections {
41 target: series.legend
47 id: legendConnections
48 ignoreUnknownSignals: true
42 onAlignmentChanged: console.log("legend.onAlignmentChanged: " + series.legend.alignment);
49 onAlignmentChanged: console.log("legend.onAlignmentChanged: " + series.legend.alignment);
43 onVisibleChanged: console.log("legend.onVisibleChanged: " + series.legend.visible);
50 onVisibleChanged: console.log("legend.onVisibleChanged: " + series.legend.visible);
44 }
51 }
@@ -28,6 +28,20 Flow {
28 flow: Flow.TopToBottom
28 flow: Flow.TopToBottom
29 property variant series
29 property variant series
30
30
31 onSeriesChanged: {
32 seriesConnections.target = series;
33 }
34
35 Connections {
36 id: seriesConnections
37 ignoreUnknownSignals: true
38 onNameChanged: console.log("series.onNameChanged: " + series.name);
39 onVisibleChanged: console.log("series.onVisibleChanged: " + series.visible);
40 onPointsVisibleChanged: console.log("series.onPointsVisibleChanged: " + series.pointsVisible);
41 onColorChanged: console.log("series.onColorChanged: " + series.color);
42 onCountChanged: console.log("series.onCountChanged: " + series.count);
43 }
44
31 Button {
45 Button {
32 text: "visible"
46 text: "visible"
33 onClicked: series.visible = !series.visible;
47 onClicked: series.visible = !series.visible;
@@ -27,6 +27,45 Flow {
27 flow: Flow.TopToBottom
27 flow: Flow.TopToBottom
28 property variant series
28 property variant series
29
29
30 onSeriesChanged: {
31 seriesConnections.target = series;
32 sliceConnections.target = series.at(0);
33 }
34
35 Connections {
36 id: seriesConnections
37 ignoreUnknownSignals: true
38 onVisibleChanged: console.log("series.onVisibleChanged: " + series.visible);
39 onHorizontalPositionChanged:console.log("series.onHorizontalPositionChanged: " + series.horizontalPosition);
40 onVerticalPositionChanged: console.log("series.onVerticalPositionChanged: " + series.verticalPosition);
41 onSizeChanged: console.log("series.onSizeChanged: " + series.size);
42 onStartAngleChanged: console.log("series.onStartAngleChanged: " + series.startAngle);
43 onEndAngleChanged: console.log("series.onEndAngleChanged: " + series.endAngle);
44 onCountChanged: console.log("series.onCountChanged: " + series.count);
45 onSumChanged: console.log("series.onSumChanged: " + series.sum);
46 }
47
48 Connections {
49 id: sliceConnections
50 ignoreUnknownSignals: true
51 onValueChanged: console.log("slice.onValueChanged: " + series.at(0).value);
52 onLabelVisibleChanged: console.log("slice.onLabelVisibleChanged: " + series.at(0).labelVisible);
53 onExplodedChanged: console.log("slice.onExplodedChanged: " + series.at(0).exploded);
54 onPenChanged: console.log("slice.onPenChanged: " + series.at(0).pen);
55 onBorderColorChanged: console.log("slice.onBorderColorChanged: " + series.at(0).borderColor);
56 onBorderWidthChanged: console.log("slice.onBorderWidthChanged: " + series.at(0).borderWidth);
57 onBrushChanged: console.log("slice.onBrushChanged: " + series.at(0).brush);
58 onColorChanged: console.log("slice.onColorChanged: " + series.at(0).color);
59 onLabelColorChanged: console.log("slice.onLabelColorChanged: " + series.at(0).labelColor);
60 onLabelBrushChanged: console.log("slice.onLabelBrushChanged: " + series.at(0).labelBrush);
61 onLabelFontChanged: console.log("slice.onLabelFontChanged: " + series.at(0).labelFont);
62 onLabelArmLengthFactorChanged: console.log("slice.onLabelArmLengthFactorChanged: " + series.at(0).labelArmLengthFactor);
63 onExplodeDistanceFactorChanged: console.log("slice.onExplodeDistanceFactorChanged: " + series.at(0).explodeDistanceFactor);
64 onPercentageChanged: console.log("slice.onPercentageChanged: " + series.at(0).percentage);
65 onStartAngleChanged: console.log("slice.onStartAngleChanged: " + series.at(0).startAngle);
66 onAngleSpanChanged: console.log("slice.onAngleSpanChanged: " + series.at(0).angleSpan);
67 }
68
30 Button {
69 Button {
31 text: "visible"
70 text: "visible"
32 onClicked: series.visible = !series.visible;
71 onClicked: series.visible = !series.visible;
@@ -57,19 +96,19 Flow {
57 }
96 }
58 Button {
97 Button {
59 text: "series start angle +"
98 text: "series start angle +"
60 onClicked: series.startAngle += 0.1;
99 onClicked: series.startAngle += 1.1;
61 }
100 }
62 Button {
101 Button {
63 text: "series start angle -"
102 text: "series start angle -"
64 onClicked: series.startAngle -= 0.1;
103 onClicked: series.startAngle -= 1.1;
65 }
104 }
66 Button {
105 Button {
67 text: "series end angle +"
106 text: "series end angle +"
68 onClicked: series.endAngle += 0.1;
107 onClicked: series.endAngle += 1.1;
69 }
108 }
70 Button {
109 Button {
71 text: "series end angle -"
110 text: "series end angle -"
72 onClicked: series.endAngle -= 0.1;
111 onClicked: series.endAngle -= 1.1;
73 }
112 }
74 Button {
113 Button {
75 text: "slice color"
114 text: "slice color"
@@ -28,6 +28,23 Flow {
28 flow: Flow.TopToBottom
28 flow: Flow.TopToBottom
29 property variant series
29 property variant series
30
30
31 onSeriesChanged: {
32 seriesConnections.target = series;
33 }
34
35 Connections {
36 id: seriesConnections
37 ignoreUnknownSignals: true
38 onNameChanged: console.log("series.onNameChanged: " + series.name);
39 onVisibleChanged: console.log("series.onVisibleChanged: " + series.visible);
40 onPointsVisibleChanged: console.log("series.onPointsVisibleChanged: " + series.pointsVisible);
41 onColorChanged: console.log("series.onColorChanged: " + series.color);
42 onBorderColorChanged: console.log("series.onBorderColorChanged: " + series.borderColor);
43 onCountChanged: console.log("series.onCountChanged: " + series.count);
44 onMarkerSizeChanged: console.log("series.onMarkerSizeChanged: " + series.markerSize);
45 onMarkerShapeChanged: console.log("series.onMarkerShapeChanged: " + series.markerShape);
46 }
47
31 Button {
48 Button {
32 text: "visible"
49 text: "visible"
33 onClicked: series.visible = !series.visible;
50 onClicked: series.visible = !series.visible;
@@ -85,8 +85,7 Rectangle {
85 height: parent.height
85 height: parent.height
86 source: "Chart.qml"
86 source: "Chart.qml"
87 onStatusChanged: {
87 onStatusChanged: {
88 console.log("chartLoader.status: " + status + " " + source);
88 if (status == Loader.Ready && editorLoader.status == Loader.Ready && chartLoader.item)
89 if (status == Loader.Ready && editorLoader.status == Loader.Ready)
90 editorLoader.item.series = chartLoader.item.series;
89 editorLoader.item.series = chartLoader.item.series;
91 }
90 }
92 }
91 }
@@ -97,8 +96,7 Rectangle {
97 height: parent.height
96 height: parent.height
98 source: "ChartEditor.qml"
97 source: "ChartEditor.qml"
99 onStatusChanged: {
98 onStatusChanged: {
100 console.log("editorLoader.status: " + status + " " + source);
99 if (status == Loader.Ready && chartLoader.status == Loader.Ready && chartLoader.item)
101 if (status == Loader.Ready && chartLoader.status == Loader.Ready)
102 editorLoader.item.series = chartLoader.item.series;
100 editorLoader.item.series = chartLoader.item.series;
103 }
101 }
104 }
102 }
General Comments 0
You need to be logged in to leave comments. Login now