Commit Graph

52 Commits

Author SHA1 Message Date
Ogi Moore 936108ec60 Import Dock class not module 2021-10-09 15:06:51 -07:00
njessurun ef99d3fbf6 Adds EOF newline to files missing it.
Note: intentionally avoids files moved / already adjusted from #1919
2021-08-02 11:51:28 -04:00
Kyle Sunden a472f8c5de
Remove all usage of python2_3.py (#1939)
* Remove all usage of python2_3.py

Technically these functions were exported at the top level of the library, this removes them without warning... If we want to we can bring them back for there, but I honestly don't think its needed, as we are py3 only now and have been for multiple releases.

This may introduce a number of 'useless cast' or similar but those were always happening anyway

This PR brought to you by sed

* Update varname in hdf example to avoid collision with builtin

* Clean up some leftover comments surrounding imports of compat code

* Unnecessary string casts

* Additional unnecessary casts

* syntax error fix

* more unnecessary casts

* Yet more unnecessary casts
2021-08-01 21:43:32 -07:00
Kyle Sunden 6a59b7e5b5
Many unused import cleanups (#1935)
* Many unused import cleanups

Ignored some star imports, some vendored code in colorama, only looked within pyqtgraph the library, not e.g. examples

* SpinBox decimal imported with both import and from import
2021-07-31 07:35:23 -07:00
Ogi Moore d455da9aec Use Qt6 Enum Namespace
This namespace appears to be valid in PySide2/PyQt5 5.12+ so we may as
well migrate to the newer namespace ourselves.
2021-06-08 21:23:49 -07:00
Ogi Moore a6971c768d Move and Update test-data repo into pyqtgraph repo
To reduce complexity, and make it easier to add more images and tests,
the images in the `test-data` repository should be merged with the main
repository.  Furthermore, we can remove a lot of the subprocess work in
the image_testing.py file, as we no longer need to have it interact with
git.

The images are not the same.  Images were regenerated with Qt6, and now
have proper big and little endian handling thanks to @pijyoi

Second commit is a slightly modified variant of
2e135ab282d6007b34a3854921be54d0e9efb241 authored by @pijyoi
it is to convert qimages to RGBA8888 for testing.  Image
files were regenerated images for the big/little handling

Fixed issue with bogus test from test_NonUniformImage and generated a
new image
2021-05-31 21:05:00 -07:00
KIU Shueng Chuan 70c123a95c fix localPos() deprecated warnings 2021-05-13 08:42:45 +08:00
Ogi Moore 3ea92736b8 Do not use list comprehensions with any or all
python any and all are able to break early the moment they come across a
member of the iterable that meets the condition; but having a list
comprehension nested within breaks that ability to exit early, as the
list comprehension has to finish being constructed first before it can
be evaluated
2021-04-23 22:43:57 -07:00
Ogi Moore d9eb8e1afb
Merge pull request #1575 from pijyoi/reduce_shim
Reduce number of shims for PyQt6
2021-02-19 09:40:06 -08:00
lidstrom83 6519734932
Deprecate unused/unnecessary modules (#1576)
* Deprecate ordereddict module

* Import OrderedDict from collections module instead of pgcollections

* Deprecate pgcollections module

* Deprecate lru_cache module

A simpler recipe exists from the standard library using OrderedDict.

* Deprecate pil_fix module

* Python 3.7 compatibility fix

* Avoid or suppress deprecation warnings in tests
2021-02-15 09:52:06 -08:00
KIU Shueng Chuan 968286a1cf remove drag and drop shims
used only in one place in the codebase
2021-02-14 07:44:00 +08:00
KIU Shueng Chuan 6dbda78231 Container.py : fix RecursionError 2021-01-23 08:29:52 +08:00
KIU Shueng Chuan 13d652c794 convert to QPointF mouse event position
DockDrop.py : use QPointF mouse coords
2021-01-23 08:29:45 +08:00
KIU Shueng Chuan 607db15949 call super() on virtual QWidget methods 2021-01-23 08:29:44 +08:00
Ogi Moore 1b89c47cc2
Add fontSize kwarg (taken from PR #129) (#1410) 2020-10-21 22:18:36 -07:00
lidstrom83 b44dcc135f
Fixed mouse interaction issues with DockLabel (#1408)
Co-authored-by: Daniel Lidstrom <dlidstrom@russelltech.com>
2020-10-21 20:52:44 -07:00
Mitchel Paulin e7b11cb39a
Fixed bug where removeTempArea would be called on home even if it was not defined (#1349)
* Fixed bug where removeTempArea would be called on home even if it was not defined

* Made the check for whether or not home is defined more explicit
2020-10-14 10:07:12 -07:00
Gianfranco Costamagna 32a79f18a4 sip: switch to new PyQt5 api import, with fallback to the old implementation if not found.
Also calls to setapi are not needed anymore, so use them only with the old implementation.

See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=966045
for reference
2020-07-27 14:52:07 +02:00
Kenneth Lyons 0b98140893 Check for container before setting dock orientation 2020-06-20 12:27:29 -07:00
Alberto Fontán Correa 1f9ccccfd0 Fix Dock close event QLabel still running with no parent 2020-05-31 00:26:19 -07:00
lidstrom83 df28c41d4b Make DockArea compatible with Qt Designer (#158) 2019-09-13 23:08:28 -07:00
Billy SU 23b4e174f0 Add Dock test and remove outdated comments (#659)
* Add test for Dock closable arg

* Remove outdated and debug comments

* Add test for hideTitle dock
2019-06-27 21:51:54 -07:00
Matt Liberty c52382c3b9 Moved emits after all method state updates since PySide2 immediately executes signals.
Pull request #907 addressed a specific case where a signal was emitted before a state update.
If an application's slot then calls back into the instance, the instance was in an inconsistent
state.  This commit audits and fixes similar issues throughout the pyqtgraph library.  This
commit fixes several latent issues:

* SignalProxy: flush -> sigDelayed -> signalReceived would have incorrectly resulted in timer.stop().
* ViewBox: resizeEvent -> sigStateChange -> background state
* ViewBox: setRange -> sigStateChange -> autoranging not updated correctly
* ViewBox: updateMatrix -> sigTransformChanged -> any _matrixNeedsUpdate = True -> ignored
* Parameter: Child may have missed state tree messages on insert or received extra on remove
* GraphicsView: updateMatrix -> sigDeviceRangeChanged/sigDeviceTransformChange -> before propagated to locked viewports.
2019-06-01 16:28:23 -04:00
Edward Barnard dc95f76332 When a floating Dock window is closed, the dock is now returned to its original DockArea 2018-03-30 10:29:45 -07:00
Luke Campagnola 30997d999d Fix unit test for python 2.6 2017-09-03 23:18:17 -07:00
Luke Campagnola 3dbbc7e531 Fix unit test following previous commit 2017-09-03 23:05:46 -07:00
Luke Campagnola e8128fa5e2 Make dockarea.restoreState behavior for extrra docks be configurable 2017-09-03 20:14:50 -07:00
Luke Campagnola b6f9516678 Make behavior configurable when a reloaded dock is missing.
+ other bugfixes
2017-09-03 17:00:33 -07: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 ddc7f45b9b Merge branch 'close_signal_upon_dock_close' of https://github.com/lidstrom83/pyqtgraph into lidstrom83-close_signal_upon_dock_close 2015-03-17 23:01:56 -04:00
dlidstrom 431228d0af Removed use of super() in TempAreaWindow 2015-03-17 20:45:21 -06:00
Luke Campagnola 45cf6a32dd Merge branch 'empty_DockArea_save-restore_fix' of https://github.com/lidstrom83/pyqtgraph into lidstrom83-empty_DockArea_save-restore_fix 2015-03-17 22:43:58 -04:00
dlidstrom fe8e7e59db Fixes DockArea save/restore when topContainer is None (i.e. when no docks are present, or when all are in temporary windows). 2015-03-16 10:41:35 -06:00
dlidstrom 138fbb7fd7 Make it possible to change Dock titles. 2015-03-14 23:59:20 -06:00
dlidstrom 76dbdafacc Dock to emit closed signal when closed. Temporary DockArea windows call close method of all docks when they are closed. 2015-03-14 22:55:16 -06:00
Luke Campagnola b700a1ad3d Merge branch 'lidstrom83-DockArea_apoptose_fix' into develop
Also corrected temporary container persisting after calling dockarea.addDock()
2015-03-14 15:49:45 -04:00
Daniel Lidstrom 853256bd41 DockArea apoptose fix.
Fixes problem where docks can't be added to a non-temporary area once all of its docks have been closed.
2014-12-23 16:46:15 -07:00
Luke Campagnola 23cfdf7239 fixed dock insert order bug 2014-05-08 10:37:23 -04:00
Luke Campagnola 51f0a063ee minor cleanups 2014-05-08 09:50:26 -04:00
Luke Campagnola 4c37b75afe Added Dock close button (from Stefan H) 2014-05-07 12:49:30 -04:00
Luke Campagnola 1e0034904e Initialize drag variable in Dock.py 2014-05-05 11:16:00 -04:00
Luke Campagnola c72638ab1b Merge branch 'tommy3001-doc-updates' into develop
Conflicts:
	pyqtgraph/graphicsItems/AxisItem.py
	pyqtgraph/graphicsItems/PlotDataItem.py
	pyqtgraph/graphicsItems/ROI.py
2014-02-28 21:07:43 -05:00
Luke Campagnola 1ecceeaa92 Fixed unicode titles in Dock 2014-02-12 03:02:09 -05:00
tommy3001 92d7bbe18e In list tables "**Arguments**", "Arguments:" changed to **Arguments:** 2014-02-03 21:13:10 +01:00
Luke Campagnola 50df2b2def dockarea, imageview, metaarray 2013-12-23 10:06:26 -05:00
Luke Campagnola e4ca62448b Added Dock.raiseDock() method 2013-12-11 14:28:56 -05:00
Luke Campagnola 7a7288b6b3 Fixed documentation for 'uver/under' in DockArea
Configure matplotlib to use PySide in MatplotlibWidget
2013-05-28 15:31:10 -04:00
Luke Campagnola a55d58024d Added Dock.close()
Fixed bugs in functions weave usage
Documented ROI signals
Fixed 3D view updating after every scene change
2013-05-22 14:09:56 -04:00
Luke Campagnola 21dff0525a merge from inp, removed print statement 2013-02-24 11:37:17 -05:00
Luke Campagnola 8e5133c873 minor fixes from acq4 2013-02-24 11:32:35 -05:00