##// END OF EJS Templates
Fixed QML oscilloscope layout
Tero Ahola -
r2312:2932f3712717
parent child
Show More
@@ -53,8 +53,6 void DataSource::update(QAbstractSeries *series)
53
53
54 void DataSource::generateData(int type, int rowCount, int colCount)
54 void DataSource::generateData(int type, int rowCount, int colCount)
55 {
55 {
56 qDebug() << "DataSource::generateData:" << type << rowCount << colCount;
57
58 // Remove previous data
56 // Remove previous data
59 foreach (QList<QPointF> row, m_data)
57 foreach (QList<QPointF> row, m_data)
60 row.clear();
58 row.clear();
@@ -21,7 +21,7
21 import QtQuick 1.0
21 import QtQuick 1.0
22
22
23 Column {
23 Column {
24 spacing: 5
24 spacing: 8
25 signal animationsEnabled(bool enabled)
25 signal animationsEnabled(bool enabled)
26 signal seriesTypeChanged(string type)
26 signal seriesTypeChanged(string type)
27 signal refreshRateChanged(variant rate);
27 signal refreshRateChanged(variant rate);
@@ -29,8 +29,9 Column {
29 signal antialiasingEnabled(bool enabled)
29 signal antialiasingEnabled(bool enabled)
30
30
31 Text {
31 Text {
32 text: "Oscilloscope"
32 text: "Scope-PAS2"
33 font.pointSize: 18
33 font.pointSize: 18
34 color: "white"
34 }
35 }
35
36
36 MultiButton {
37 MultiButton {
@@ -22,9 +22,14 import QtQuick 1.0
22
22
23 Rectangle {
23 Rectangle {
24 id: button
24 id: button
25 width: 120
25 width: 115
26 height: 30
26 height: 31
27 border.color: "gray"
27 gradient: Gradient {
28 GradientStop { position: mouseArea.pressed ? 1.0 : 0.0; color: "#A09090" }
29 GradientStop { position: mouseArea.pressed ? 0.0 : 1.0; color: "#505050" }
30 }
31 smooth: true
32
28 radius: 7
33 radius: 7
29 property string text: "Option: "
34 property string text: "Option: "
30 property variant items: ["first"]
35 property variant items: ["first"]
@@ -34,10 +39,12 Rectangle {
34 Text {
39 Text {
35 id: buttonText
40 id: buttonText
36 anchors.centerIn: parent
41 anchors.centerIn: parent
42 color: "#FFFFFF"
37 text: button.text + button.items[currentSelection]
43 text: button.text + button.items[currentSelection]
38 }
44 }
39
45
40 MouseArea {
46 MouseArea {
47 id: mouseArea
41 anchors.fill: parent
48 anchors.fill: parent
42 onClicked: {
49 onClicked: {
43 currentSelection = (currentSelection + 1) % items.length;
50 currentSelection = (currentSelection + 1) % items.length;
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.1
22 import QtCommercial.Chart 1.2
23
23
24 //![1]
24 //![1]
25 ChartView {
25 ChartView {
@@ -55,7 +55,7 ChartView {
55 id: lineSeries2
55 id: lineSeries2
56 name: "signal 2"
56 name: "signal 2"
57 axisX: axisX
57 axisX: axisX
58 axisY: axisY2
58 axisYRight: axisY2
59 }
59 }
60 // ...
60 // ...
61 //![1]
61 //![1]
@@ -25,6 +25,7 Rectangle {
25 id: main
25 id: main
26 width: 400
26 width: 400
27 height: 300
27 height: 300
28 color: "#404040"
28
29
29 ControlPanel {
30 ControlPanel {
30 id: controlPanel
31 id: controlPanel
General Comments 0
You need to be logged in to leave comments. Login now