Commit Graph

96 Commits

Author SHA1 Message Date
Tim Gates a2078f8a87
docs: Fix a few typos
There are small typos in:
- doc/source/how_to_use.rst
- doc/source/region_of_interest.rst
- examples/ViewBox.py
- pyqtgraph/flowchart/Node.py
- pyqtgraph/graphicsItems/AxisItem.py
- pyqtgraph/graphicsItems/PColorMeshItem.py
- pyqtgraph/graphicsItems/PlotDataItem.py
- pyqtgraph/graphicsItems/TargetItem.py
- pyqtgraph/graphicsItems/ViewBox/ViewBox.py
- pyqtgraph/widgets/RawImageWidget.py

Fixes:
- Should read `mapped` rather than `maped`.
- Should read `vector` rather than `vetctor`.
- Should read `value` rather than `vaule`.
- Should read `preferable` rather than `preferrable`.
- Should read `output` rather than `ouptut`.
- Should read `information` rather than `inforation`.
- Should read `information` rather than `infomation`.
- Should read `exempt` rather than `excempt`.
- Should read `emphasizing` rather than `emphacizing`.
- Should read `construction` rather than `constrution`.
2021-08-05 06:47:08 +10:00
Ogi Moore fb2e684f45
Merge pull request #1943 from ntjess/rm-py2-codepaths
Remove python 2 code paths
2021-08-02 10:19:29 -07:00
Ogi Moore d0961cc320
Merge pull request #1942 from ntjess/add-newlines
Adds EOF newline to files missing it
2021-08-02 09:09:27 -07:00
njessurun c0eb3267d2 Remove python 2 code paths 2021-08-02 12:07:25 -04: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
Nathan Jessurun 84b491fb9b toPlainText also returns str
Note: intentionally leaves out instance in parametertypes.py to avoid merge conflict with #1919
2021-08-02 11:23:04 -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 cc081af528 New Template Files for PyQt6 6.1
Update PySide6 templates to Qt 6.1
2021-06-08 21:23:49 -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 38dccf8642 Fix indentation bug with flowchart 2021-04-25 20:10:54 -07: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
Ogi Moore ff71b6be6b Add actual deprecation warnings 2021-02-11 21:34:02 -08:00
KIU Shueng Chuan 185f9c7dad remove scale, rotate and translate shims 2021-02-01 09:06:23 +08:00
KIU Shueng Chuan 7192df7032 remove setMargin and setResizeMode shims 2021-01-31 22:21:32 +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
KIU Shueng Chuan 5186cbd80b remove Qt4 generated template files 2021-01-23 12:12:20 +08:00
KIU Shueng Chuan eec411a3c6 fixup Flowchart for PyQt6 2021-01-23 08:31:00 +08:00
KIU Shueng Chuan ab41c03358 generate _pyqt6.py files
VideoTemplate_pyside6.py : regenerate for cuda feature
2021-01-23 08:29:39 +08:00
KIU Shueng Chuan 966ae7a3df import template files using importlib
this lets us support the various bindings w/o having to add binding
specific code.

it breaks PyQt4 support since PyQt4 template files are suffixed as
"_pyqt" rather than "_pyqt4"
2021-01-15 08:25:08 +08:00
KIU Shueng Chuan 3584736155 generate template files for pyside6 2021-01-15 08:25:07 +08:00
KIU Shueng Chuan 92016d3d5a add imports of _pyside6 files 2021-01-15 08:25:06 +08:00
KIU Shueng Chuan b0f7dda102 QFont.setWeight(75) is redundant
QFont.setBold(True) calls QFont.setWeight(QFont.Weight.Bold)

in Qt 5, QFont.Weight.Bold == 75
in Qt 6, QFont.Weight.Bold == 700

