Commit Graph

2991 Commits

Author SHA1 Message Date
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
d54da71138 Add docs page 2021-09-07 20:28:57 -07:00
Ogi Moore
13ab4de209 Add really basic GLGraphItem example 2021-09-07 20:28:57 -07:00
Ogi Moore
c3dba791d1 Make equivalent to #807 2021-09-07 20:28:57 -07:00
Ogi Moore
98d7bcf560
Merge pull request #1969 from pijyoi/fix_clip_nop 2021-08-17 07:29:10 -07:00
KIU Shueng Chuan
6f1ea29fe4 bugfix: result of clip_array() not assigned 2021-08-17 22:14:13 +08:00
Ogi Moore
175f84ecbc
Merge pull request #1968 from pijyoi/imageview_scale 2021-08-14 07:37:51 -07:00
KIU Shueng Chuan
11b4a1bb47 fix: ImageView calling deprecated QGraphicsItem.scale() 2021-08-14 14:05:18 +08:00
Ogi Moore
e752336b55
Merge pull request #1965 from pijyoi/qpath_chunks
perform arrayToQPath in chunks
2021-08-13 10:37:14 -07: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
fa826bd4cb add benchmarks/arrayToQPath.py 2021-08-10 11:57:19 +08:00
Ogi Moore
0d8eba36a6
Merge pull request #1957 from j9ac9k/bump-numpy-per-nep29
Bump minimum numpy up per NEP-29 schedule
2021-08-07 10:13:49 -07:00
Ogi Moore
690a416d5d Bump minimum numpy up per NEP-29 schedule 2021-08-07 09:37:19 -07:00
Ogi Moore
a537bc2b23
Merge pull request #1956 from pijyoi/zerocopy_qba
arrayToQPath: use QByteArray as backing store
2021-08-06 22:22:09 -07: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
Ogi Moore
239e15a6f8
Merge pull request #1944 from pijyoi/getset_color_nih
use more of QColor functions / methods
2021-08-03 22:53:53 -07: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
Ogi Moore
b0bcec1ff2
Merge pull request #1941 from ntjess/more-rm-py2_3
Remove unnecessary casting of `toPlainText` to str
2021-08-02 09:01:22 -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
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
Ogi Moore
1ddbfc8321
Merge pull request #1940 from pijyoi/fix_logmode
fix log mode by reverting to previous formulation
2021-07-31 20:50:36 -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
Ogi Moore
2d90e54441
Merge pull request #1936 from pijyoi/empty_qpolygonf
Handle empty QPolygonF
2021-07-31 07:30:20 -07:00
KIU Shueng Chuan
04673ac98b rename: qimage_to_ndarray -> ndarray_from_qimage 2021-07-31 21:10:34 +08:00
KIU Shueng Chuan
f64290be9e test that binding provides a write-thru QImage 2021-07-31 21:00:54 +08:00
KIU Shueng Chuan
9355ecf469 support padded QImage 2021-07-31 20:58:51 +08:00
KIU Shueng Chuan
75654b8495 handle zero-sized QPolygonF
depending on the implementation, a zero-sized QPolygonF may not
have any underlying buffer allocated and may return a null pointer when
queried for its "data()"

this null pointer is returned to Python as a "None" which breaks code
not expecting it.
2021-07-31 17:25:03 +08:00
KIU Shueng Chuan
9913f7c1e7 import shiboken{2,6} as shiboken 2021-07-31 15:58:56 +08:00