Commit Graph

2024 Commits

Author SHA1 Message Date
Kyle Sunden 6fa4a0a3eb
Merge pull request #2012 from j9ac9k/prep-0.12.3-release
Prep for 0.12.3 Release
2021-10-10 22:01:10 -05:00
Ogi Moore 936108ec60 Import Dock class not module 2021-10-09 15:06:51 -07:00
Ogi Moore 9b67e51230 Switch to relative imports for some parameterTypes 2021-10-09 15:06:51 -07:00
Ogi Moore db74522003 Have parameter types imports use non __init__
When using isort, the order of parametertree/__init__.py imports broke many
of the parameter-types imports.  This commit modifies the import statement to
not use the imports from __init__.py but import the respective classes from the
the non-__init__ modules
2021-10-09 15:06:51 -07:00
Kyle Sunden 34c6981b0f Update version number in __init__ 2021-10-09 00:37:49 -05:00
KIU Shueng Chuan 2da769d6a5 unhide ImageView roi curves 2021-10-08 22:01:41 +08:00
Martin Chase a6bb2c6edd
Allow ThreadTrace to save to a file (#1998)
* allow ThreadTrace to save to a file

* make sure we close our output file

* fix the egregious errors in the file
 - no mutable default args
 - import things before using them
 - variable named obj did not exist, but try/except ignored it

* if it's dumb, and it works, it's not dumb

* linux requires a flush; remove commented code

* always close the file handle, even if its stdout

* it may work for us, but just in case, protect with finally

* turns out: lots of things like to use stdout!

Co-authored-by: Luke Campagnola <lukec@alleninstitute.org>
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2021-10-07 12:25:38 -07:00
Nils Nemitz 0cc3580687
Traditional log10 mode for PlotDataItem (by adding "mapped data" stage) (#1992)
* make PlotDataItem aware of mapped data

* inf suppression, metadata storage and refactor of data structures

* cleanup, test, and documentation pass

* re-added prepareForPaint, added PlotDataset to sphinx index

* strip more print statements

* indicate (internal) PlotDataset documentation as orphaned to avoid sphinx error

* Do not export PlotDataset

* replacement example

* example comments
2021-10-06 22:40:38 -07:00
Ogi Moore bc542ae1c4
Merge pull request #2003 from j9ac9k/fix-py310-drawText-call
Fix Python 3.10 GLGradientLegendItem call to QPainter.drawText
2021-10-06 06:35:12 -07:00
Ogi Moore 5917e5e666 QPainter.drawText needs QPointF not x, y 2021-10-05 20:47:15 -07:00
ntjess 8d3e6cbd22
Better parameter tree testing (#1953)
* Allows values to be numpy arrays

* Bugfix: Slider now works when limits didn't change during `optsChanged`

* Improved testing + layout of param tree example

* Also fix numpy-like values in list `setValue`

* use proper hex formatting for  value

* Fix code warnings

* Avoids use of configfile in parametertree

* Avoid shadowing variable names

* Add explanatory comment to `makeAllParamTypes`

* Allow string options to be 'unset' in file, etc. parameters example

* Bugfix: unintunitive option unsetting for file window title

* don't use lambda in signal connect

* Remove unused import
2021-09-23 21:06:00 -07:00
Dane Owens 1132c138a4 Change hardcoded padding into initialization parameter 2021-09-17 09:51:26 -04:00
Jan Kotanski 4334cd14de fix for autoLevel of RGB histograms 2021-09-08 09:20:12 +02:00
Ogi Moore 126b7e0925
Merge pull request #1985 from pijyoi/workaround_float_lut
delegate float luts to makeARGB()
2021-09-07 21:48:15 -07:00
magnium 6f4b6b1b88
Fix ImageView levelMode (#1974)
* fixes #1769

* Automatically set image to ImageView if imageItem is provided.
Added a test for correct initialization of ImageView with imageItem and levelMode.
2021-09-07 21:27:26 -07:00
ntjess babd037cf7
Adds checklist parameter (#1952)
* Alphabetize parameter registration

* Implements a checklist parameter

* Several checklist updates
- Correct indentation
- Allow dict-like setting + non-string values
- Fix several bugs associated with 'exclusive' behavior

* Add 'checklist' to param tree example

* Add documentation

* Removes unneeded code

* Forgot to rebuilt RST doc

* `exclusive` checklist uses radio buttons

* better checklist change logic

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2021-09-07 21:25:17 -07:00
Petras Jokubauskas 745b04baa5
Fix: updateDecimate should not unhide intentionaly hidden curves (#1973)
* Update PlotItem.py

make update decimate to not unhide curves when items added/removed,
while preserving the Max Traces well behaviour

* Update PlotItem.py

fix typo

* Update PlotItem.py

fix: typo with self as argument

* give better name for the function which handles MaxTraces checkstate change

rename it to _handle_max_traces_toggle

* add doc string to updateDecimation

* add test for PlotItem for external curve visibility control

check if hidden curve would stay hidden when adding or removing other items.

* remove additional empty line between methods
2021-09-07 21:19:22 -07:00
Ogi Moore 2a66460afc
Merge pull request #1954 from ntjess/deprecate-values-opt
Deprecate `values` opt for list parameter
2021-09-07 20:57:27 -07:00
Ogi Moore 446a2c324c
Merge pull request #1721 from j9ac9k/test-pr807
Implement a GLGraphItem according to #807
2021-09-07 20:47:19 -07:00
Ogi Moore c3dba791d1 Make equivalent to #807 2021-09-07 20:28:57 -07:00
KIU Shueng Chuan b5475cad6b warn about usage of non-uint8 LUTs 2021-09-08 09:52:46 +08:00
KIU Shueng Chuan 6763b14fb9 delegate float luts to makeARGB() 2021-09-07 00:04:42 +08:00
KIU Shueng Chuan 6f1ea29fe4 bugfix: result of clip_array() not assigned 2021-08-17 22:14:13 +08:00
KIU Shueng Chuan 11b4a1bb47 fix: ImageView calling deprecated QGraphicsItem.scale() 2021-08-14 14:05:18 +08:00
KIU Shueng Chuan 0cd926ff8e merge finiteCheck branches 2021-08-14 00:00:59 +08:00
KIU Shueng Chuan e541c9ba1e hoist duplicate code 2021-08-13 18:53:58 +08:00
KIU Shueng Chuan 44e32f00c7 _fill_nonfinite() -> _compute_backfill_indices()
this allows us to defer the backfilling
2021-08-11 21:55:54 +08:00
KIU Shueng Chuan 679c1002c1 break up arrayToQPath
this restructuring removes inter-dependencies between the various modes.
this makes it easier to reason about and modify the various codepaths.
2021-08-11 06:55:21 +08:00
KIU Shueng Chuan 7e31a5e4ee setup codepath for connect=='all' and all-finite
"all-finite" includes the case where user requests to skip finiteCheck.
2021-08-10 11:57:19 +08:00
KIU Shueng Chuan 287ec9fbea arrayToQPath: use QByteArray as backing store
this avoids:
1) allocation and zero-ing of bytearray
2) copy of bytearray to QByteArray
2021-08-07 08:56:11 +08:00
Nathan Jessurun 503507ba50 Don't specify a version for deprecation 2021-08-06 08:04:51 -04:00
Nathan Jessurun 3d15ca1038 Catch remaining 'values' usages 2021-08-06 08:04:51 -04:00
Nathan Jessurun 6f44d27f2d Deprecate `values` opt for list parameter 2021-08-05 15:48:09 -04:00
Ogi Moore f16125c378
Merge pull request #1951 from timgates42/bugfix_typos
docs: Fix a few typos
2021-08-04 22:01:50 -07:00
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
KIU Shueng Chuan 178e693a4d add SVG named color support 2021-08-04 09:19:46 +08:00
KIU Shueng Chuan 371facb17f SVGExporter.py : fix background color
1) blue and green were swapped
2) %f used for integer rgb components
3) %d used for float opacity component
2021-08-04 09:19:46 +08:00
KIU Shueng Chuan 482b92d700 GLGradientLegendItem: remove opengl code
change fontColor to take a mkColor() argument

use hyperlink when referring to other functions
2021-08-04 09:19:46 +08:00
KIU Shueng Chuan efa662415e use QColor methods and functions 2021-08-04 09:19:34 +08:00
ntjess 4bf1866c2a
Organize paramtypes (#1919)
* Registered parameter types go in their own files

* Moves [int, float] item definitions outside `WidgetParameterItem`

* Moves [int, float] parameter definitions outside `WidgetParameterItem`

* Allow registering ParameterItems for easy parameter defs

* Finalizes moving simple parameters to their own files

* removes accidentally committed file

* Provides class qualnames in rst

* Address docstring build issues

* Address recent review comments
- `registerParameterItemType`:
  * added to docs and parametertree.__init__
  * Remove unsed PARAM_TYPES global
  * Hyperlink to `registerParameterType`
- parameter tree rst:
  * Alphabetize entries
  * Rebuild RST without fully qualified class name
  * Add note at file header that it is auto generated

* Remove spurious space during rst doc creation

* Ensure created/modified files end with newline

* Address CodeQL warnings

* toPlainText also returns str

* `QTreeWidgetItem.text` returns str
2021-08-02 10:47:55 -07: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
ntjess e18d1fb1f2
arrayToQPath can handle empty paths (#1920)
* Fixes #1888

* Improve test coverage of arrayToQPath

* Use early exit to solve empty path instead of slice manipulation

* address codeql qualms: Unused import, uneven tuple
2021-08-02 10:18:25 -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
KIU Shueng Chuan aebc66dcaa fix log mode by reverting to previous formulation
this formulation is in the documentation for setLogMode()
2021-08-01 11:11:41 +08: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
KIU Shueng Chuan 04673ac98b rename: qimage_to_ndarray -> ndarray_from_qimage 2021-07-31 21:10:34 +08:00