Commit Graph

2662 Commits

Author SHA1 Message Date
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
KIU Shueng Chuan
7192df7032 remove setMargin and setResizeMode shims 2021-01-31 22:21:32 +08:00
KIU Shueng Chuan
97f5459573 regenerate plotConfigTemplate.ui for Qt5
the old ones were using obsoleted method "setMargin"
2021-01-31 22:12:55 +08:00
KIU Shueng Chuan
327581983f delete some more Qt4 generated templates 2021-01-31 22:11:49 +08:00
pijyoi
9d89d10bcf
some optimizations for rescaleData (#1518)
1) use float32 instead of float64 for low precision inputs
2) use in-place operations to avoid unnecessary copies
2021-01-30 14:38:34 -08:00
Ogi Moore
56ee690d58
Merge pull request #1527 from ixjlyons/improve-parameter-docs
Improve parametertree documentation coverage
2021-01-30 11:01:08 -08:00
Kenneth Lyons
c24d25bce3 Improve parametertree documentation
- Increase cross-referencing
- Give all built-in parameter and parameter items at least minimal
  docstring
- Start improving coverage of the special options available for some
  parameters
- Organize the built in parameters reference for easier navigation
2021-01-30 10:06:49 -08:00
pijyoi
ce8c3262f8
switch to use of QOpenGLWidget in GraphicsView.py (#1525)
* switch to use of QOpenGLWidget in GraphicsView.py

experimental plotting in PlotCurveItem gets broken by this. so we allow
Qt5 users to opt back to using QGLWidget with the enableExperimental
option.

* allow Qt6 users to turn on enableExperimental

to more easily allow users to see the broken-ness.

* drop QGLWidget, use only QOpenGLWidget
2021-01-30 08:59:29 -08:00
Ogi Moore
e9eb8d50b6
Merge pull request #1523 from pijyoi/lose_six 2021-01-29 05:11:42 -08:00
KIU Shueng Chuan
6b7afbf75c remove six module 2021-01-29 16:13:27 +08:00
Ogi Moore
961cdac51c
Infiniteline emits clicked signal event (#1522) 2021-01-28 22:02:51 -08:00
Dennis Göries
5bb3800adc
ItemSample: Allow toggle of visibility via mouse click in LegendItem (#1497)
* Legend toggle directly on ItemSample

* Add invisible Eye icon

* Include package data and remove username from svg

* Allow svg and png in the setup.py and cleanup sg
2021-01-28 21:14:41 -08:00
Sérgio Peixoto
3f02b30140
Bugfix/wrong translate implementation (#1520)
* Removes all translate call on the parameter name and moves them into the title instead allowing to decouple visualization from code logic

* Removes all translate calls from the Exporter class property Name and moves the translation logic when setting the QListWidgetItems for the formatList

* Adds missing call to translation function for the export action on GraphicsScene
2021-01-28 08:42:18 -08:00
Ogi Moore
b094945dbc
Merge pull request #1517 from pijyoi/shm_close
fix RemoteSpeedTest shutdown errors
2021-01-27 15:49:04 -08:00
KIU Shueng Chuan
2f4ceee1ce fix RemoteSpeedTest shutdown errors
fix BufferError: cannot close exported pointers exist
for some reason, even though the ctypes object falls out of function
scope, it causes a lingering reference.
in any case, the use of ctypes is no longer necessary.

Don't change temporary files mid-way for Darwin
This fixes the CI issues on Darwin.

close the remote process on app shutdown.
2021-01-28 07:19:54 +08:00
Ogi Moore
b54aa3914d
Attempt i18n localization (#1513)
* Trying translate on exporter strings

* Try translate on other misc context menu strings

* First f-string and I screw it up...

* add more translation calls
2021-01-27 11:34:32 -08:00
Ogi Moore
309195ceea
Fix windows hidpi (#1516)
* set environment variables before starting QApp

* fix-422

* Better support of hidpi

* Fix Typo in App-Name

* Remove fontScaleFactor bits

* Add documenation for hidpi displays

* Fix pg not defined
2021-01-27 10:59:07 -08:00
Ogi Moore
85773e4530
Revert "have mkQApp configure QApplication such that it handles HIDPI displays on Windows (#1509)" (#1515)
This reverts commit 98f6b2f1a5.
2021-01-27 10:42:38 -08:00
Martin
219f79947e maintain non-scaling behavior for parallel sides
make sure aspectLocked still gets checked
add example
2021-01-27 10:39:08 -08:00
Ogi Moore
98f6b2f1a5
have mkQApp configure QApplication such that it handles HIDPI displays on Windows (#1509)
* set environment variables before starting QApp

* fix-422

* Better support of hidpi

* Fix Typo in App-Name

* Remove fontScaleFactor bits

* Add documenation for hidpi displays
2021-01-27 10:05:56 -08:00
Valentin Valls
9456d07ae8 Fix scale-rotate ROI handler to allow to use a random scale axis and not only x/y
The code relative to scaleSnap is maybe broken
2021-01-27 09:52:50 -08:00
pijyoi
1044a7b6c4
Add almost all examples to ExampleApp (#1511)
* fix: delete generated designerExample_*.py files

designerExample.py loads designerExample.ui directly

* remove unused examples/utils.py

* add almost all examples in folder

* use mkQApp and don't set style nor palette

not needed for an example and also avoids a PyQt6 6.0 refcount bug in
app.setStyle()

* bold interesting examples

* test_examples.py needs to know about Namespace too

* Revert "remove unused examples/utils.py"

This reverts commit 2eddead459.

* categorize examples lists in utils.py
2021-01-26 13:45:53 -08:00
Ogi Moore
74bcd3ba87
Merge pull request #1510 from pijyoi/update_exapp 2021-01-23 08:43:25 -08:00
KIU Shueng Chuan
d96ec314be RemoteGraphicsView.py : fix mouse interactions for Qt 5.12
mouse interactions had previously only been tested on Qt 5.15 and
Qt 6.0, and found to be not working on Qt 5.12.
differences in Qt 5.12 and Qt 5.15 are documented in the comments.

an addition bug found (and fixed) was that right-click was drawing
the pop-up menu away from the mouse position.
2021-01-23 19:28:11 +08:00