Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEce Cinucen <ece.cinucen@qt.io>2024-11-14 12:22:59 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-11-14 13:02:28 +0000
commit649592a8cbc9c656a7b9be77f043538bf4e242d5 (patch)
tree7d13707203d3bde6eef4b5b5f57cabcf82212bc0 /sources/pyside6/PySide6/QtGraphs
parentfcd6d2ee101e0d5a16f60c3c8edde455d674edd5 (diff)
PySide: Add numpy support for QtGraphs
Added appendNp and replaceNp Added test for appendNp and replaceNp Added the missing file "qcharts_numpy_test.py" to QtCharts .pyproject Pick-to: 6.8 6.8.1 6.5 Change-Id: I55aeba0fd117a8a82c3f69e18a50358936610af9 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6/QtGraphs')
-rw-r--r--sources/pyside6/PySide6/QtGraphs/typesystem_graphs.xml16
1 files changed, 16 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/QtGraphs/typesystem_graphs.xml b/sources/pyside6/PySide6/QtGraphs/typesystem_graphs.xml
index a582ece66..0f16a39ec 100644
--- a/sources/pyside6/PySide6/QtGraphs/typesystem_graphs.xml
+++ b/sources/pyside6/PySide6/QtGraphs/typesystem_graphs.xml
@@ -184,6 +184,22 @@
<object-type name="QScatterSeries"/>
<object-type name="QXYModelMapper" since="6.8"/>
<object-type name="QXYSeries">
+ <enum-type name="PointConfiguration"/>
+ <include file-name="pyside_numpy.h" location="global"/>
+ <add-function signature="appendNp(PyArrayObject *@x@, PyArrayObject *@y@)">
+ <inject-code file="../glue/qtcharts.cpp" snippet="qxyseries-appendnp-numpy-x-y"/>
+ <inject-documentation format="target" mode="append">
+ Adds the list of data points specified by two
+ one-dimensional, equally sized numpy arrays representing the x, y values, respectively.
+ </inject-documentation>
+ </add-function>
+ <add-function signature="replaceNp(PyArrayObject *@x@, PyArrayObject *@y@)">
+ <inject-code file="../glue/qtcharts.cpp" snippet="qxyseries-replacenp-numpy-x-y"/>
+ <inject-documentation format="target" mode="append">
+ Replaces the current points with the points specified by two
+ one-dimensional, equally sized numpy arrays representing the x, y values, respectively.
+ </inject-documentation>
+ </add-function>
</object-type>
<extra-includes>