@@ -24,12 +24,13 | |||||
24 | #include <QAbstractScrollArea> |
|
24 | #include <QAbstractScrollArea> | |
25 | #include <QGLWidget> |
|
25 | #include <QGLWidget> | |
26 | #include <QDebug> |
|
26 | #include <QDebug> | |
|
27 | #include <cmath> | |||
27 |
|
28 | |||
28 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
29 | QTCOMMERCIALCHART_USE_NAMESPACE | |
29 |
|
30 | |||
30 | DataSource::DataSource(QAbstractScrollArea *appViewer, QObject *parent) : |
|
31 | DataSource::DataSource(QAbstractScrollArea *appViewer, QObject *parent) : | |
31 | m_appViewer(appViewer), |
|
|||
32 | QObject(parent), |
|
32 | QObject(parent), | |
|
33 | m_appViewer(appViewer), | |||
33 | m_index(-1) |
|
34 | m_index(-1) | |
34 | { |
|
35 | { | |
35 | // generate |
|
36 | // generate |
@@ -34,8 +34,15 Column { | |||||
34 | } |
|
34 | } | |
35 |
|
35 | |||
36 | MultiButton { |
|
36 | MultiButton { | |
|
37 | text: "Graph: " | |||
|
38 | items: ["line", "spline", "scatter"] | |||
|
39 | currentSelection: 0 | |||
|
40 | onSelectionChanged: seriesTypeChanged(items[currentSelection]); | |||
|
41 | } | |||
|
42 | ||||
|
43 | MultiButton { | |||
37 | id: signalSourceButton |
|
44 | id: signalSourceButton | |
38 |
text: "S |
|
45 | text: "Source: " | |
39 | items: ["sin", "linear"] |
|
46 | items: ["sin", "linear"] | |
40 | currentSelection: 0 |
|
47 | currentSelection: 0 | |
41 | onSelectionChanged: signalSourceChanged( |
|
48 | onSelectionChanged: signalSourceChanged( | |
@@ -56,13 +63,6 Column { | |||||
56 | } |
|
63 | } | |
57 |
|
64 | |||
58 | MultiButton { |
|
65 | MultiButton { | |
59 | text: "Graph: " |
|
|||
60 | items: ["line", "spline", "scatter"] |
|
|||
61 | currentSelection: 0 |
|
|||
62 | onSelectionChanged: seriesTypeChanged(items[currentSelection]); |
|
|||
63 | } |
|
|||
64 |
|
||||
65 | MultiButton { |
|
|||
66 | text: "Refresh rate: " |
|
66 | text: "Refresh rate: " | |
67 | items: [1, 24, 60, 100] |
|
67 | items: [1, 24, 60, 100] | |
68 | currentSelection: 2 |
|
68 | currentSelection: 2 |
@@ -22,10 +22,10 import QtQuick 1.0 | |||||
22 |
|
22 | |||
23 | Rectangle { |
|
23 | Rectangle { | |
24 | id: button |
|
24 | id: button | |
25 |
width: 10 |
|
25 | width: 120 | |
26 |
height: 3 |
|
26 | height: 35 | |
27 | border.color: "gray" |
|
27 | border.color: "gray" | |
28 |
radius: |
|
28 | radius: 7 | |
29 | property string text: "Option: " |
|
29 | property string text: "Option: " | |
30 | property variant items: ["first"] |
|
30 | property variant items: ["first"] | |
31 | property int currentSelection: 0 |
|
31 | property int currentSelection: 0 |
General Comments 0
You need to be logged in to leave comments.
Login now