Commit Graph

21 Commits

Author SHA1 Message Date
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
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
Martin Chase 1d40d50b89
push bullet lists over 2 spaces to get them to show up as such in the… (#1912)
* push bullet lists over 2 spaces to get them to show up as such in the docs

* separate the literal block from the bullet list
2021-07-21 07:12:35 -07:00
Ogi Moore 195a1a6fa3 Remove Qt 6.0 support
Simplify some PyQt6 code branches
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 e02fc10a40 handle text flags like axisitem 2021-01-31 21:52:51 -08:00
Ogi Moore 7b3fdda1e4 Merge branch 'master' into ptree 2021-01-31 13:36:53 -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
Daniel Lidstrom 4e8a609375 Fixed bugs with setting expanded and setExpanded 2020-12-21 17:34:43 -08:00
Daniel Lidstrom 6313bb8ae3 Avoid deprecation warnings 2020-12-17 19:00:22 -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
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
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
Marko Bausch 4052f0dd11 Added context menu option to paramtree 2020-05-22 16:05:52 +02:00
Luke Campagnola 753ac9b4c4 Squashed commit of the following:
commit ca3fbe2ff9
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Thu Aug 7 08:41:30 2014 -0400

    Merged numerous updates from acq4:
    * Added HDF5 exporter
    * CSV exporter gets (x,y,y,y) export mode
    * Updates to SVG, Matplotlib exporter
    * Console can filter exceptions by string
    * Added tick context menu to GradientEditorItem
    * Added export feature to imageview
    * Parameter trees:
        - Option to save only user-editable values
        - Option to set visible title of parameters separately from name
        - Added experimental ParameterSystem for handling large systems of
            interdependent parameters
        - Auto-select editable portion of spinbox when editing
    * Added Vector.__abs__
    * Added replacement garbage collector for avoiding crashes on multithreaded Qt
    * Fixed "illegal instruction" caused by closing file handle 7 on OSX
    * configfile now reloads QtCore objects, Point, ColorMap, numpy arrays
    * Avoid triggering recursion issues in exception handler
    * Various bugfies and performance enhancements
2014-08-07 09:03:26 -04:00
Luke Campagnola a2e8290d8e console, graphicsscene, and 2nd-level graphicsitems 2013-12-23 07:51:33 -05:00
Luke Campagnola 09b16baed1 python3 fixes
imageview fix
2013-05-13 08:51:59 -04:00
Luke Campagnola af59296231 Reorganized directory structure to be more standard
Started new SVG exporter
Merged updates from ACQ4
2012-12-25 00:43:31 -05:00