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