@@ -63,6 +63,7 void DataSource::updateAllSeries() | |||||
63 | elapsed = m_fpsTimer.restart(); |
|
63 | elapsed = m_fpsTimer.restart(); | |
64 | qreal fps = qreal(0.1 * int(10000.0 * (qreal(frameCount) / qreal(elapsed)))); |
|
64 | qreal fps = qreal(0.1 * int(10000.0 * (qreal(frameCount) / qreal(elapsed)))); | |
65 | m_fpsLabel->setText(labelText.arg(QString::number(fps, 'f', 1))); |
|
65 | m_fpsLabel->setText(labelText.arg(QString::number(fps, 'f', 1))); | |
|
66 | m_fpsLabel->adjustSize(); | |||
66 | frameCount = 0; |
|
67 | frameCount = 0; | |
67 | } |
|
68 | } | |
68 | } |
|
69 | } |
@@ -148,11 +148,12 int main(int argc, char *argv[]) | |||||
148 | QLabel *countLabel = new QLabel(&window); |
|
148 | QLabel *countLabel = new QLabel(&window); | |
149 | QString countText = QStringLiteral("Total point count: %1"); |
|
149 | QString countText = QStringLiteral("Total point count: %1"); | |
150 | countLabel->setText(countText.arg(pointCount * seriesCount)); |
|
150 | countLabel->setText(countText.arg(pointCount * seriesCount)); | |
151 | countLabel->resize(window.width(), countLabel->height()); |
|
151 | countLabel->adjustSize(); | |
152 | fpsLabel->move(10,2); |
|
152 | fpsLabel->move(10, 2); | |
|
153 | fpsLabel->adjustSize(); | |||
153 | fpsLabel->raise(); |
|
154 | fpsLabel->raise(); | |
154 | fpsLabel->show(); |
|
155 | fpsLabel->show(); | |
155 |
countLabel->move(10, |
|
156 | countLabel->move(10, fpsLabel->height()); | |
156 | fpsLabel->raise(); |
|
157 | fpsLabel->raise(); | |
157 | countLabel->show(); |
|
158 | countLabel->show(); | |
158 |
|
159 |
@@ -65,7 +65,7 ColumnLayout { | |||||
65 | MultiButton { |
|
65 | MultiButton { | |
66 | id: sampleCountButton |
|
66 | id: sampleCountButton | |
67 | text: "Samples: " |
|
67 | text: "Samples: " | |
68 | items: [6, 128, 1024, 10000] |
|
68 | items: ["6", "128", "1024", "10000"] | |
69 | currentSelection: 2 |
|
69 | currentSelection: 2 | |
70 | onSelectionChanged: signalSourceChanged( |
|
70 | onSelectionChanged: signalSourceChanged( | |
71 | signalSourceButton.items[signalSourceButton.currentSelection], |
|
71 | signalSourceButton.items[signalSourceButton.currentSelection], | |
@@ -75,7 +75,7 ColumnLayout { | |||||
75 |
|
75 | |||
76 | MultiButton { |
|
76 | MultiButton { | |
77 | text: "Refresh rate: " |
|
77 | text: "Refresh rate: " | |
78 |
items: [1, 24, |
|
78 | items: ["1", "24", "60"] | |
79 | currentSelection: 2 |
|
79 | currentSelection: 2 | |
80 | onSelectionChanged: refreshRateChanged(items[currentSelection]); |
|
80 | onSelectionChanged: refreshRateChanged(items[currentSelection]); | |
81 | } |
|
81 | } |
@@ -19,6 +19,7 | |||||
19 | #include <private/chartitem_p.h> |
|
19 | #include <private/chartitem_p.h> | |
20 | #include <private/qabstractseries_p.h> |
|
20 | #include <private/qabstractseries_p.h> | |
21 | #include <private/abstractdomain_p.h> |
|
21 | #include <private/abstractdomain_p.h> | |
|
22 | #include <QtGui/QPainter> | |||
22 |
|
23 | |||
23 | QT_CHARTS_BEGIN_NAMESPACE |
|
24 | QT_CHARTS_BEGIN_NAMESPACE | |
24 |
|
25 |
@@ -32,6 +32,7 | |||||
32 | #include <private/charttitle_p.h> |
|
32 | #include <private/charttitle_p.h> | |
33 | #include <QtCore/QTimer> |
|
33 | #include <QtCore/QTimer> | |
34 | #include <QtGui/QTextDocument> |
|
34 | #include <QtGui/QTextDocument> | |
|
35 | #include <QtWidgets/QGraphicsScene> | |||
35 |
|
36 | |||
36 | QT_CHARTS_BEGIN_NAMESPACE |
|
37 | QT_CHARTS_BEGIN_NAMESPACE | |
37 |
|
38 |
General Comments 0
You need to be logged in to leave comments.
Login now