Commit Graph

74 Commits

Author SHA1 Message Date
KIU Shueng Chuan
6c760f3de1 add PyQt6 to CI
skip tests that don't work for Qt6

add Qt6 and remove Qt4 from test_examples.py

update README.md

switch mouse tests to use QPointF

this eliminates all the special casing for different bindings
2021-01-23 08:31:00 +08:00
KIU Shueng Chuan
c0336acc11 bug: style() should have been styleHint()
Style is enum for { StyleNormal, StyleItalic, StyleOblique }
2021-01-23 08:29:52 +08:00
KIU Shueng Chuan
0fa4557ad6 don't cast buttons, enums and flags to int 2021-01-23 08:29:44 +08:00
Ogi Moore
901f772b5f Skip matplotlib qt6 tests 2021-01-16 14:37:21 +08:00
KIU Shueng Chuan
cc2b811ed1 drop usage of QDesktopWidget
this drops support for Qt4
2021-01-15 08:25:08 +08:00
KIU Shueng Chuan
1a6918a241 replace QDesktopWidget() with QGuiApplication.primaryScreen()
the "try, except" could be dropped if we drop Qt4 support.

however, primaryScreen() may not be the right screen.
2021-01-15 08:25:07 +08:00
Gabriele Buondonno
cae1c66c78
Fix width, height and background in SVG exporter (#1401)
* [SVGExporter] Fix width and height

* [SVGExporter] Fix background color

* [SVGExporter] Remove f-strings

* [Exporter] Fix for QtGui.QGraphicsScene

* Revert "[Exporter] Fix for QtGui.QGraphicsScene"

This reverts commit 5bdd25ea40.

* [test_svg] Fix unit test
2020-10-27 21:27:31 -07:00
Carlos Pascual
23a46b5fb9
Add "left" and "right" step Modes (#1360)
* Add "lstep" and "rstep" step Modes

stepMode is currently either True or False. If it is True,
it requires the user to make len(x) = len(y)+1. This is
inconvenient because it makes it difficult to change the
stepMode on a given curve (just as one would change, e.g.,
its color).

This commit extends the current situation by introducing
two more step modes: "lstep" and "rstep", which do not require
passing an extra x value. In turn, this modes associate each
y value to either the left or the right boundary of the step.

For example, the "rstep" mode is handy when plotting "life"
digital signals in which x,y data pairs are appended as they
are read.

This commit does not modify the behaviour in case of stepMode=True

* Replace step mode names: lstep,rstep -> left,right

* Improve docs for stepMode

Reword docstring and add it to PlotDataItem class too

* Document left and right stepModes as added in v 0.12.0

TODO: confirm the exact version number to use here

* Add comments stress the need for "is True"

Some conditional statements in the code regarding stepMode are
done with "is True". This is actually required since other
possible values such as "left" also evaluate as true but should
not be caught.

* Deprecate boolean API for stepMode

Introduce stepMode="mid" as a replacement of stepMode=True,
but keeping full backwards compatibility with the old API.
Adapt docs, examples and tests accordingly.

* Raise ValueError on unsupported stepMode values

* Rename "mid" step mode to "center"

* Remove "added in 0.12.0" note

See https://github.com/pyqtgraph/pyqtgraph/pull/1360#discussion_r502746919

* Add deprecation warning when stepMode=True

Issue a DeprecationWarning if stepMode=True is being passed to the
constructor or setData() of PlotDataItem or PlotCurveItem.

Note: warnings module is imported locally so that it is esier to
remove once this check is no longer needed.

* Fix wrong syntax in last commit

Fix usage of "default" kwarg in dict.get()
2020-10-13 08:52:07 -07:00
Kenneth Lyons
4110b3e539
Handle axis SI prefix scaling in MatplotlibExporter (#1282)
* Handle axis SI prefix scaling in MatplotlibExporter

* Added some MatplotlibExporter tests and added matplotlib to CI deps

* Install mpl with pip instead of conda

* Cleanup
2020-06-28 08:51:34 -07:00
Karl Georg Bedrich
68b8dbac1a
moved some functionality from method 'export' to new method (#390)
* moved some functionality from method 'export' to new method
'getSupportedFormats' making it accessible from outside
2020-06-01 11:05:39 -07:00
Ogi
173a755b6c Encode csv export header as unicode 2020-05-30 21:13:20 -07:00
2xB
1e81f3dad0 SVGExporter: Correct image pixelation. 2020-04-08 01:14:36 +02:00
Kenneth Lyons
3ba76475d4 Added ImageExporter test for py2-pyside fix 2020-04-03 09:30:23 -07:00
Unknown
6985be2a6f replaced incompatible string construction 2020-03-01 17:46:01 +01:00
Kenneth Lyons
ec445e7601 HDF5Exporter handling of ragged curves with tests (#1072)
* HDF5Exporter handles ragged curves by saving them into different datasets based on their names.

* Add HDF5Exporter tests

* Document HDF5Exporter

* Fix tmp file path
2019-11-12 09:01:49 -08:00
Kenneth Lyons
faef56c3e7 Qulogic py3 fixes (#1073)
* py3k: Remove reduce calls.

* py3k: Remove compatibility sortList function.

Sorting by key has existed since Python 2.4.

* Remove unnecessary sys.path manipulation.

This file doesn't have any __main__ code to run anyway.

* Use context manager
2019-11-12 08:45:42 -08:00
Kenneth Lyons
61ec73a741 Close windows at the end of test functions (#1042)
* Close windows at the end of test functions

* Can't show window deletion warning during interpreter shutdown
starting
2019-09-27 13:37:40 -07:00
Elliott Sales de Andrade
3edbef6c57 Ensure exported images use integer dimensions.
It seems that the parameter tree doesn't enforce the int type very
strongly.

Also, use some local variables more often.
2019-09-13 01:07:57 -04:00
Axel Jacobsen
27d94cae92 enforce utf-8 encoding for casting QByteArray to str
remove print statements
2019-08-06 12:00:31 -07:00
Ogi
c69e04db2d Simpler way of extracting types from QByteArray
Simpler way of extracting bytes from QByteArray
2019-05-25 00:24:48 -07:00
2xB
e2b01ccf74 FIX: Correct deletion of matplotlib exporter window object (#868)
E.g. when opening the Matplotlib exporter multiple times, and one closes one instance, Python crashes.
This is caused by the Matplotlib QMainWindow listening to the closeEvent and deleting the only reference of
the window before it is closed properly.
2019-05-23 21:35:01 -07:00
HappyTreeBeard
8420fe984a Fixed bug in unit test where temp file remained open when os.unlink was called (#832) 2019-05-23 21:33:23 -07:00
Ales Erjavec
56950479f9 SVGExport: Initialize option.exposedRect for items that use it 2018-07-06 15:53:28 +02:00
Luke Campagnola
0af4706024
Merge pull request #635 from campagnola/pyside2
WIP: PySide2 support
2018-05-24 17:14:11 -07:00
Luke Campagnola
66dcfc7c67 Merge branch 'develop' into pyside2 2018-05-22 15:22:54 -07:00
Luke Campagnola
a86ab30578 fix iteritems 2018-05-15 16:37:20 -07:00
Luke Campagnola
ee2d00c42a Add option to remove non-scaling-stroke from svg output 2018-04-25 12:15:14 -07:00
Luke Campagnola
56aae02821 fix svg export failure when first line point is masked 2018-04-25 11:54:06 -07:00
Luke Campagnola
d1c027b87d
Merge pull request #641 from markotoplak/qt5_axis_scale
SVGExporter: fix axes position and scale
2018-03-29 18:03:18 -07:00
Luke Campagnola
f79bd8d4fb svg export fix: more explicit check 2018-03-29 09:06:20 -07:00
Marko Toplak
c7a32d8311 SVG export: handle Qt.NoPen on Qt5 2018-03-02 09:46:51 +01:00
Marko Toplak
d09fe6bd47 SVGExporter: logicalDpiX instead of physicalDpiX
Fixes problems with non-aligning axes on Qt5 svg exports.  In the output
svg, the axes were (individually) scaled for physical/logical ration.
2018-03-01 15:40:10 +01:00
Luke Campagnola
82afad8366 Fix up Qt.py and deprecate USE_XX variables 2018-02-16 20:42:34 -08:00
Luke Campagnola
6287874b5c Minor fix - check for ragged array length when exporting to hdf5 2017-09-13 21:37:19 -07:00
Luke Campagnola
5d6be5796b image export: add option to invert pixel values (but not hues) 2017-09-13 21:36:34 -07:00
Luke Campagnola
9203f5ad1e Merge pull request #458 from ZacDiggum/develop
fix image export bug
2017-05-01 17:30:50 -07:00
Luke Campagnola
d36a161f31 Fixed unicode error when exporting to SVG with non-ascii symbols 2017-05-01 09:34:37 -07:00
ZacDiggum
d4bff30f11 fix image export bug
fixes #454
2017-03-07 10:34:48 +01:00
Eric Dill
e6c1c54a6b MNT: Use tempfile 2015-07-17 13:33:39 -04:00
Eric Dill
0e4fd90ca2 ENH: Clean up temp file from test suite 2015-07-13 13:38:04 -05:00
Luke Campagnola
0976991efd Import from python2_3 for all uses of basestring, cmp, and xrange 2015-05-19 09:29:55 -04:00
Luke Campagnola
1fe5976e19 Merge branch 'pyqt5' into develop
Conflicts:
	examples/parametertree.py
	pyqtgraph/Qt.py
	pyqtgraph/graphicsItems/FillBetweenItem.py
	pyqtgraph/graphicsItems/InfiniteLine.py
	pyqtgraph/imageview/ImageView.py
2015-02-28 11:46:41 -05:00
Luke Campagnola
058dd183d3 Cleaned up example loader 2015-02-28 10:32:34 -05:00
Luke Campagnola
1df5103d94 Fixes following acq4 merge 2014-08-07 09:11:34 -04:00
Luke Campagnola
753ac9b4c4 Squashed commit of the following:
commit ca3fbe2ff9
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Thu Aug 7 08:41:30 2014 -0400

    Merged numerous updates from acq4:
    * Added HDF5 exporter
    * CSV exporter gets (x,y,y,y) export mode
    * Updates to SVG, Matplotlib exporter
    * Console can filter exceptions by string
    * Added tick context menu to GradientEditorItem
    * Added export feature to imageview
    * Parameter trees:
        - Option to save only user-editable values
        - Option to set visible title of parameters separately from name
        - Added experimental ParameterSystem for handling large systems of
            interdependent parameters
        - Auto-select editable portion of spinbox when editing
    * Added Vector.__abs__
    * Added replacement garbage collector for avoiding crashes on multithreaded Qt
    * Fixed "illegal instruction" caused by closing file handle 7 on OSX
    * configfile now reloads QtCore objects, Point, ColorMap, numpy arrays
    * Avoid triggering recursion issues in exception handler
    * Various bugfies and performance enhancements
2014-08-07 09:03:26 -04:00
Luke Campagnola
8f2a64a9dd Fixed CSV export when PlotDataItem uses stepMode=True
Added CSV export unit tests
Merge remote-tracking branch 'termim/csv' into develop
2014-05-19 18:23:29 -04:00
Mikhail Terekhov
8ef2cb7e48 CSVExporter: fix the case when stepMode=True 2014-05-08 23:01:53 -04:00
Luke Campagnola
6b66edfd46 Added Travis CI support
Fixed bugs / style issues to please Lord Travis

Squashed commit of the following:

commit f25048a1e1
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Sun Mar 30 02:40:47 2014 -0400

    syntax

commit cc8b69695a
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Sun Mar 30 02:36:49 2014 -0400

    add size check, diff style check

commit 5d5ea065a4
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Sun Mar 30 02:16:05 2014 -0400

    travis fix

commit b154c6d997
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Sun Mar 30 02:09:41 2014 -0400

    travis, flake colored output

commit 46921dcd87
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Wed Mar 26 12:37:54 2014 -0400

    fix pyside+py3 bugs to satisfy CI

commit 1d30f3c5c7
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Wed Mar 26 11:13:18 2014 -0400

    fix py3 tests

commit 426578fa4c
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Wed Mar 26 07:39:19 2014 -0400

    fix pytest install

commit 88a13c1a71
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Wed Mar 26 00:29:29 2014 -0400

    qt5 updates

commit 51995488cc
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Wed Mar 26 00:16:04 2014 -0400

    correct py.test command for py3

commit e2b02fbcbd
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Tue Mar 25 23:50:38 2014 -0400

    fix 2nd install test

commit 4b3e3ee04a
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Tue Mar 25 23:31:31 2014 -0400

    syntax error

commit 250eabdb34
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Tue Mar 25 23:13:42 2014 -0400

    look for py.test3

commit 9f9bca47c1
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Tue Mar 25 22:54:19 2014 -0400

    fix syntax

commit 0a871c6f36
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Tue Mar 25 22:47:58 2014 -0400

    output pip build log

commit dbce58d8cd
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Tue Mar 25 22:38:55 2014 -0400

    no comments allowed between shall lines

commit b79c06121d
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Tue Mar 25 20:56:35 2014 -0400

    another pip try

commit 09f4f5d82a
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Tue Mar 25 13:36:09 2014 -0400

    pip correction

commit 0eedb5c18e
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Tue Mar 25 13:29:00 2014 -0400

    correct py version output

commit d9fd039be2
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Tue Mar 25 11:55:43 2014 -0400

    apt checks

commit cf95ccef86
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Tue Mar 25 10:23:10 2014 -0400

    alternate pip install method

commit bee0bcddfe
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 23:51:45 2014 -0400

    correct deps install

commit 963a4211fc
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 23:47:30 2014 -0400

    fixes

commit 0c86cd1dc2
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 23:31:06 2014 -0400

    permission fix

commit 5d04ef53b8
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 23:30:19 2014 -0400

    Fix py.test version selection

commit b0e6c7cb94
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 23:25:34 2014 -0400

    try another pyqt5 install method

commit 422a792866
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 23:12:36 2014 -0400

    syntax error

commit 533133905a
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 23:04:37 2014 -0400

    fixes

commit 8d65211ba4
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 22:40:18 2014 -0400

    Add Qt5 test
    minor fixes

commit 4484efaefe
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 22:31:56 2014 -0400

    use correct py.test for python version

commit 5d2441a29b
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 22:24:27 2014 -0400

    add setup tests

commit 9291db64f2
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 21:48:43 2014 -0400

    fix py3-pyqt install

commit a7aa675c5a
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 21:31:33 2014 -0400

    travis tests

commit e71cd2b23a
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 21:17:15 2014 -0400

    more corrections

commit 527df3bca8
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 20:56:01 2014 -0400

    travis corrections

commit 87d65cac4a
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 20:48:02 2014 -0400

    Add flake tests
    Correct style in a few files to please Lord Travis

commit 537028f88f
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 17:36:24 2014 -0400

    minimize pyside package install
    correct line endings to satisfy Lord Travis

commit 1e3cc95e37
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 17:23:03 2014 -0400

    enable pyside, line ending check
    fix test

commit d7df4517f9
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 17:12:06 2014 -0400

    syntax fix

commit 1ad77a2155
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 17:00:30 2014 -0400

    alt. pytest install

commit 5edcc02072
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Mon Mar 24 16:52:33 2014 -0400

    Added initial travis.yml
2014-03-30 02:51:32 -04:00
Luke Campagnola
ed87cffd1f corrected SVG test, moved to its proper home 2014-03-24 12:48:30 -04:00
Luke Campagnola
f4e0f091dc Fixes against relative-import reorganization 2013-12-23 18:42:02 -05:00