Commit Graph

213 Commits

Author SHA1 Message Date
Tomi Korpipaa 772873717a Fix scaling of custom objects in widgetgraphgallery example
Custom object scaling had a bug before 6.9 which made them
2 times too small by default. Adjust scaling in the example
to take that into account.

Pick-to: 6.9
Change-Id: I0b3bfa4fe8606394765372d96d19f4c82e63087e
Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
Reviewed-by: Niko Korkala <niko.korkala@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2025-02-14 09:01:11 +00:00
Tomi Korpipaa 479b31786a Update the visuals of the graphprinting example
Pick-to: 6.8 6.9
Fixes: QTBUG-131427
Change-Id: I093e439e63f318c7562471a221b831bf3832bf68
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>
2025-01-15 13:25:39 +02:00
Niko Korkala e71ccde8d5 Fix sliders not staying inside the rectangle when resizing window
Also fixed style customization warnings by switching style to basic instead of using the native one

Task-number: QTBUG-119683
Pick-to: 6.9
Change-Id: I818b37cb9d8f4edfa2d1583f38897c2190a53e0c
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2025-01-02 14:32:52 +02:00
Tomi Korpipaa 46e57e565d Remove unnecessary valueRolePattern & Replace
We're using only one of the values, so they are not needed.

Pick-to: 6.9
Task-number: QTBUG-131427
Change-Id: If39b252c5e63f56b286a9d98ce71856035a67cca
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
2024-12-20 12:18:29 +02:00
Sakaria Pouke 91f30ef4a0 Add graph printing example
Shows how to print a graph to a pdf and printer

Fixes: QTBUG-124213
Pick-to: 6.8
Change-Id: I1835b77fc5e80d065e64b69b47002932487dfe68
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-12-02 15:01:36 +02:00
Sami Varanka 710cd6d2ee Fix DirectToBackgound documentation
Change QSurfaceFormat link to IdealSurfaceFormat.

Pick-to: 6.8
Fixes: QTBUG-127689
Change-Id: Ic9a27fb421e510b51492984dacee2c68eb88919d
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-11-28 19:59:11 +00:00
Tomi Korpipaa 2bd110c9cd Add missing resource file
Pick-to: 6.8
Fixes: QTBUG-131278
Change-Id: I4ec0c264262b23622e5efae9d0a0ad4e058ff015
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-11-19 07:38:56 +02:00
Kai Köhne e5695d4e48 Doc: Show new quickwidgetgraphs example in Data Visualization category
Change-Id: Id6a4ff8c3da056a4582f86aa9f60a9440fe27497
Reviewed-by: Niko Korkala <niko.korkala@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-11-18 13:54:18 +00:00
Tomi Korpipaa 8a13776f9c Fix B2Qt build of cockpit example
Pick-to: 6.8
Fixes: QTBUG-129352
Change-Id: I3a821ec5c707c1533079dbf3c25ee13d0beb62ec
Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>
2024-10-15 11:11:43 +03:00
Kai Köhne ef7a5e40ad Move Cockpit example to 'Data Visualization' category
Right now, it shows up in Qt Creator only under 'Other'.

Pick-to: 6.8
Change-Id: Ic594d854dfcc5c93bfbff61cceb4c4fcda86c805
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-10-02 09:10:30 +02:00
Jere Tuliniemi 81a6271e44 Change count from invokable to property
Count was mistakenly implemented as an invokable function making
it unusable in QML for binding purposes.

Fixes: QTBUG-129272
Pick-to: 6.8 6.8.0
Change-Id: I9b985d69bebbac33972f42ef2177483e2b0f2b42
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-09-24 12:49:25 +03:00
Tomi Korpipaa 8b7dc3fa99 Use Fusion style in equation example
Pick-to: 6.8.0 6.8
Fixes: QTBUG-126433
Change-Id: I542df59095c79daef09ba288116942dab4ade895
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-09-23 08:23:59 +03:00
Tomi Korpipaa b0255c4d66 Add feature support for 2D graphs
Fixes: QTBUG-121037
Change-Id: I9090a3dfc051c0e8aadd5c00a0cc086763c32269
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-09-20 12:29:49 +03:00
Tomi Korpipaa ad26001c76 Stop QtGraphs 3D examples crashing with wasm
Forcing extra link options with Qt 6.8.0 wasm caused crashes,
possibly due to the emscripten sdk version difference between
Qt 6.7 and Qt 6.8.

