| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Call m_colorScale->setVisible(false) when setting the axis
visibility to false.
Fixes: QTBUG-114814
Pick-to: 6.6 6.5
Change-Id: I7564deda68ffba40c33678fd8fa7f6d4efd07588
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QColorAxis::gradient() returns a QLinearGradient by value,
QGradient::stops() returns a QList<QGradientStop> by value, so storing
the reference returned by QList::operator[] is, strictly speaking,
dangling. In practice, it isn't because QList is COW and thus the
element is not going to be destroyed, but let's not depend on that
detail.
chartaxiselement.cpp:437:33: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
chartaxiselement.cpp:437:71: note: the temporary was destroyed at the end of the full expression ‘QGradient::stops() const().QList<std::pair<double, QColor> >::operator[](((qsizetype)i))’
Pick-to: 6.5
Change-Id: Ide4dbd0777a44ed0870efffd1739488e1958f814
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Charting values 1000000000000 and 1000000000001 with QValueAxis would
not work since qFuzzyCompare fails with those values.
Pick-to: 6.2 5.15
Fixes: QTBUG-102392
Change-Id: I06dd9b1a86da97d7cc5a59c7fd3696a8165c6205
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
| |
Modified sizehint in each axis to ignore label
size if labels are not visible.
Fixes: QTBUG-60529
Change-Id: Ib4a69f95a23f42849ff13f0d24f7799f84f87c6a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two of the three places doing the calculation neglected to consider
the case of only one tick (division by ticks - 1 is then a problem)
and only one of these explained what the calculation was about.
Package it in a little function and explain what it's about a little
more clearly, then call it from all three users and avoid repetition.
Change-Id: I5826e37522a785d50ba103976be33f4c06ce1dea
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Natural log is marginally cheaper to compute and a ratio of logs, to a
given base, doesn't actually depend on the base; log(a)/log(b) is the
logarithm of a to base b.
Tidy up some duplication into a use of a ternary expression to
simplify one use of this, in the process.
Change-Id: Ic91dc0b4e9255f20f2f6e3d71c32a37f759d623d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ChartAxisElement's methods used two regular expressions to match label
formats. Each was heap-allocated lazily when first needed and there
was a static object whose destructor took care of deleting them.
Repackage that as two little functions, each of which has a local
static instance of QRegularExpression (so it'll be instantiated on the
first call, equivalent to the former lazy construction, and the
compiler / library / runtime can even be expected to take care of any
thread synchronization needed to ensure this is only done by the first
to need it) that it returns.
Change-Id: I61464cddf830e2e077df001bca95d0f962f26571
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This feature adds the availability to pass list of values that
will be used to colorize points using points configuration feature
according to the gradient. Gradient can be either set when calling
the colorBy method or can be taken from attached QColorAxis.
QColorAxis displays color scale widget with ticks and range based
on data passed as colorBy method's parameter.
Task-number: QTBUG-89447
Change-Id: I611048fac0e787e0a1eeaf181c5d8e8a8354fac5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a feature that allows users to switch off labels truncation
that is by default performed if there is too little space for the label.
By default truncateLabels is true, so it doesn't change previous
behavior. If user doesn't want to have truncated labels, he can switch
them off explicitly.
There is also a labelsTruncated method added that returns true if there
is at least one truncated label and false otherwise. The reason for this
is to be able to programmatically check if labels are truncated.
Task-number: QTBUG-89444
Change-Id: I8ab18a8d0335ddf31baf443a2046fee89ce58b38
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Rename ChartAxisElement::isEmpty so it no longer collides with
QGraphicsLayoutItem::isEmpty, which was introduced in Qt 6.0.
Task-number: QTBUG-92586
Change-Id: I14f062e7a0cb090d7da435edfa22d1c447cc1a13
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
| |
qFloor() already returns int.
Change-Id: I62f13a5f270f0881b8de289147550ef901274939
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The if-branching is unnecessary because
ceil(a-b) == -floor(b-a)
Also add comments to clarify subtle differences in seemingly
identical code snippets.
Change-Id: Idfd72e4aecf53805183f5b2741336d805fbfbb6a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove usage of qFuzzyCompare() when zooming in/out on the cartesian
axis charts. Floating point comparisons work fine after the previous
patch removed qCeil() and int() so that no conversions to integral types
happen any longer.
Now one can zoom in/out as much as he likes without any crashes or hangs.
Task-number: QTBUG-93672
Change-Id: I72eae8ae2151f41efda0e37a26a8f66a3d93d26b
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use standard library ceil() and floor() instead of qCeil() and int(),
because the latter return int, and in-between converting to/from
floating-point math, the integer arithmetic causes wrap-arounds.
To be more specific, the following part
qCeil((minValue - value) / interval)
returns a negative number because of int overflow, when the values are:
minValue = 29.999999972060323
value = 0.0
interval = 9.3132257461547852e-09
As a result of this fix, the infinite allocating loop is avoided, but
the program terminates with the following Q_ASSERT() when zooming in
towards the limits of floating point precision.
ASSERT: "labels.size() == labelList.size()" in file
../qt5/qtcharts/src/charts/axis/horizontalaxis.cpp, line 91
Task-number: QTBUG-93672
Change-Id: I5db17a55c3b10cfcb4e093f0ab78edb49f040a8c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.1 5.15
Change-Id: Ib0280e18d8e788631ae3c11674398c2725cbafa6
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 warnings:
animations/axisanimation.cpp:117:51: warning: 'QVariant qVariantFromValue(const T&) [with T = QVector<double>]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
...
axis/chartaxiselement.cpp:385:64: warning: 'QString& QString::sprintf(const char*, ...)' is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations]
...
Change-Id: Ib36d7e09b737110323b816442b36ca2b2e79d6a5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the labelsEditable property handling in the QDateTimeAxis.
If this property set to true the user will be able to manipulate
the axis labels by double clicking on it and entering a new date
in the same format as it is displayed. After finishing the edit
the axis range will be adjusted according to the entered date.
Change-Id: Ide45982875924c8bb4e937b47511dfa3c9237750
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new property (labelsEditable) to the QAbstractAxis. If this
property set to true the user will be able to manipulate the axis
labels by double clicking on it and entering a new value. After
finishing the edit the axis range will adjusted according to the
entered value. At the moment only the QValueAxis is supported,
but I am planning to add support for QLogValueAxis, and QDateTimeAxis
after the basic implementation details got reviewed.
Change-Id: Id87ebfbfb37ed00f09cf7b651395cf3caead1dbb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
This patch removes an unused variable from createDateTimeLabels.
Task-number: QTBUG-70179
Change-Id: Iafabb474890913c33d95d3766f243e8145f0935b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|\
| |
| |
| | |
Change-Id: Ib0ce93137bb1ddc61de77d82c28e25a238f544a0
|
| |
| |
| |
| |
| |
| |
| |
| | |
This patch updates the ChartAxisElement to use QRegularExpression in
place of QRegExp which is to be considered deprecated.
Change-Id: I9f028e69c8337e5aad59351c9cccf222169df849
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|/
|
|
|
|
|
| |
Adds properties to define dynamic tick positioning for ValueAxis.
Change-Id: Ife2ff3032492e063604adba9bd63eed72c0e0a16
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This ensures that the QML and widgets side both behave in the same way
as the QML side handled an empty string as reverting back to the
default. Whereas the widget side did not, now it will ensure that it is
consistent.
Change-Id: Ibc3f149f1761586e5fa04420e3b78bed169304d1
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Axis geometry calculations are not done for hidden axes for
optimization reasons, so we need to explicitly do them
when axes are shown, if necessary.
Task-number: QTBUG-56037
Change-Id: Idf216dfe2c2437ca8a23ead46504edb8769f4c2d
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Mika Salmela <mika.salmela@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
|
|
|
|
|
|
| |
Change-Id: I7ad9838039b56b9e3a7fe2c42a2d8ff818f393fb
Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ic72ee3c9723c2b3f3368c79219b7468f5d95aa84
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Task-number: QTRD-3515
Change-Id: Icd38469386c7fc923047533f2a25b726f2f6caa5
Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Added support for reverse axis. This works with line, spline, scatter
and area series with cartesian chart. QBarCategoryAxis is not supported,
nor different bar series.
Change-Id: I60f21372ea9cee7b49918d7d99de24671bdc42c3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
|
|
|
|
|
|
|
| |
Copyright header changes for Qt 5.5.
Change-Id: I2b8e9356997de2c87a7436bcefd4d0948d566259
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
|
|
|
|
|
|
|
| |
Use qmath and cmath methods instead of math.h methods.
Change-Id: I7c853f2e1218a1d3cde15a089192c24a6b0b1395
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
|
|
|
|
|
|
|
| |
Task-number: QTRD-2098
Change-Id: Ib658c8a51af0b73ded5d6b13c8fa58762f859961
Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
|
|
|
|
|
|
|
| |
Updated new license headers and added missing ones to qdoc files.
Change-Id: I9f2af2a8b44c3ebf19fd494628dfaa8775a47b06
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
The label format for axis can now be set so that there's a separator for
thousands, for example, with setLabelFormat("%'5.2f")
Change-Id: Ic159776039d04a91a7ccf648800bd9720c41246e
Task-number: QTRD-3347
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
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>
|