@@ -557,7 +557,7 QString ChartPresenter::numberToString(int value) | |||||
557 | return QString::number(value); |
|
557 | return QString::number(value); | |
558 | } |
|
558 | } | |
559 |
|
559 | |||
560 |
void ChartPresenter:: |
|
560 | void ChartPresenter::updateGLWidget() | |
561 | { |
|
561 | { | |
562 | #ifndef QT_NO_OPENGL |
|
562 | #ifndef QT_NO_OPENGL | |
563 | // GLWidget pointer is wrapped in QPointer as its parent is not in our control, and therefore |
|
563 | // GLWidget pointer is wrapped in QPointer as its parent is not in our control, and therefore | |
@@ -574,6 +574,9 void ChartPresenter::ensureGLWidget() | |||||
574 | m_glWidget->show(); |
|
574 | m_glWidget->show(); | |
575 | } |
|
575 | } | |
576 | } |
|
576 | } | |
|
577 | // Make sure we update the widget in a timely manner | |||
|
578 | if (!m_glWidget.isNull()) | |||
|
579 | m_glWidget->update(); | |||
577 | #endif |
|
580 | #endif | |
578 | } |
|
581 | } | |
579 |
|
582 |
@@ -174,7 +174,7 public: | |||||
174 | QString numberToString(double value, char f = 'g', int prec = 6); |
|
174 | QString numberToString(double value, char f = 'g', int prec = 6); | |
175 | QString numberToString(int value); |
|
175 | QString numberToString(int value); | |
176 |
|
176 | |||
177 |
void |
|
177 | void updateGLWidget(); | |
178 | void glSetUseWidget(bool enable) { m_glUseWidget = enable; } |
|
178 | void glSetUseWidget(bool enable) { m_glUseWidget = enable; } | |
179 |
|
179 | |||
180 | private: |
|
180 | private: |
@@ -121,8 +121,8 void XYChart::updateChart(QVector<QPointF> &oldPoints, QVector<QPointF> &newPoin | |||||
121 |
|
121 | |||
122 | void XYChart::updateGlChart() |
|
122 | void XYChart::updateGlChart() | |
123 | { |
|
123 | { | |
124 | presenter()->ensureGLWidget(); |
|
|||
125 | dataSet()->glXYSeriesDataManager()->setPoints(m_series, domain()); |
|
124 | dataSet()->glXYSeriesDataManager()->setPoints(m_series, domain()); | |
|
125 | presenter()->updateGLWidget(); | |||
126 | updateGeometry(); |
|
126 | updateGeometry(); | |
127 | } |
|
127 | } | |
128 |
|
128 |
@@ -598,7 +598,9 void DeclarativeChart::renderScene() | |||||
598 | QSize chartSize = m_chart->size().toSize(); |
|
598 | QSize chartSize = m_chart->size().toSize(); | |
599 | if (!m_sceneImage || chartSize != m_sceneImage->size()) { |
|
599 | if (!m_sceneImage || chartSize != m_sceneImage->size()) { | |
600 | delete m_sceneImage; |
|
600 | delete m_sceneImage; | |
601 | m_sceneImage = new QImage(chartSize, QImage::Format_ARGB32); |
|
601 | qreal dpr = window() ? window()->devicePixelRatio() : 1.0; | |
|
602 | m_sceneImage = new QImage(chartSize * dpr, QImage::Format_ARGB32); | |||
|
603 | m_sceneImage->setDevicePixelRatio(dpr); | |||
602 | m_sceneImageNeedsClear = true; |
|
604 | m_sceneImageNeedsClear = true; | |
603 | } |
|
605 | } | |
604 |
|
606 |
@@ -13,6 +13,6 | |||||
13 | # - any git symbolic ref resolvable from the module's repository (e.g. "refs/heads/master" to track master branch) |
|
13 | # - any git symbolic ref resolvable from the module's repository (e.g. "refs/heads/master" to track master branch) | |
14 | # |
|
14 | # | |
15 | %dependencies = ( |
|
15 | %dependencies = ( | |
16 |
"qtbase" => " |
|
16 | "qtbase" => "", | |
17 |
"qtdeclarative" => " |
|
17 | "qtdeclarative" => "", | |
18 | ); |
|
18 | ); |
General Comments 0
You need to be logged in to leave comments.
Login now