Pick-to: 6.8.0 6.8
Fixes: QTBUG-128889
Change-Id: Ica5b7158a52c4bb5049a59063a32bb9386d6d608
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-09-13 14:06:31 +03:00
Niko Korkala f72d6e6d3b Add Pie chart example using QQuickWidget
Note: Currently there's a bug with pie charts. When you remove slices they do not get removed from the draw, see QTBUG-128213

Task-number: QTBUG-124680
Change-Id: Ib0b2eecf01f77a77768d11fe7771e73f78da951b
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-09-12 08:00:22 +03:00
Tomi Korpipaa 06ec3cf621 Prevent building widget examples for nonsupported platforms
Users were still able to try and build widget examples
stand-alone on Android, for instance. Prevent it.

Pick-to: 6.8 6.8.0
Fixes: QTBUG-128799
Change-Id: I398b8c724e038d5142bbd5a3a2aa8c8ead17a1c2
Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
2024-09-12 03:58:57 +00:00
Dilek Akcay 7177169156 Fix resizing issue in widgetgraphgallery
Fixes: QTBUG-128432
Pick-to: 6.8 6.8.0
Change-Id: Ib10791960b4b9780a7da1c8753001c6daf28ce5e
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-09-11 07:18:41 +00:00
Niko Korkala 7321a91a95 Docs: Improve hellographs example documentation
Pick-to: 6.8
Task-number: QTBUG-128492
Change-Id: I36335b8003dd4eb1e23e1e3fe0d59d1dd89c19da
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-09-03 10:57:06 +03:00
Owais Akhtar 7f6333b794 Add documentation for 2D Cockpit example
Documentation for 2D example was not present

Pick-to: 6.8
Task-number: QTBUG-128379
Change-Id: I7b2d19e732d43d4540f283f009ea83123bfc420e
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-09-02 15:12:13 +03:00
Kwanghyo Park 7dc92c5993 Fix issues on widget 3d examples on iOS
QML plugins are missing for static build such as iOS.
Also issues on iOS when using QuickWidget in TabWidget

Pick-to: 6.8
Task-number: QTBUG-125480
Change-Id: I398ff13fab49731bb58d94018bc760f5125a9c66
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
2024-08-27 13:55:11 +03:00
Alexei Cazacov c9a337d132 Docs: Qt Graphs - improve the documentation readability and style
This commit improves the readability, structure, style, and formatting
of the Qt Graphs docs. It also corrects several minor issues and broken
links.

Task-number: QTBUG-127820
Pick-to: 6.8
Change-Id: Ie564fde207f7059f6cd064ab74599aad0753ea6f
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-08-26 13:07:03 +03:00
Owais Akhtar 7e03b8a46f Create real world example
An example view of a fictional airplane cockpit

Pick-to: 6.8
Task-number: QTBUG-124682
Change-Id: I71fced0221eb85d4261a1c88d89938990b1fabf2
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-08-23 08:15:40 +03:00
Niko Korkala 3ae05a2929 Fix typos and incorrect documentation
Task-number: QTBUG-124834
Pick-to: 6.8
Change-Id: Ica2bb97857be5c9071c49f235356179a06781574
Reviewed-by: Owais Akhtar <owais.akhtar@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-08-14 10:31:27 +00:00
Tomi Korpipaa 47baa84b2c Do not call selectedBar unnecessarily
Also clean up extra semicolons from functions

Note: This fixes the problem in the linked ticket,
but does not fix the root cause of it. This is why the
ticket is left open.

Pick-to: 6.8
Task-number: QTBUG-127801
Change-Id: I5259ca55162e61ded68d5d3a2544944fb73a3bef
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-08-09 10:29:46 +03:00
Tomi Korpipaa 9515142cfb Update widgetgraphgallery and docs
Pick-to: 6.8
Fixes: QTBUG-126830
Change-Id: I1a2e1a157c6243d43fc3d5e5c334e2744671aa1d
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-08-08 08:30:34 +03:00
Topi Reinio 251ceebe0a Doc: Fix linking issues in documentation
Fixes the following warnings:

src/common/theme/qgraphstheme.cpp:
  (qdoc) warning: Can't link to 'Default Theme'

examples/graphs/3d/equation/doc/src/equation.qdoc:
  (qdoc) warning: Can't link to 'ListModel'
  (qdoc) warning: Can't link to 'Scatter3DSeries.mesh'
  (qdoc) warning: Can't link to 'View3D.importScene'
  (qdoc) warning: Can't link to 'View3D.environment'
  (qdoc) warning: Can't link to 'ExtendedSceneEnvironment.backgroundMode'
  (qdoc) warning: Can't link to 'ExtendedSceneEnvironment.clearColor'
  (qdoc) warning: Can't link to 'ExtendedSceneEnvironment.tonemapMode'
  (qdoc) warning: Can't link to 'ExtendedSceneEnvironment.glowEnabled'
  (qdoc) warning: Can't link to 'ExtendedSceneEnvironment.TonemapModeNone'