in PySide6, QFont.setWeight() no longer accepts an integer value.
2021-01-15 08:25:05 +08:00
Ogi Moore 539394e20c
Merge pull request #1362 from bruchar1/make-terminal-sortable
DataTreeWidget exception with multivalue Terminal (flowchart)
2020-10-12 21:46:28 -07:00
Charles Brunet b2ceb8d053 Fix disconnect() in Flowchart with wrong receiver slot 2020-09-14 13:42:16 -04:00
Charles Brunet a8417b6478 fix exception in DataTreeWidget when clicking on a node with multivalue Terminal connected 2020-09-10 08:59:17 -04:00
Ogi Moore 55e89bccef
Merge pull request #117 from onlyjus/feature-resizeFlowchartNode
Feature: Flow chart nodes resize based on inputs/outputs
2020-06-22 22:49:15 -07:00
Adam Strzelecki 983cc1695e
Patch/window handling (#468)
* Do not wrap PlotView/ImageView

There is no need to wrap PlotView/ImageView into QMainWindow, since
only purpose of the QMainWindow is some default menu toolbar & menu
handling, that is not used by PyQtGraph anyway.

Moreover, every parent-less Qt widget can become window, so this
change just use PlotView/ImageView as windows, removing extra
complexity, eg. method forwarding, self.win property.

Another benefit of this change, it that these windows get initial
dimensions and titles as they were designed in .ui file.

* Properly cleanup on ImageView.close()

We should not close explicitly child widgets or clear scene, otherwise
Qt will deallocate children views, and cause "wrapped C/C++ object of
type ImageItem has been deleted" error next time we call close()
and/or some other methods.

All children, including self.ui.roiPlot, self.ui.graphicsView will be
closed together with its parent, so there is no need to close them
explicitly.

So the purpose of close it to reclaim the memory, but not to make the existing ImageView object dysfunctional.

* Remove references to plot & image windows after close

PyQtGraph images and plots module list variables are currently holding
references to all plots and image windows returned directly from main
module. This does not seem to be documented however, and causes the Qt
windows to be not released from memory, even if user releases all own
references.

This change removes the references from images/plots list once window
is closed, so when there is no other reference, window and all related
memory is reclaimed.

* Change all UI forms title from Form to PyQtGraph

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-06-01 11:23:18 -07:00
patricev 3f6424cc57
Update Data.py (#1071)
* Update Data.py

Python eval not working with python 3 - bug fix with the exec() part
2020-05-29 23:38:03 -07:00
christuart ddb597a3dd
Fix selection of FlowchartWidget input/output nodes from issue #808 (#809)
Co-authored-by: Chris Stuart <chris.stuart@ukaea.uk>
2020-05-29 23:35:58 -07:00
Kenneth Lyons db67a256a9
Miscellaneous doc fixups (#1142)
* Miscellaneous doc cleanup

* Moved dockarea up a level (like flowchart, parametertree). Removed extraneous parametertree doc
2020-04-03 10:06:25 -07:00
wuyuanyi135 cb4d9b23b2 fix flowchart context menu redundant menu (#1060) 2019-11-02 21:36:58 -07:00
2xB a4cecf4a22 Call parent __init__ as soon as possible for CtrlNode 2019-06-30 17:50:11 +02: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
Kenneth Lyons ffd1624cb9 Use defaultSuffix for smarter file extension handling. 2019-05-23 19:02:56 -07:00
Kenneth Lyons fd134f77c6 Only append .fc file extension if not added in the file dialog. 2019-05-23 17:53:42 -07:00
Kenneth Lyons 5c3214105c Merge remote-tracking branch 'duguxy/py3-flowchart-sl' into py3-flowchart 2019-05-23 17:49:21 -07:00
Luke Campagnola 0af4706024
Merge pull request #635 from campagnola/pyside2
WIP: PySide2 support
2018-05-24 17:14:11 -07:00
Luke Campagnola 8da208b914 flip pyside2 template line endings 2018-05-17 09:02:41 -07:00
Luke Campagnola 1f380c93c1 fix itervalues 2018-05-15 16:37:58 -07:00
Luke Campagnola 82afad8366 Fix up Qt.py and deprecate USE_XX variables 2018-02-16 20:42:34 -08:00
Luke Campagnola 46f10f24f8 Merge branch 'develop' of https://github.com/maxpeng/pyqtgraph into maxpeng-develop 2018-02-15 18:30:12 -08:00
Luke Campagnola 698f37bd10 code cleanup 2017-09-15 09:00:59 -07:00
Luke Campagnola fedecc5808 minor fixes 2017-09-15 09:00:50 -07:00
Luke Campagnola d65026f73d add floor division node 2017-09-15 08:59:31 -07:00
Luke Campagnola 237b848837 Allow binary operator nodes to select output type 2017-09-15 08:59:15 -07:00
Luke Campagnola 19fc846b90 gaussian node uses internal gaussianFilter function 2017-09-15 08:58:29 -07:00
Luke Campagnola 2016dc0df1 fix nodes spinbox handling 2017-09-15 08:56:45 -07:00
Luke Campagnola 868d9ebf29 Add several new data nodes 2017-09-15 08:55:17 -07:00
Luke Campagnola d081e54956 EvalNode: add method to set code 2017-09-15 08:54:50 -07:00