Commit Graph

100 Commits

Author SHA1 Message Date
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
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
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
e02fc10a40 handle text flags like axisitem 2021-01-31 21:52:51 -08:00
Ogi Moore
0495f1dcce Replace deprecated method with suggested one 2021-01-31 20:39:07 -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
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
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
607db15949 call super() on virtual QWidget methods 2021-01-23 08:29:44 +08:00
KIU Shueng Chuan
119c5fa3d0 convert QTreeWidget.setFirstItemColumnSpanned
convert QTreeWidget.setFirstItemColumnSpanned(item, True) to
item.setFirstColumnSpanned(True)

the former is deprecated since Qt 5.15.2 and removed in Qt 6.
2021-01-15 08:25:05 +08:00
Daniel Lidstrom
daafb1d801 Revert previous commit 2020-12-23 00:05:36 -08:00
Daniel Lidstrom
c2f0de0471 Attempt at passing Qt 4 CI pipelines 2020-12-21 23:15:57 -08:00
Daniel Lidstrom
6a8f7779dc Add tool tip support to action and group parameters 2020-12-21 23:09:19 -08:00
Daniel Lidstrom
2260030845 Focus change bug fix 2020-12-21 22:34:12 -08:00
Daniel Lidstrom
acca19a1b3 Clearing selection on wheelEvent is buggy, so don't 2020-12-21 22:22:12 -08:00
Daniel Lidstrom
b164e54e15 Get parameter's item in a nicer way 2020-12-21 20:48:15 -08:00
Daniel Lidstrom
4618c705e2 Fixed bug where enabled opt is not respected 2020-12-21 20:40:34 -08:00
Daniel Lidstrom
4e8a609375 Fixed bugs with setting expanded and setExpanded 2020-12-21 17:34:43 -08:00
Daniel Lidstrom
fab7b20094 ColorButton sizeHint override unnecessary 2020-12-21 17:18:34 -08:00
Daniel Lidstrom
944b75ffcd Don't miss any widgets when updating readonly 2020-12-21 17:11:22 -08:00
Daniel Lidstrom
4561b18377 Consistently emit values with Parameter.sigValueChanging 2020-12-21 12:30:08 -08:00
Daniel Lidstrom
d737d80c52 Improved data race test 2020-12-20 23:08:38 -08:00
Daniel Lidstrom
bea0fc1135 No interaction with WidgetParameterItem.subItem 2020-12-20 22:41:47 -08:00
Daniel Lidstrom
8519efdd8d Changed my mind 2020-12-20 19:12:11 -08:00
Daniel Lidstrom
0703e3db9b Ensure synchronization of parameter and widget's values 2020-12-20 18:43:11 -08:00
Daniel Lidstrom
6313bb8ae3 Avoid deprecation warnings 2020-12-17 19:00:22 -08:00
Daniel Lidstrom
d9c6a2764a Removed pointless subclass method 2020-12-17 18:09:51 -08:00
Daniel Lidstrom
ba304faa05 Provide size hints for nicer looking trees that don't need to be manually sized 2020-12-17 17:45:04 -08:00
Daniel Lidstrom
db43c9447c Allow default button for text and colormap parameters 2020-12-17 09:53:39 -08:00
Daniel Lidstrom
edf42114f8 Show colormap as sub item 2020-12-17 01:08:46 -08:00
Daniel Lidstrom
02079aec8a Handle text with WidgetParameterItem and SimpleParameter 2020-12-17 01:07:49 -08:00
Luke Campagnola
7d2fbe7596
Fix name/title handling (#1356)
- Parameters now respond to title change in setOpts
- Add Parameter.title()
- Action parameter uses default name/title handling in addition to setting button text (fixes #1320)
2020-10-26 21:56:26 -07:00
lidstrom83
cff19f3271
Hide WidgetParameterItem.defaultBtn if param has no default (#1411)
Co-authored-by: Daniel Lidstrom <dlidstrom@russelltech.com>
2020-10-22 08:28:03 -07:00
Luke Campagnola
605b0b2144 code cleanup 2020-07-13 13:45:31 -07:00
Luke Campagnola
78702eea8b code cleanup 2020-07-13 13:06:27 -07:00
Luke Campagnola
eb4dd5626f SimpleParameter.setValue: coerce value for int parameters 2020-07-13 13:05:56 -07:00
Kenneth Lyons
96d1ef986f
Merge pull request #330 from lidstrom83/Parameter.defaultBtn_autoDefault
Set parameter's default button autoDefault value to False
2020-06-27 15:12:03 -07:00
Kenneth Lyons
b41c4a71e5
Fix Parameter.hasDefault (#1275)
When a default value is not set, hasDefault returns False. If
default=None is passed, hasDefault still returns False.
2020-06-24 21:35:05 -07:00
2xB
78929adbea ParameterItem: self.param.opts -> opts
Using `opts` as alias for `self.param.opts`, following the style of `updateFlags`.
2020-06-06 16:04:05 +02:00
2xB
d86bb65520 ParameterTree: Fix custom context menu
This issue was introduced in merging develop into #1175.
While refactoring for the merge, the change in namespace was not
correctly attributed, leading to the parameter `opts` to be assumed
in local namespace when it isn't.
2020-06-06 15:52:55 +02:00
2xB
7672b5b725
Fix: Parameter tree ignores user-set 'expanded' state (#1175)
* Fix: Parameter tree ignores user-set 'expanded' state

When setting the 'expanded' state of parameters, this change is not applied
in the graphically visible tree. This commit changes that behaviour by
adding a clause in `ParameterItem.optsChanged` to react to that.

Fixes #1130

* ParameterTree: Add option to synchronize "expanded" state

As seen in #1130, there is interest in synchronizing the "expanded" state
of `Parameter`s in `ParameterTree`s. As a default, this would lead to
users being forced to always have multiple `ParameterTree`s to be
expanded in the exact same way. Since that might not be desirable, this
commit adds an option to customize whether synchronization
of the "expanded" state should happen.

* Fix: Sync Parameter options "renamable" and "removable" with ParameterTrees

Currently, `Parameter` options `renamable` and `removable` are only considered
when building a new `ParameterTree`. This commit makes changes in those
options reflected in the corresponding `ParameterItem`s.

* ParameterTree: Reflect changes in Parameter option 'tip'

* Parameter: When setting "syncExpanded", update "expanded" state directly

Co-authored-by: 2xB <2xB@users.noreply.github.com>
2020-05-30 13:01:39 -07:00
Ogi Moore
03b8385e62
Merge pull request #1218 from campagnola/ptree-fix
Fix ParameterTree.clear()
2020-05-30 13:00:10 -07:00
Luke Campagnola
7d979bcf94 Check for missing ptree widget before accessing 2020-05-30 09:30:36 -07:00
Ogi Moore
b83563408c
Merge pull request #1206 from markobausch/develop
Added context menu option to parametertree
2020-05-29 22:55:19 -07:00
Marko Bausch
4052f0dd11 Added context menu option to paramtree 2020-05-22 16:05:52 +02:00
2xB
4f1bf8bb18 GroupParameterItem: Did not pass changed options to ParameterItem
`ParameterItem` handles visibility changes in `optsChanged`.
`GroupParameterItem` overrides this function, but never calls
the super function, leading in visibility changes not being
applied. This PR fixes this by calling said function.

Fixes #788
2020-04-12 02:47:23 +02:00
rwalroth
455fdc2a2a Allowed actions to diplay title instead of name (#1069)
ActionParameterItem changed so that if there is
a title it will be displayed, otherwise displays name.
2019-11-19 20:05:45 -08: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
Thomas A Caswell
da1bf54ec8
MNT: use raw for regular expression 2019-02-14 16:41:54 -05:00