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