summaryrefslogtreecommitdiffstats
path: root/src/graphs3d/qml/qquickgraphsbars.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change the remaining qWarnings to qCWarningsSami Varanka8 days1-2/+3
| | | | | | | | | | Change the remaining qWarnings to qCWarnings in the src folder. Pick-to: 6.10 6.11 Fixes: QTBUG-142438 Task-number: QTBUG-142437 Change-Id: Ie8c01af44bda666ba3149cd5dbd448cdbe34b2ad Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix rendering slice to an image if selectionMode does not matchTomi Korpipaa12 days1-4/+2
| | | | | | | | | | | | There were checks for selectionMode in offscreen slice creation functions, which either were not needed at all, or did not check all of the required conditions. Pick-to: 6.10 Fixes: QTBUG-142047 Change-Id: Idbc5cd4dc0880bca6ba958e5cffa582a90aef035 Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
* Add multiaxis support for 3D graphsSakaria Pouke2025-11-261-5/+62
| | | | | | Fixes: QTBUG-126656 Change-Id: I6be34928e2fa2926f9c26c15853231adf1200138 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix: Graphs3D series item label visibilitySami Varanka2025-10-281-3/+18
| | | | | | | | | | | | | Bars3D and Scatter3D didn't hide the item label according to series' itemLabelVisible. This was also in the Surface3D but it was fixed already. However, the fix was not complete since it did not work if the selection was active. Fixes: QTBUG-141370 Pick-to: 6.8 6.10 Change-Id: I65acfc33e0d41cd4322efe521b7d7ba509ca159a Reviewed-by: Niko Korkala <niko.korkala@qt.io> Reviewed-by: Sami Varanka <sami.varanka@qt.io>
* Handle NaN values in 3d seriesSakaria Pouke2025-10-021-0/+3
| | | | | | | | Fixes: QTBUG-140240 Pick-to: 6.10 6.8 Change-Id: Ib476a877dea4815b91626f83c107c91c0354731d Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sami Varanka <sami.varanka@qt.io>
* 3D: Remove unused mutex variablesSami Varanka2025-09-121-3/+0
| | | | | | | | | These mutexes were leftovers from datavis3d. Pick-to: 6.10 6.9 6.8 Change-Id: Ic576ef945068a9d546babc00c05566cb0e0cc490 Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
* 3D: Add tracepoints to barsSami Varanka2025-09-121-0/+71
| | | | | | | | Pick-to: 6.10 Task-number: QTBUG-130380 Change-Id: I455cb5374cb445416c92a5233aab2a279d84d556 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
* API review: don't return pointer to QImage from renderSliceToImageVolker Hilsheimer2025-09-011-4/+2
| | | | | | | | | | | | | | | | In fact, don't return the QImage at all. It's an asynchronous function, and the rendering will take an unknown time to complete. Callers must connect to the sliceImageChanged() anyway to get the result, so just let them do that, instead of clumsily polling with a timer. Update the documentation and manual tests as much as possible for now. There are baseline tests, but no auto-tests, so hard to say if this still works correctly. It's likely that this needs a bit more work as a follow up, but at least we don't release any dangerous API. Pick-to: 6.10 Change-Id: I19d616c76746a826c4a46ed1df0aab4dc988556c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix clazy-non-pod-global-static warningTomi Korpipaa2025-08-051-3/+3
| | | | | | | | | | | Doing it this way should not break unity build, unlike the previous attempt. Pick-to: 6.9 6.10 Change-Id: Ibe7f305ba9e41d1465bad7bbb7fb61860b225a98 Reviewed-by: Tim Blechmann <tim.blechmann@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io> Reviewed-by: Sami Varanka <sami.varanka@qt.io>
* Revert "Fix clazy-non-pod-global-static warning"Tomi Korpipaa2025-08-051-10/+3
| | | | | | | | | | | This broke unity build, so it has to be reverted in this form. This reverts commit 6ba5d8f00c0164bc605e19c352482f0452d9143c. Pick-to: 6.9 6.10 Change-Id: I58719cd79c53af764e973b47e115e0f4f02af917 Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* GraphsWidgets: Do not introduce new QSharedPointersTomi Korpipaa2025-07-291-10/+16
| | | | | | | | | | | | | | | | | | Based on API review: Do not introduce new APIs with QSharedPointer Rationale: QSharedPointer's implementation is poor and requires twice the number of atomic operations on copy than std::shared_ptr. We want to remove the class in Qt 7. Solution: Instead of returning shared pointer to a QQuickItemGrabResult that is received from the QQuick3DViewport, extract the image from the grab result and return a pointer to that instead. Pick-to: 6.10 Task-number: QTBUG-137478 Change-Id: I54cc9aece72cf8cf5ec4abaddc1da189d0c31b2b Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
* Fix clazy-non-pod-global-static warningTomi Korpipaa2025-07-281-3/+10
| | | | | | | | Pick-to: 6.9 6.10 Change-Id: Iac3ba82a158acd495e76b841bce5bca3ba96c5d5 Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
* Graphs: rename enum SliceType to SliceCaptureTypeKwanghyo Park2025-07-241-6/+7
| | | | | | | | | | | | Based on API review: this change improves the clarity and semantics of the enum by renaming SliceType to SliceCaptureType. Enum values were also renamed to explicitly indicate the type of slice being captured to an image. Pick-to: 6.10 Task-number: QTBUG-137478 Change-Id: I1c21180f064d26189ba4121e412f103017c00fd6 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix several clazy warningsTomi Korpipaa2025-07-211-1/+0
| | | | | | | | | | | | | | | | | | | | - Emit keyword being used with non-signal QQuickItem::update [clazy-incorrect-emit] - Missing emit keyword on signal call QAbstractSeries::update [clazy-incorrect-emit] - Don't call QList::first() on temporary [clazy-detaching-temporary] - unused QString [clazy-unused-non-trivial-variable] - unused QVector<SurfaceVertex> [clazy-unused-non-trivial-variable] - Mixing iterators with const_iterators [clazy-strict-iterators] - Call to temporary is a no-op: QByteArray::clear [clazy-writing-to-temporary] - Missing reference in range-for with non trivial type (QList<QQuickGraphsSurface::SurfaceVertex>) [clazy-range-loop-reference] Pick-to: 6.10 Change-Id: I4eb70bdf306ee276e2e897b92719cae5f795624a Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io> Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
* Get rid of some clazy warnings in qquickgraphbars.cppTomi Korpipaa2025-07-161-13/+13
| | | | | | | | | Fix "c++11 range-loop might detach Qt container" warnings. Pick-to: 6.9 6.10 Change-Id: I026020b9d37fb08b8038e66690c5576e67e8f3cc Reviewed-by: Niko Korkala <niko.korkala@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Include what you use: qquaternion.hMarc Mutz2025-07-141-0/+2
| | | | | | | | | | | | | | | qmatrix4x4.h will lose its qquaternion.h include, so include qquaternion.h explicitly in all files that mention 'QQuaternion', unless, for a foo.cpp, the own foo.h has already included it. Also add forward declarations, where needed. Amends the start of this module's history. Pick-to: 6.10 6.9 6.8 Change-Id: I605bf742be5bb92a676704f12d738d241bd9b0da Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix endless sync loop in Bars3DTomi Korpipaa2025-07-141-6/+15
| | | | | | | | | | | Floor was updated in each sync, triggering some dirty flags being set. Update floor only if something affecting it changes. Pick-to: 6.9 6.10 Fixes: QTBUG-136174 Change-Id: I172a8b443fd6d65f9cac3390071329f95a731f47 Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
* Fix continuous updateLabels in barsTomi Korpipaa2025-07-141-5/+5
| | | | | | | | | | | | | This does not fix the continous synchData completely, but removes the unnecessary label updates. Another patch is needed to take care of the endless sync loop. Pick-to: 6.9 6.10 Task-number: QTBUG-136174 Change-Id: I222deb86c25a4fafde73c550b0ae7151047a66e2 Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io> Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
* Add unlit shading to 3d graphsSakaria Pouke2025-06-011-0/+12
| | | | | | Fixes: QTBUG-136978 Change-Id: I57dc414e28742b5cce2ed6facae745ce90881a99 Reviewed-by: Sami Varanka <sami.varanka@qt.io>
* Add categorized logging to graphs 3d pt1Niko Korkala2025-05-291-27/+74
| | | | | | | | | | | | | | | | Feature allows developers to turn on categorized logging in graphs 3D which will log various different things qt.graphs3d.general, general purpose logs qt.graphs3d.series, series addition/removal qt.graphs3d.properties, property changes qt.graphs3d.events, sliceview enter/exit, zoom/rotate values qt.graphs3d.inputEvents, pick results qt.graphs3d.axis.general, axis general purpose qt.graphs3d.axis.properties, axis properties qt.graphs3d.critical, critical Task-number: QTBUG-128886 Change-Id: I714ff59af47f9ec583eae57e89fd0ae417d900df Reviewed-by: Sami Varanka <sami.varanka@qt.io>
* Add picking to graph nodesSakaria Pouke2025-04-281-2/+10
| | | | | | Task-number: QTBUG-134041 Change-Id: Ie7113d88ea31021d25a7fb58060cfe31f0bccc3a Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add graph node classesSakaria Pouke2025-03-241-5/+9
| | | | | | | | | | | Creates Surface3DNode, Bars3DNode and Scatter3DNode QML elements. The node classes create a graph, reparent the graphs rootNode to itself and forward the parameters. Task-number: QTBUG-134041 Change-Id: I7e53ff96e59bb42febeaf5c0c084646b50785d19 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Create offscreen slice view of given index and grab it to imageKwanghyo Park2025-02-271-1/+207
| | | | | | | | | | | | Slice view creation of given index of row or column The requested slice view is rendered outisde of window and grabbed to QQuickGrabbedResult. QML side provides to save it to a specified path. grabsliceview manual test for feature test Task-number: QTBUG-105607 Change-Id: Ia8019f99134abbb328a027b656ba85552ffcaf92 Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
* Scale rootNode by 100Sakaria Pouke2025-02-171-0/+2
| | | | | | | | | Also adds support for rootNode scaling Fixes: QTBUG-132925 Pick-to: 6.9 Change-Id: If9be83def9532779762da2aab89d411705bfba7d Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix bars rotation if we have negative valuesTomi Korpipaa2025-01-171-0/+19
| | | | | | | | | Pick-to: 6.9 Fixes: QTBUG-132766 Change-Id: I5917e8746d1809e3d9c527f6d8c2061a963a8be6 Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io> Reviewed-by: Niko Korkala <niko.korkala@qt.io> Reviewed-by: Sami Varanka <sami.varanka@qt.io>
* Pass QVector3D by value to doRayPicking()Marc Mutz2025-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | While 2×3×float won't be passed in registers in most ABIs, it's not worse than passing by cref (objects are spilled onto the stack and their addresses passed), but the compiler is much happier because these objects now can't alias anything anymore. Found is API-review. The public Q3DGraphsWidgetItem also passes QColor and QPoint by value, so uses the more modern appoach, and thus this also increases the internal consistency of the API (though I note that it also has a function that passes a QFlags by cref...). Amends 1530321fda0fcfeb5eb10887e0ff8e842fc0516a. Pick-to: 6.9 Change-Id: I6f2911697055d3bff6984a1726a27c65a7a9db27 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add ray picking to all graph typesSakaria Pouke2024-12-031-0/+84
| | | | | | | | Adding missing docs for picking Task-number: QTBUG-129385 Change-Id: Ief9d3a0d50382ae937660f9566b1552c2444c9b6 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Check for invalid values in barThicknessTomi Korpipaa2024-12-021-1/+1
| | | | | | | | Pick-to: 6.8 Fixes: QTBUG-131735 Change-Id: Ia9dbe36d4334ff545cd847f16d11e6398c6c85e3 Reviewed-by: Niko Korkala <niko.korkala@qt.io> Reviewed-by: Sami Varanka <sami.varanka@qt.io>
* Fix margin to be handled properly on bar 3DKwanghyo Park2024-11-261-3/+3
| | | | | | | | | | | margin property on bar 3D was not handled Pick-to: 6.8 Fixes: QTBUG-131527 Change-Id: I310c89b9a8a20b30d959b27d8694ec6eec08e1b3 Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix rotation properties to be supported on barsKwanghyo Park2024-11-261-10/+23
| | | | | | | | | | | | Fix an issue on meshRotation property and the rotations given from data is no properly applied to bars Pick-to: 6.8 Fixes: QTBUG-131405 Fixes: QTBUG-131410 Change-Id: I86484931c8265acca83b8dda2925b4a575e341cf Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sami Varanka <sami.varanka@qt.io>
* Fix setValue and setRotation of QBarDataItemTomi Korpipaa2024-11-221-0/+1
| | | | | | | | | | | | | QBarDataProxy::setItem's itemChanged was not handled correctly, which caused missing rendering when an item in a proxy was updated. Pick-to: 6.8 Fixes: QTBUG-131423 Change-Id: I2eb34f6b77228d5c9eb8d43286f64310f6dcbb57 Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io> Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix edgeLabelsVisible propertyTomi Korpipaa2024-11-181-0/+6
| | | | | | | | | Pick-to: 6.8 Fixes: QTBUG-131140 Change-Id: Ia750776d0f444beee17e74983b3f87c03ec06b28 Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix docs for scene, selectedSeries, and selectedElementTomi Korpipaa2024-11-151-0/+2
| | | | | | | | Pick-to: 6.8 6.8.1 Task-number: QTBUG-131131 Change-Id: Ia1ad7eac5b5e2a33ea3844202262e53535082480 Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Make camera rotation limits publicSakaria Pouke2024-11-111-13/+0
| | | | | | | | | QML only, public getters/setters already exist for widget Fixes: QTBUG-121318 Change-Id: I391e57c6570a572ec40bb41ec6a9f959815389e2 Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix wrong bar mesh issue when changing the data rangeDilek Akcay2024-08-271-1/+1
| | | | | | | | | Fixes: QTBUG-127497 Pick-to: 6.8 Change-Id: Ia12d4ae9140245b0d8682b96ec7bf9cfcc140afc Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io> Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io> Reviewed-by: Sami Varanka <sami.varanka@qt.io>
* Exit from slice view when no items in slice listTomi Korpipaa2024-08-091-3/+2
| | | | | | | | Pick-to: 6.8 Fixes: QTBUG-127808 Change-Id: Ibf5fd19138634b3d0eaade8f29ef3d4be8d34626 Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix Bars memory leaks in barsgraphSami Varanka2024-08-091-23/+19
| | | | | | | | | | Use Stack allocated slice lists instead of heap allocated. Pick-to: 6.8 Fixes: QTBUG-127720 Change-Id: I18cf9499a0512136996961ed2e182243926e57f1 Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Pass small types by valueSami Varanka2024-07-251-9/+9
| | | | | | | | | Small types fit into 16 bytes. Pick-to: 6.8 Task-number: QTBUG-127446 Change-Id: Ic609ccef3badcc0eebd88c0099a355b0cf7e9a2e Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Remove series from slice bars when removedTomi Korpipaa2024-07-231-0/+6
| | | | | | | | | | | | | When a series was removed, it remained in the slice bar model hash. This caused a wrong series to be found when going into slice view, if a new series was added and old one(s) removed. Pick-to: 6.8 Fixes: QTBUG-127348 Change-Id: I7349588060b9d0fb76382e735a8d852071b22981 Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add value coloring for barsSakaria Pouke2024-07-221-0/+17
| | | | | | | Fixes: QTBUG-126354 Change-Id: I2c2171bbce79b046d5d163676dfc5f56e0631a3d Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sami Varanka <sami.varanka@qt.io>
* Change updaeSliceItemLabel to take const refSami Varanka2024-07-191-1/+1
| | | | | | | Pick-to: 6.8 Task-number: QTBUG-127390 Change-Id: Ia528cdce2b5673639a84b97035a0b5fa34325286 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
* Do viewport and quickitem size changes correctlyTomi Korpipaa2024-07-031-6/+6
| | | | | | | | | | | | | | This patch contains cleanup of the relevant code and fixes the viewport and window size problems, but does not fix the main resizing issue. Also fix autotest failures that appeared after autotests got enabled. Pick-to: 6.8 Task-number: QTBUG-126506 Change-Id: Ib722e398ea48fe0d1312ac78c6641c690fb25d87 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Change QGraphs3D namespace name to QtGraphs3DDilek Akcay2024-06-191-48/+47
| | | | | | | | Task-number: QTBUG-125886 Pick-to: 6.8 Change-Id: Ifcde54306e518c352d9b354c9bfe92c52c0bb0e3 Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add item selected check for item label visibiltySakaria Pouke2024-06-131-0/+1
| | | | | | | | Fixes: QTBUG-126269 Pick-to: 6.8 Change-Id: Ibada245167316587462f0c1c85838b0151859dd5 Reviewed-by: Dilek Akcay <dilek.akcay@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
* Docs: Add \qmlsignal descriptions for Qt Graphs 3DAlexei Cazacov2024-06-031-5/+71
| | | | | | | | | | | | Unify docs for QML properties \qmlsignal use. Signals for {propertyName}Changed should be documented. Move qml docs to proper source files. Task-number: QTBUG-123522 Pick-to: 6.8 Change-Id: I47f34d10dc6bbf46d3c9712cee5d27aa5968a598 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Change 'enabled' properties to visible in GraphsThemeDilek Akcay2024-05-311-5/+5
| | | | | | Task-number: QTBUG-125377 Change-Id: I3e7ad9ec44e58af221b94cbe46186b92c0ae5a63 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Change SelectionFlag enum to enum classDilek Akcay2024-05-301-26/+25
| | | | | | | Task-number: QTBUG-125365 Change-Id: Id890ab19b0126f503824778c06a506dfb706c7b4 Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix warnings of AbstractGraph naming in docsDilek Akcay2024-05-291-5/+5
| | | | | Change-Id: I9cb5dd90b4e963b5dee62c48fa6587d8983cdf78 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix incorrect bar type when plot area is not visibleTomi Korpipaa2024-05-291-1/+1
| | | | | | | Fixes: QTBUG-125774 Change-Id: I2d52a03b8ab965d7e6c0d4c5215ed0d19212aab4 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Dilek Akcay <dilek.akcay@qt.io>
* Move widgets to another moduleSami Varanka2024-05-281-0/+157
| | | | | | Fixes: QTBUG-125719 Change-Id: Ieeab2e64d0d2a3a8d3969df5384b7ddd0fd180b7 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>