Commit Graph

2535 Commits

Author SHA1 Message Date
Nils Nemitz
33365fb730
Reduce reallocation in dynamic range limiter (#1556)
* change imports in cupy module to be local

* reduced re-allocation in dynamic range limiter, part 1

* minor cleanup
2021-02-09 20:36:31 -08:00
lidstrom83
aed2382e38
Correct id-based keying of scatter plot pixmap cache (#1564)
* Correct id-based keying of scatter plot pixmap cache

Note: naively using the id function results in non-unique keys.

Alternatively, we could serialize the Qt objects and use these in the key. This would provide protection from the user mutating these later, but at a cost to performance.

* Make id attribute private

* Access class variable instead of instance
2021-02-09 13:58:15 -08:00
Ogi Moore
44454358f6
Merge pull request #1561 from pijyoi/no_deletelater
remove app.deleteLater() from tests
2021-02-09 08:27:00 -08:00
Ogi Moore
ca1ce7aa90
Merge pull request #1563 from RubendeBruin/fix_flowchart_docs
Flowchart documentation fix
2021-02-09 08:21:22 -08:00
Ruben de Bruin
77db5a868b
Flowchart documentation fix
the widget() method should be used to display the flowchart in a window rather than the ctrlWidget().
2021-02-09 15:20:14 +01:00
KIU Shueng Chuan
c9dcc0c0ed remove app.deleteLater() from tests
Multiple tests are executed by pytest with the same Python process.
The QApplication instance is a global object that will be used by
subsequent tests.

The Qt documentation says that the object will only be deleted while
running in an event loop. In addition, the Qt docs also specifically
say that processEvents() does not process DeferredDelete events.

i.e. calling processEvents() in a loop is not equivalent to calling
QApplication.instance().exec_()
2021-02-09 16:37:19 +08:00
Ogi Moore
ade6a844e7
Merge pull request #1559 from pijyoi/pyqt6_evbug
restrict PyQt6 QEvent.type() monkey patching to 6.0.0
2021-02-08 22:44:50 -08:00
Ogi Moore
2e1514d711
Cache scatter-plot items by hashable properties (#1560)
* Cache scatter-plot items by hashable properties

* use qpainterpath boundingRect+elementCount for key
2021-02-08 10:59:51 -08:00
KIU Shueng Chuan
665988dc4f remove spinbox return key workaround
the code being removed was committed in 2012.
the reason for the workaround no longer exists.

the reason this code is under scrutiny is because while porting to
PyQt6, calling ev.type() triggered a bug in PyQt6 6.0
2021-02-08 22:10:33 +08:00
KIU Shueng Chuan
d5e516ad52 restrict PyQt6 QEvent.type() monkey patching to 6.0.0
The bug that this workaround was for has been fixed in PyQt6 6.0.1.

However our feature test for the bug was faulty and triggers positive
for PyQt6 6.0.1. In other words, we would be needlessly monkey patching
where it wasn't needed.
2021-02-08 08:22:19 +08:00
Ogi Moore
6d3de52773
Merge pull request #1555 from pijyoi/pyqt6_remote_mouse
PyQt6 6.0.1 QEvent.Type needs to be explicitly deserialized
2021-02-06 21:43:06 -08:00
Ogi Moore
d1bcbf8ec0
Merge pull request #1554 from ixjlyons/glscatterplotitem-nodata
Disable paint in GLScatterPlotItem if it has no data
2021-02-06 16:30:24 -08:00
KIU Shueng Chuan
030c49e659 PyQt6 6.0.1 QEvent.Type needs to be explicitly deserialized
in PyQt6 6.0.0, QEvent.Type was automatically pickled / unpickled.

in PyQt6 6.0.1, QEvent.Type is now pickled to be an int, so needs to be
recreated back explicitly (like the other bindings)

this change is backwards compatible with PyQt6 6.0.0
2021-02-07 07:47:50 +08:00
Ogi Moore
4274e33486
Merge pull request #1553 from pijyoi/pyqt6_qimage_api_change 2021-02-06 15:36:04 -08:00
Kenneth Lyons
a1064345d3 Disable paint in GLScatterPlotItem if it has no data 2021-02-06 15:31:54 -08:00
KIU Shueng Chuan
54d7c591b5 PyQt6 6.0.1 changes QImage constructor api 2021-02-07 07:14:24 +08:00
Ogi Moore
feaa8fe5fb
Merge pull request #1547 from pijyoi/cleanup_ci
remove ProgressDialog from CI test
2021-02-06 12:05:03 -08:00
Nils Nemitz
194941dfb2
change imports in cupy module to be local (#1548) 2021-02-06 09:21:24 -08:00
Kenneth Lyons
f1cfdc302d
Merge pull request #1549 from ixjlyons/pr1437-rmprint
Remove leftover print calls from PR 1437
2021-02-06 08:07:53 -08:00
Kenneth Lyons
8332f2cda0 Remove leftover print calls from PR 1437 2021-02-06 08:04:11 -08:00
KIU Shueng Chuan
310afebe56 fix svg.setResolution(int) deprecation warning
triggered only for PyQt binding, Python 3.8, 3.9

there is a mismatch in API:
- QScreen.logicalDotsPerInchX() -> float
- QSvgGenerator.setResolution(int)
2021-02-06 17:43:12 +08:00
KIU Shueng Chuan
321b5e627a remove ProgressDialog from CI testing 2021-02-06 17:08:32 +08:00
KIU Shueng Chuan
c85c62deda getargspec -> getfullargspec
former is deprecated since Python 3.0
2021-02-06 17:08:32 +08:00
Drew
e7ceebd867
LegendItem: fix docs & minor bugs (#1437)
* LegendItem: fix spelling mistake

* LegendItem: remove unused curRow variable

* LegendItem: correct calculation of rowCount

Previously, rowCount would never be updated unless setColumnCount()
was called. This fixes that issue.
It also fixes that setColumnCount() rounded down (floored) the
number of rows, instead of providing an accurate number:
e.g. 4 items in 3 columns would yield rowCount=1, when it should be 2

* LegendItem: remove rowCount argument (not implemented)

Logic to actually use the rowCount argument was not implemented.
Users might expect rowCount to limit the number of rows to e.g. 1,
but that is not what the current code does (it only works with limiting
the number of columns).
Thus, we were exposing an unused/misleading parameter to users.

This can and should be reverted if the logic for limiting the number
of rows is added.

* LegendItem: add colCount docs

* test (LegendItem): remove unused curRow variable

* test (LegendItem): check increasing rowCount as add items

* Fixed logic in placement of items in legend with multiple columns

* Actual row count here should be 2, not 3

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2021-02-05 23:00:34 -08:00
Dennis Göries
bac2ff5b4b
GraphIcons: Extend and deprecate previous pixmaps (#1534)
* GraphPixmaps: deprecate pixmaps

* Deprecation print

* More doc strings and deprecation warning
2021-02-05 21:09:59 -08:00
Ogi Moore
c2daa00714
Merge pull request #1546 from ixjlyons/imageview-init-keyevents
Guard against key events when there's no time axis in ImageView
2021-02-05 20:57:45 -08:00
Kenneth Lyons
f1999d9a2c Guard against key events when there's no time axis in ImageView 2021-02-05 20:23:15 -08:00
pijyoi
cd914495ec
get test_ref_cycles to pass (#1539)
* get test_ref_cycles to pass

let objects die without gc.collect()
if you don't have cyclic references, there should be no need to call
gc.collect()

the usage of gc.collect() was causing pytest running with coverage to
crash on Python 3.7 / PySide2 5.12 / {Linux, Windows}.

* remove imports used only by the removed code
2021-02-04 20:18:53 -08:00
Ogi Moore
f336ac2d91
Merge pull request #1541 from pijyoi/remove_qt4_qtest_shim
use qWaitForWindowExposed instead of qWaitForWindowShown
2021-02-04 16:15:39 -08:00
KIU Shueng Chuan
62ded33222 remove qtest shim for Qt5 too
not considered public API of pyqtgraph
2021-02-05 07:30:33 +08:00
Ogi Moore
601e19745b
Merge pull request #1542 from bilderbuchi/patch-1
Fix typo
2021-02-03 23:15:57 -08:00
Christoph Buchner
6974b25a5f
Fix typo 2021-02-04 08:07:01 +01:00
Ogi Moore
6123e16f54
Merge pull request #1540 from ixjlyons/siprefix-without-suffix
Support siPrefix with no suffix in SpinBox
2021-02-03 22:16:26 -08:00
KIU Shueng Chuan
711dcd4d5a use qWaitForWindowExposed instead of qWaitForWindowShown
qWaitForWindowShown has been obsolete since Qt 5.6
2021-02-04 11:35:19 +08:00
Kenneth Lyons
15bdd89293 Add a few minor notes to docs on suffix/siPrefix 2021-02-03 17:27:41 -08:00
Kenneth Lyons
0e90e70e2a Update SpinBox tests for siPrefix without suffix 2021-02-03 17:18:13 -08:00
Kenneth Lyons
498f2e512b Add siParse to API docs 2021-02-03 17:14:06 -08:00
Kenneth Lyons
cd10719837 Support siPrefix with no suffix in SpinBox 2021-02-03 17:14:06 -08:00
Kenneth Lyons
66c77118dc
Support suffix for int parameters (#1528)
* Support suffix for int parameters

* Fix spinbox test for new int formatting

* Tune up SpinBox tests a bit
2021-02-03 12:30:05 -08:00
Ogi Moore
7abf7d36d0
Merge pull request #1462 from Ryytikki/patch-1
Added option to use "None" for adj in setData
2021-01-31 23:03:44 -08:00
Ogi Moore
89d20119fe Update docstring and error message 2021-01-31 22:36:59 -08:00
Ogi Moore
983a3769e7 Check for None first 2021-01-31 22:32:56 -08:00
Ogi Moore
f5a823bf38
Merge pull request #1533 from pijyoi/kill_qt4_shim
Remove scale rotate translate Qt4 shims
2021-01-31 22:12:11 -08:00
Ogi Moore
9da7b8f7c1
Merge pull request #1469 from lidstrom83/ptree
Various improvements to parametertree
2021-01-31 22:11:33 -08:00
Ogi Moore
e02fc10a40 handle text flags like axisitem 2021-01-31 21:52:51 -08:00
Ogi Moore
d70a009c29 Address more PyQt6 enum type shenanigans 2021-01-31 21:17:44 -08:00
Ogi Moore
0495f1dcce Replace deprecated method with suggested one 2021-01-31 20:39:07 -08:00
KIU Shueng Chuan
ac4eaa6860 remove redundant shims 2021-02-01 09:12:42 +08:00
KIU Shueng Chuan
185f9c7dad remove scale, rotate and translate shims 2021-02-01 09:06:23 +08:00
Ogi Moore
7b3fdda1e4 Merge branch 'master' into ptree 2021-01-31 13:36:53 -08:00