summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-021-2/+4
|\ | | | | | | Change-Id: I63ae7b0300c441821be3043d5a7a3621f3582cca
| * Fix deprecation warnings about QtCharts::setAxisX(), setAxisY()Friedemann Kleint2019-05-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use new API, fixing warnings like: tst_qchart.cpp:343:34: warning: 'void QtCharts::QChart::setAxisX(QtCharts::QAbstractAxis*, QtCharts::QAbstractSeries*)' is deprecated [-Wdeprecated-declarations] ... tst_qchart.cpp:361:34: warning: 'void QtCharts::QChart::setAxisY(QtCharts::QAbstractAxis*, QtCharts::QAbstractSeries*)' is deprecated [-Wdeprecated-declarations] ... Some test appear to be relying on the axes being removed in a certain order. Change-Id: I86fab08d661afcd1087a55f847133a9e90d758f9 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* | Fix some deprecation warningsv5.13.0-alpha1Friedemann Kleint2019-02-061-1/+3
|/ | | | | | | | | | xychart/qxyseries.cpp:1025:50: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] areachart/areachartitem.cpp:281:58: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] areachart/areachartitem.cpp:299:58: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] declarativecategoryaxis.cpp:86:57: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = QList<QPair<QString, double> >::iterator; LessThan = bool (*)(const QPair<QString, double>&, const QPair<QString, double>&)]’ is deprecated: Use std::sort [-Wdeprecated-declarations] Change-Id: I0d7705be8690405a439e18ea0ddbfaef433037a4 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add proper 'deprecated' warningsMichal Klocek2018-04-3024-91/+159
| | | | | | | | | | | | | | Use Q_DECL_DEPRECATED to mark deprecated API. Fix examples to do not use deprecated functions. These functions were 'marked' as deprecated when multiple axes were introduced. Moreover, axis X/Y is an ambiguous term and not necessary mean Horizontal/Vertical axis. These deprecated methods also create an issue when given series should be attached to several Horizonal/ Vertical axes and calling them can cause unwanted results. Change-Id: I639e1b964240b80c2b3b93b74b061da324bca1ff Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* qmlchart example: Anchor content to window sizev5.11.0-beta4Oliver Wolff2018-04-101-0/+1
| | | | | | | | Without the anchor the example breaks as soon as the window is resized. Change-Id: I6476d8891745e969c06d3e943e8067f5e2191350 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Polish the audio exampleFriedemann Kleint2018-02-085-42/+60
| | | | | | | | | | | | - Use C++ 11 (nullptr, override) - Bail out cleanly if there is no audio input available - Rewrite the buffer algorithm to work on a member variable to make the slidling window principle clearer and reduce QVector allocations Task-number: QTBUG-60662 Change-Id: I02827f3dca4f0bf1fb213fa12369455de6c618c5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* qtlite: Skip building examples when configured with no-feature-itemviewsRainer Keller2018-01-124-0/+4
| | | | | | Task-number: QTBUG-53141 Change-Id: Ifa8999bb06fee1d6f768f08e4df8e6c47b977629 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Update to new QRandomGenerator APIThiago Macieira2017-11-0310-15/+15
| | | | | Change-Id: I69f37f9304f24709a823fffd14e676c097712329 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Revamp QML Charts examplev5.10.0-beta2v5.10.0-beta1Titta Heikkala2017-09-134-22/+15
| | | | | | | | | | Updated the example so that the same theme is used for all charts. The images for documentation are also updated. Added comments to code. Change-Id: Iaad648f42f5bb7edfa101f1202b56472aa511ca3 Task-number: QTBUG-60662 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add .ui.qml file to Qml Charts Examplev5.10.0-alpha1Titta Heikkala2017-09-083-52/+92
| | | | | | | | | MainForm.ui.qml file added to Qml Charts Example to make it work with Qt Quick Designer. Change-Id: I709dd460ac179b5d65db0ca29196351c89ade5eb Task-number: QTBUG-60662 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Improve the documentation of Chart Themes ExampleTitta Heikkala2017-09-061-2/+24
| | | | | | | | | | | Added more detailed documentation and code snippets to Chart Themes Example. Change-Id: I206b65038b369d0eaa5fb128b872328ec43de7a2 Task-number: QTBUG-60662 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Update appearance of Chart Themes ExampleTitta Heikkala2017-09-051-20/+46
| | | | | | | | | Default ranges are set to axes. Only one pie chart is shown. Space added to y-axis labels to add space between labels and axis. Change-Id: If64f68aad90ed9c3151b4cbfe7c4fa527871fb70 Task-number: QTBUG-60662 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add Qt Designer UI file to Chart Themes ExampleTitta Heikkala2017-09-044-81/+155
| | | | | | | | | Add a UI file to Chart Themes Example. The UI file includes widgets to change chart options along with signal slot connections. Change-Id: I194624e23ebb785271a054cf1b2891d134fd2656 Task-number: QTBUG-60662 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix window palette initialization in Chart Themes ExampleTitta Heikkala2017-08-301-27/+35
| | | | | | | | | The default window palette needs to be set to the application object in initialization as the palette of the window is not valid by then. Change-Id: Iad18c255600b31b18f0030094dd9e57757001fa1 Task-number: QTBUG-62824 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Set window palette in Chart Themes ExampleTitta Heikkala2017-08-301-27/+27
| | | | | | | | | Set the right colors for window palette based on theme in Chart Themes Example to help test automation. Change-Id: Ia7ed7fc05fc5193a916ebff29bba8aeceda5f97f Task-number: QTBUG-62824 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-1526-150/+216
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/charts/dynamicspline/chart.cpp examples/charts/piechartdrilldown/main.cpp Change-Id: I839e97bf377c7823f2f464c097656d58f279ed77
| * Use range-for instead of foreach in examplesMiikka Heikkinen2017-08-1113-53/+58
| | | | | | | | | | | | | | | | Task-number: QTBUG-60662 Change-Id: Ief9264e2b6670466bd74278dbd194a7be81d614f Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| * Minor coding style fixes to examplesMiikka Heikkinen2017-08-0319-97/+158
| | | | | | | | | | | | | | | | Task-number: QTBUG-60662 Change-Id: I0edd88328b403d09faa27d30b89ac91c802121dc Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* | Use QRandomGenerator instead of q?randThiago Macieira2017-07-0411-33/+25
| | | | | | | | | | Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Be (somewhat more) consistent about the value of piEdward Welbourne2017-06-143-6/+4
| | | | | | | | | | | | | | | | | | Use M_PI in C++ and Math.PI in JavaScript (including QML). Use qmath.h's value for M_PI where we can't avoid an explicit value. Task-number: QTBUG-58083 Change-Id: I80c81444c1867f8f0c07f192fa68de933f48bbc4 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* | Use qDegreesToRadians() more widelyEdward Welbourne2017-02-241-1/+1
|/ | | | | | | | It documents intent more clearly (and saves us a hand-rolled value for pi). Task-number: QTBUG-58083 Change-Id: I34871ad8526087aa892afdcc85b362bc7442bad1 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add minor ticks support for QLogValueAxisAlexander Mishin2016-12-161-13/+14
| | | | | | | | | | | | | | | | - added QLogValueAxis::minorTickCount property - added QLogValueAxis::tickCount property (read-only) - added logarithmically distributed minor ticks for VerticalAxis - added logarithmically distributed minor ticks for HorizontalAxis - added logarithmically distributed minor ticks for PolarChartAxisAngular - added logarithmically distributed minor ticks for PolarChartAxisRadial - updated example for QLogValueAxis - added tickCount and minorTickCount properties documentation for QLogValueAxis Task-number: QTBUG-51612 Change-Id: I92a0af81f741e7b2ba871a64f801176399b9e9a5 Reviewed-by: Alexander Mishin <apmishin@yandex.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add a possibility to change legend marker shapeMiikka Heikkinen2016-09-231-6/+5
| | | | | | | | | | | It is now possible to choose between rectangular, circular, and "from series" shapes for legend markers. The "from series" shape uses scatter dot items as legend markers in case of scatter series and a line segment for line and spline series. Task-number: QTBUG-50682 Change-Id: I58977ead88e1274e1f163516d32c4d290f4410f9 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-0655-374/+503
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: examples/charts/charts.pro src/charts/glwidget.cpp src/chartsqml2/declarativechart.cpp src/chartsqml2/declarativeopenglrendernode.cpp tests/auto/auto.pro Change-Id: If909b4b13844c474bf4898a66ee01ac111d0a248
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-234-9/+29
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf README src/charts/qchartglobal.h tests/auto/chartdataset/tst_chartdataset.cpp tests/auto/domain/tst_domain.cpp Change-Id: Ib4e01f2646d87b691c7b2f8bee4ed1f5521e4f6d
| | * Fix resize handling in Callout exampleMiikka Heikkinen2016-08-164-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Callouts are now positioned correctly when the chart is resized. Task-number: QTBUG-54492 Change-Id: I5660eb48e58348cc2d649b48965c342488294ae4 Reviewed-by: Mika Salmela <mika.salmela@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-1149-358/+462
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/charts/glwidget.cpp src/charts/xychart/glxyseriesdata_p.h src/chartsqml2/declarativerendernode.cpp Change-Id: I611ff3a7874ceb7dddcf0f4d069927a9899a986d
| | * Cleanup examples build systemMichal Klocek2016-08-0149-358/+462
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the examples self-contained and follow the way examples are compiled in other modules, so they can be easly opened by qtc. Change-Id: I664ba3dc21630ced5b1d14ad878a70eac0763c84 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* | | Fix qmloscilloscope example when using software backendMiikka Heikkinen2016-08-252-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | The example incorrectly showed OpenGL to be in use even when Qt was configured with -no-opengl. Change-Id: I22905f7d41fe8e4b04fc1c3473b9924b8c82b06c Reviewed-by: Mika Salmela <mika.salmela@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* | | Fix qmlcustomizations exampleMiikka Heikkinen2016-08-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the interval coefficient was under 0.25, it resulted as zero interval for the timer, stopping the animation. The blinking after animation stopped was also broken, as using var as a temporary color store doesn't work due to var assignments being by reference. Using a separate color property instead of var works around this issue. Task-number: QTRD-2170 Change-Id: I7224ff259a076da3c6e5e6e66bc0c3031aa1dda6 Reviewed-by: Mika Salmela <mika.salmela@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* | | Fix antialiasing support of OpenGL accelerated seriesMiikka Heikkinen2016-08-172-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenGL accelerated series are now antialiased similarly to non-accelerated series. Task-number: QTRD-2172 Change-Id: Ie8bc014c82d5fa645cf41ab56bebb99fcf8ad301 Reviewed-by: Mika Salmela <mika.salmela@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* | | Added candlestick chart typeAlexander Mishin2016-05-2511-0/+402
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - added QCandlestickSeries - added QCandlestickSet - added QCandlestickLegendMarker - added model mappers - added Candlestick, CandlestickChartItem, CandlestickData - added SeriesTypeCandlestick to SeriesType enum - added LegendMarkerTypeCandlestick to LegendMarkerType enum - added candlestick chart example - added QML candlestick chart example - added candlestick tester - added autotests - added documentation [ChangeLog][CandlestickChart] Added new chart type: Candlestick Chart. Task-number: QTBUG-50544 Change-Id: I17d18dfa23e0ea209bf51ab1e349585b9cb50a8f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* | No longer automatically disable QDateTimeAxis on ARM platformsMiikka Heikkinen2016-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | QDateTimeAxis is now only disabled on platforms that define qreal as float. Change-Id: I08d393d328c972d74b27bd218e4cd01e844800c9 Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com> Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* | Updated licenseMiikka Heikkinen2016-01-13150-1350/+2550
|/ | | | | | Change-Id: I7ad9838039b56b9e3a7fe2c42a2d8ff818f393fb Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Use Item instead of Rectangle as a background item where possibleMiikka Heikkinen2015-10-3027-27/+27
| | | | | | | | Using Rectangle as background is not recommended if it is only for color. It is more efficient to simply set the window color. Change-Id: I3447ca394d74fa415bde4e9d2f210c81f354555e Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
* Updated license headersTitta Heikkala2015-10-20150-1656/+2106
| | | | | Change-Id: Ic72ee3c9723c2b3f3368c79219b7468f5d95aa84 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Made Qml Oscilloscope example little more sensibleMiikka Heikkinen2015-09-303-27/+14
| | | | | | | | Removed spline and animations as the point of the example is to demonstrate high refresh rate use case. Also now default to useOpenGL. Change-Id: Iaf43bd8789893a9ed9bc409038e7d22d1bd7185d Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
* Fix issues based on android testingMiikka Heikkinen2015-09-283-5/+7
| | | | | | | | | -Some includes were missing -Widgets got on top of each other on openglSeries example -qmloscilloscope didn't show button texts properly Change-Id: I96cb64091275269f73d2a569ff53c2baae8b0f66 Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
* Accelerating lineseries with OpenGLMiikka Heikkinen2015-09-2510-15/+407
| | | | | | | | | | | | Added support for QAbstractSeries::useOpenGL property. When true, the series in question is drawn on a separate offscreen buffer using OpenGL and then superimposed on the chart. Currently this property is only supported for line and scatter series. Change-Id: I174fec541f9f3c23464270c1fe08f824af16a0fb Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com>
* Add QXYSeries::replace(QVector<QPointF> points) overload.Miikka Heikkinen2015-09-072-4/+5
| | | | | | Task-number: QTRD-3384 Change-Id: Ic7dcdfeadd3f5c7ba66191f8c427a0d65796895d Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
* Fix build against 5.6Miikka Heikkinen2015-09-031-1/+1
| | | | | | | | | Took Q_SIGNALS and Q_SLOTS macros into use where required. Fixed chartsnamespace.h header for regular builds. Task-number: QTRD-3609 Change-Id: I4bae1b88829105b60c8c1cf3b2e109da955f2328 Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
* Copyright header changesTitta Heikkala2015-04-23147-441/+441
| | | | | | | Copyright header changes for Qt 5.5. Change-Id: I2b8e9356997de2c87a7436bcefd4d0948d566259 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fix compilation with namespaced Qt.Christian Kandeler2015-04-0110-3/+26
| | | | | Change-Id: I359bbf5c89bd23bb1b6db1aeed8a2a4aa2ca12bf Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
* Fix check for multimedia modulerelease-2.0.0Titta Heikkala2014-12-041-1/+1
| | | | | | | In charts.pro the check for multimedia module was outdated. Change-Id: I32fdb95a24cc59e18eda8966f693931754d56296 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Remove theme setting from StackedBarChart Drilldown exampleTitta Heikkala2014-11-281-1/+0
| | | | | | | | The theme previously set for this example made it really slow on Android. Therefore the theme setting is removed. Change-Id: Ia454cdce2ebecfdd24ce9d91f1b8cb63fdb86be3 Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
* Improve QML Weather example layoutTitta Heikkala2014-11-281-8/+9
| | | | | | | | The size of the images is adjusted based on the window size. Change-Id: Ib575288456d6773e00ee740b7b0be6a392c9eeaa Task-number: QTRD-3444 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fix donutbreakdown exampleTitta Heikkala2014-11-261-1/+1
| | | | | | | | Using static member in a function made compilation fail. Change-Id: I5aff56e331ca5d4a977342cfa7dfa9017857478c Task-number: QTRD-3437 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Remove deprecated elements from APIs.Miikka Heikkinen2014-11-121-1/+1
| | | | | | | Task-number: QTRD-2098 Change-Id: Ib658c8a51af0b73ded5d6b13c8fa58762f859961 Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com> Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
* Updated license headersTitta Heikkala2014-11-12147-1323/+1029
| | | | | | | Updated new license headers and added missing ones to qdoc files. Change-Id: I9f2af2a8b44c3ebf19fd494628dfaa8775a47b06 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Add pressed, released and doubleClicked signalsTitta Heikkala2014-11-121-1/+1
| | | | | | | | | Added pressed, released and doubleClicked signals for all series. The signals are also added to QPieSlice and QBoxPlotSet. Change-Id: If94948be439a3b53ed48c02d0092091e836222a4 Task-number: QTRD-2384 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>