src/common/theme/qgraphstheme.cpp:
  (qdoc) warning: Can't link to 'QQuickGraphs::theme'

src/graphs2d/qgraphsview.cpp:
  (qdoc) warning: Can't link to 'Testbed'

src/graphs3d/doc/src/qtgraphs3d-overview.qdoc:
  (qdoc) warning: Can't link to 'How to construct a minimal Q3DBars graph'
  (qdoc) warning: Can't link to 'How to construct a minimal Q3DScatter graph'
  (qdoc) warning: Can't link to 'How to construct a minimal Q3DSurface graph'

src/graphs3d/engine/q3dscene.cpp:
  (qdoc) warning: Can't link to 'QtGraphs3D::SelectionRow'
  (qdoc) warning: Can't link to 'QtGraphs3D::SelectionColumn'

src/doc/qtgraphs.qdocconf:
  (qdoc) warning: Failed to find
    qhp.QtGraphs.subprojects.gettingstarted.indexTitle
      'Qt Graphs Getting Started'

Pick-to: 6.8
Change-Id: If43f23dcef00b5fccd9ddd449bb1fcc744e09668
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-31 11:27:44 +00:00
Tomi Korpipaa 6a604eb4ab Change equation example title
Pick-to: 6.8
Change-Id: I6abc7d3d5123bb2865b41286ce2923ee09963e0b
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-31 10:03:18 +03:00
Sami Varanka 7569772b09 Rename labelAutoRotation to labelAutoAngle
Pick-to: 6.8
Task-number: QTBUG-125364
Change-Id: I74c9c556708616aba45beeb9d5d4a356bb391198
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-31 09:15:28 +03:00
Jere Tuliniemi 81c8f453c3 Change colors when platform color scheme changes
Add a connection to listen to platform color changes. This is done by
adding an internal color scheme enum that contains Automatic value
in addition to Unknown, Light and Dark. The user can opt in and out
of the automatic behavior by setting the color scheme with the new
enum.

Fixes: QTBUG-125782
Pick-to: 6.8
Change-Id: I21a82269d498b1fc17c675bcedae7fd71bc36e1c
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-07-26 09:02:54 +03:00
Tomi Korpipaa 267ec9a41e Add docs for equation example
Pick-to: 6.8
Task-number: QTBUG-124827
Change-Id: I38ec5bdbcae84326dae336086f351fdf7c247c56
Reviewed-by: Owais Akhtar <owais.akhtar@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-24 12:03:00 +03:00
Tomi Korpipaa 00e6f9db05 Move testbed to manual tests
Pick-to: 6.8
Change-Id: Iae395b254814c7feed815e01455c5859ef88b608
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-24 10:31:05 +03:00
Tomi Korpipaa a6eb88a8d8 Rename QML module to avoid naming conflicts
Task-number: QTBUG-119273
Change-Id: Ib3e52c078da4886ee45392c63e660fa7a97c38b9
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-24 07:39:02 +03:00
Tomi Korpipaa 1695a4031e Evaluate equation from a TextField
Instead of doing it piece by piece, add a evaluator
javascript file that can parse an equation from a string.

Pick-to: 6.8
Task-number: QTBUG-124827
Change-Id: I496ecbfb0976dd7d5b89cf9dffaec85348369191
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-24 07:38:57 +03:00
Tomi Korpipaa 41630ca362 Equation example improvements
The equation itself still looks bad, we need to
do something about it in a subsequent patch.

Pick-to: 6.8
Task-number: QTBUG-124827
Change-Id: Ifa381e173e7c79a8e469a6ef64934c26b07a6ab3
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-24 07:38:52 +03:00
Dilek Akcay c5e9021eac Add bar graph to equation example
Pick-to: 6.8
Task-number: QTBUG-124827
Change-Id: I7c0f387a7db238ba08c078970128bc53bbdbc705
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-24 07:38:46 +03:00
Dilek Akcay 9ea97278bd Add new example for Graphs3D
Pick-to: 6.8
Task-number: QTBUG-124827
Change-Id: I3e06f7a4ca279df640915866e61208e775f38591
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
2024-07-24 07:38:40 +03:00
Tomi Korpipaa 5729306af9 Rename QML modules to avoid naming conflicts
Windows Boot2Qt builds fail due to the case insensitivity
of the platform. Rename URIs to remove the problem.

