summaryrefslogtreecommitdiffstats
path: root/src/charts/axis/polarchartaxisradial.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Port Q_FOREACH to ranged-for, iterating over a temporaryAhmad Samir2023-09-041-8/+12
| | | | | | | | | | | The loops are iterating over a temporary, so hold the temporary in a local const container and use ranged-for. In files where all foreach usages are ported, un-whitelist them by removing "#undef QT_NO_FOREACH". Change-Id: I9e7c9d16404fd78b3cf61465d922616de8e4a1a1 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Mark QtCharts (the library) as free of Q_FOREACH, except where it isn'tMarc Mutz2023-08-181-0/+2
| | | | | | | | | | | | | | | | | | | | The density of Q_FOREACH uses is exremely high here, too high for this author, unfamiliar with this code, to tackle in a short amount of time. Even if they're not concentrated in just a few TUs, we need to make progress on a global QT_NO_FOREACH default, so grab the nettle and stick to our strategy: Mark the whole library with QT_NO_FOREACH, to prevent new uses from creeping in, and whitelist the affected TUs by #undef'ing QT_NO_FOREACH locally, at the top of each file. For TUs that are part of a larger executable, this requires these files to be compiled separately, so add them to NO_PCH_SOURCES (which implies NO_UNITY_BUILD_SOURCES, too). Created QTBUG-115824 to keep track of this, and other such follow-up changes in this module. Task-number: QTBUG-115824 Change-Id: If90d9e29bc4fdce1da97f663be35aa715bd6478b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Port from container::count() and length() to size() - V4Marc Mutz2022-10-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); a.k.a qt-port-to-std-compatible-api V4 with config Scope: 'Container'. Change-Id: I8187f4b3a16ff78f2a5e5a9158d9437f06a43252 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-161-28/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ibb797d52859b5c504f7300f4a5dc956a7b44ac11 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove unnecessary cast int(qFloor())Dimitrios Apostolou2021-05-211-2/+2
| | | | | | | | qFloor() already returns int. Change-Id: I62f13a5f270f0881b8de289147550ef901274939 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Remove charts namespace for Qt6Michal Klocek2020-11-061-2/+2
| | | | | | | | | This auto refactor to remove charts namespace, just use qt one. [ChangeLog] Use QT_NAMESPACE as other modules. Change-Id: I7722ed2ff5cd84c594ea96db15e5df50a24f06b4 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notice the following API changes: -void QXYSeries::replace(QVector<QPointF> points); +void QXYSeries::replace(const QList<QPointF> &points); -bool QAbstractBarSeries::append(QVector<QBarSet *> sets); +bool QAbstractBarSeries::append(const QList<QBarSet *> &sets); -void QAbstractBarSeries::barsetsAdded(QVector<QBarSet *> sets); +void QAbstractBarSeries::barsetsAdded(const QList<QBarSet *> &sets); -void QAbstractBarSeries::barsetsRemoved(QVector<QBarSet *> sets); +void QAbstractBarSeries::barsetsRemoved(const QList<QBarSet *> &sets); -bool QBoxPlotSeries::append(QVector<QBoxSet *> boxes); +bool QBoxPlotSeries::append(const QList<QBoxSet *> &boxes); -bool QBoxPlotSeries::append(QVector<QBoxSet *> boxes); +bool QBoxPlotSeries::append(const QList<QBoxSet *> &boxes); -void QBoxPlotSeries::boxsetsAdded(QVector<QBoxSet *> sets); +void QBoxPlotSeries::boxsetsAdded(const QList<QBoxSet *> &sets); -void QBoxPlotSeries::boxsetsRemoved(QVector<QBoxSet *> sets); +void QBoxPlotSeries::boxsetsRemoved(const QList<QBoxSet *> &sets); -bool QPieSeries::append(QVector<QPieSlice *> slices); +bool QPieSeries::append(const QList<QPieSlice *> &slices); -QPieSlice *QPieSeries::append(QString label, qreal value); +QPieSlice *QPieSeries::append(const QString &label, qreal value); -void QPieSeries::added(QVector<QPieSlice *> slices); +void QPieSeries::added(const QList<QPieSlice *> &slices); -void QPieSeries::removed(QVector<QPieSlice *> slices); +void QPieSeries::removed(const QList<QPieSlice *> &slices); These should be source compatible changes. Task-number: QTBUG-84469 Change-Id: I153796e9d8244c8e22819993ef26aa91e7b71f99 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix namespaced buildLiang Qi2018-10-041-2/+2
| | | | | | | | | | | It is not allowed to include files within Qt namespace. This amends a93849d0. See 5b99f3a3 in qtbase dev. Task-number: QTBUG-70907 Change-Id: I37f0924429313f2251f656bcd5b6b248a22ccfbb Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add minor ticks support for QLogValueAxisAlexander Mishin2016-12-161-60/+158
| | | | | | | | | | | | | | | | - 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>
* Fix crash when log axis range is initialized to contain no ticksMiikka Heikkinen2016-12-021-1/+1
| | | | | | | | | | | | | | Axis updateGeometry() expects there to always be at least one arrow item for the main axis arrow, but the arrow never got created if there were no ticks on the axis before axis was shown. Ensure that createItems() is called at least once for axis even if there are no ticks. Task-number: QTBUG-57328 Change-Id: I7847e2f0d4ee1c3e4546dca05df6078b4a4e81c8 Reviewed-by: Mika Salmela <mika.salmela@qt.io> Reviewed-by: Alexander Mishin <apmishin@yandex.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Updated licenseMiikka Heikkinen2016-01-131-9/+17
| | | | | | Change-Id: I7ad9838039b56b9e3a7fe2c42a2d8ff818f393fb Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Updated license headersTitta Heikkala2015-10-201-11/+14
| | | | | Change-Id: Ic72ee3c9723c2b3f3368c79219b7468f5d95aa84 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Added grid color property for value axisTitta Heikkala2015-09-151-0/+20
| | | | | | | | | Added possibility to set the color of the grid lines for value axes. Change-Id: I38b634410e7f1cb996d80f5ac1650a1be844ca01 Task-number: QTRD-3319 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Make category axis label positioning at value work for polar chartsMiikka Heikkinen2015-09-091-7/+19
| | | | | | Task-number: QTRD-3515 Change-Id: Icd38469386c7fc923047533f2a25b726f2f6caa5 Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
* Added minor ticks to value axisTitta Heikkala2015-09-071-0/+74
| | | | | | | | | | Added possibility to set minor tick for value axis. By default the count of minor ticks is zero. The arrow of minor ticks follows the color and pen of the arrows of the major ticks as it's part of axis. Change-Id: I8a422caaeedcd18ee6144e8636e3903d16f0632c Task-number: QTRD-3294 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Copyright header changesTitta Heikkala2015-04-231-3/+3
| | | | | | | Copyright header changes for Qt 5.5. Change-Id: I2b8e9356997de2c87a7436bcefd4d0948d566259 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Updated license headersTitta Heikkala2014-11-121-9/+7
| | | | | | | Updated new license headers and added missing ones to qdoc files. Change-Id: I9f2af2a8b44c3ebf19fd494628dfaa8775a47b06 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fix include syntaxTitta Heikkala2014-10-201-6/+6
| | | | | | | | | The includes for the whole project are changed to syntax: '#include <module/class> Change-Id: If32f8b6c3f47516ad6bc30ed40789ea9042d5664 Task-number: QTRD-3373 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Qt Charts project file structure changeTitta Heikkala2014-10-141-0/+297
Charts repository structure is changed to follow the structure of a Qt Add-On module. The task includes following changes: - All macros and definitions named 'commercial' have been renamed. - Compile errors related to QString and qSort usage have been fixed. - Old demos are moved under examples. The QML examples now support only Qt Quick 2.0, the support for Qt Quick 1 is removed. - The QML examples with multiple views are updated so that they are usable also with touch devices. - Unnecessary version checks are removed from examples. - The build stamp has been removed as it was only meant for Charts development purposes and it's no longer needed. Also development build related debug prints are removed as __DATE__ can't be used for all OS thus it doesn't make much sense. - Documentation structure has been updated based on the new module structure. The raw HTML files have been removed. Demos are combined to examples. - Unnecessary .qdocinc files are no longer needed. The content is moved to the corresponding .cpp files. - The Charts widget designer plugin is updated according to the module change. - The test cases updated according to the project structure change. Tests are added also for version 2.0. - cmake modules generation is not needed with Qt 5.4 and Qt Charts so it's disabled. - The new module name and version are updated to the plugin.qmltypes file. Task-number: QTRD-2844, QTRD-3217, QTRD-3218, QTRD-3277, QTRD-3228, QTRD-2526, QTRD-3233, QTRD-3222 Change-Id: Ib7fb26057cde710ffaf6bc780c8bf52a16f45160 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>