Pick-to: 6.8
Fixes: QTBUG-119273
Change-Id: I8fa5afaddaadc072bea715f534b0e8a405c47acb
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-07-22 09:24:42 +03:00
Kaj Grönholm 34d683d34e Clip graphs content to PlotArea
- Adjust renderers sizes to match the plot area and enable
  clipping for them.
- Modify renderers math to match new sizes.
- Remove clipnode as unused.
- Disable GraphsView clipping by default. Users can enable this
  easily "clip: true" if they for some reason want it.
- Don't make renderers available into QML as they are private.
- Add checkbox into axis tester to see that switching between
  custom and default bars works.

Task-number: QTBUG-127302
Pick-to: 6.8
Change-Id: I8b54c6a684bdb3776c4d2422d9a6dd39743e5caf
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2024-07-19 18:56:46 +03:00
Tomi Korpipaa 553b4a2f3b Fix scatter example
IconImage is not found anymore in 6.8.0

Pick-to: 6.8
Change-Id: Ie2760aea9e8082a08cda4d1aca6378c0c697b03a
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
2024-07-19 14:04:46 +03:00
Sakaria Pouke 450083e8c8 Change surfacegallery background toggle to plot area background
Fixes: QTBUG-127066
Pick-to: 6.8
Change-Id: I7d9b234ba8b535372dc4dcc23bd27e160b780cb4
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-16 12:18:54 +03:00
Owais Akhtar b21fa39ad1 Fix AreaSeries not updating if upper/lower series in manipulated in QML
This issue also seems to appear for XYSeries in general which is also
fixed in this patch. Also fixed: AreaRenderer does not clear shape when
point is removed and size goes below 2.

Fixes: QTBUG-126875
Pick-to: 6.8
Change-Id: Ie50d114117518c1b769736e55412c61171c42ec7
Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-16 08:10:14 +03:00
Dilek Akcay c86ee31bf3 Add an enum class for shading type in Surface3D
Task-number: QTBUG-126146
Pick-to: 6.8
Change-Id: Ide9bd731f348fb83cb10863efc4aa25484d9fac0
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-15 15:46:48 +03:00
Dilek Akcay 5ab016949c Fix remaining parts of Abstract3DGraphWidget in docs
Task-number: QTBUG-125768
Pick-to: 6.8
Change-Id: Id1ddb84797b797042e732c1d3da8a0030a0a7920
Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-15 13:08:31 +03:00
Owais Akhtar 223c163c9b Fix PieRenderer series add/remove/visibility
This change also requires the patch in QtDeclarative

Pick-to: 6.8
Task-number: QTBUG-125754
Change-Id: If82a0c30e153ad71bb14839a992c043b31da52d6
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-06-24 13:10:27 +03:00
Dilek Akcay dfd54c826c Change QGraphs3D namespace name to QtGraphs3D
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>
2024-06-19 14:09:12 +00:00
Sami Varanka 3e570bf59d Use composition with QQuickWidget
Pick-to: 6.8
Task-number: QTBUG-125771
Change-Id: Id7e5a0b730f47d2a38916c52cd3ab0a0a453c0b8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-06-13 10:29:48 +02:00
Kwanghyo Park a2cdd8b77b Integrate redundant properties into grouped property
Therer is redandancy to the properties for lines.
So grouped them into grouped property.

Task-number: QTBUG-125378
Change-Id: I06e357375aed2dbb662f76669b3e0f8430a0e48d
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
2024-06-12 13:37:43 +03:00
Dilek Akcay d06d9d35fa Fix inconsistent property naming
Task-number: QTBUG-125386
Pick-to: 6.8
Change-Id: Ia749398697ef973a1b60cc52a52328869bedae6f
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
2024-06-12 08:08:41 +00:00
Dilek Akcay f51cb5027e Change 'enabled' properties to visible in 3D
Task-number: QTBUG-125377
Pick-to: 6.8
Change-Id: I342bb9e6a125867fb5e2bcc858d5254047a3ac23
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
2024-06-11 09:29:53 +00:00
Dilek Akcay 0219e8a1f1 Change 'enabled' properties to visible in 2D
Task-number: QTBUG-125377
Change-Id: I373bf3f15a564adc98069fd1eeb8e7e407f071dc
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
2024-06-07 13:42:36 +03:00