* feature More parameter item types
Pen: Pops up a dialouge that allows the user to customize a pen. Setting pen value is not working yet.
Progress bar: For indication things.
Slider: Easier way to set values that dont require precision.
Fonts: Picking font types. Next thing could be a Font dialog.
Calendar: For picking dates or intervals
Open/save file/files/directory: Pops up an open/save file/directory dialog to select a file/directory. Filter string and caption can be defined too.
A PenSelectorDialog widget was created for the pen parameter item too.
Also added these parameter items to the example.
* PyQt/Side6 compatibility fixup
* Revisions from intial PR
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
Update pyqtgraph/widgets/PenSelectorDialog.py
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
Update pyqtgraph/widgets/PenSelectorDialogbox.py
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
Update pyqtgraph/widgets/PenSelectorDialogbox.py
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
Update pyqtgraph/widgets/PenSelectorDialogbox.py
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
Update pyqtgraph/parametertree/parameterTypes.py
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
Update pyqtgraph/parametertree/parameterTypes.py
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
Update pyqtgraph/widgets/PenSelectorDialog.py
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
Update pyqtgraph/widgets/PenSelectorDialogbox.py
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
Update pyqtgraph/widgets/PenSelectorDialogbox.py
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
Update pyqtgraph/widgets/PenSelectorDialogbox.py
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
Update pyqtgraph/widgets/PenSelectorDialogbox.py
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
Apply suggestions from code review
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
* Bugfix: module instead of class import on param tree example
* Enrich the slider parameter
* Address pijyoi comments on pen style parameter
* Different file picker for easier porting
* Better organization and formatting, minor refactoring
* PyQt6/PySide6 fixup for file dialog
* Minor adjustment to file picker
* Bugfix: for 'None' sigChanged
'None' is explicitly allowed for a WidgetParameterItem's `sigChanged` value. However, this raises an error on a changed value unless the commit's fix is applied
* Calendar works better as sub item
* Fixes bugs in pen parameter's dialog + makes it resizable
* more bugfixes and recommended changes, lets pen serialize its options
* better pen save state
* Fixes file parameter qualms
* Fixes font parameter qualms
* Fixes calendar parameter qualms
* Fixes multiply-defined slider optsChanged
* Fixes pen parameter qualms
* ptree example minor bugfix
* Pen dialog bugfixes
* File dialog bugfixes / mild improvements
* unto ptree save state regression
* file fixup
* Adds parameter descriptions to docstrings
* Improved parameter documentation
* adds 'relativeTo' option for file parameter
* Less abuse of Qt enums during or-operations
* More uniform handling of relative paths
* More cleanup of enum setting
* better name for window title (matches qt name)
* Favor os.path over pathlib
* Exposes 'directory', 'windowTitle' to file parameter
* Fixup and add comparison to parameter tree state restoration
* Exposes "cosmetic" in pen parameter
* Indicate defaults in parameter documentation
* QtEnumParameter works for enums outside QtCore.Qt
* see if altering pytest report fixes ci bug
* Cleanup unused import and redundant `self.widget` assignments
Co-authored-by: Fekete Imre <feketeimre87@gmail.com>
Co-authored-by: ChristophRose <42769515+ChristophRose@users.noreply.github.com>
* add axis convenient methods and matrix display example
* wrestled wayward space back into docstring
* color map names are case sensitive on Linux
* docstring fix for PlotItem
* protect AxisItem.linkToView from being obscured by DateAxisItem override
* replaced setOrigin method by promoted setPos and setScale
* made tri-state axes switching explicit
* reverted setRect behavior, documentation pass for ImageItem
* minor text adjustment
* implmented some suggested revisions
* fix input parsing for setRect and add tests so that I don't break it again
* don't try to re-add transform after clearing it
* changed example and doc image generators to pg.exec()
* removed commented-out code
* cleaned up transform eqaulity assertion
* restored devoured comment
* restored devoured comment
* added convenience functions to better handle plotting with gradients
* docstring correction, example name correction
* retrying to get documentation format right
* another attempt at cleaning up docs
* Don't hardcode timer type (and docs fixing attempt)
* more docstring re-formatting
* linebreaks in docstrings
* more documentation adjustments
* documentation pass
* some corrections to documentation
* more adjustments to documentation
* again?
* removed some whitespace and redundant blank lines, changed some checks '== None' to 'is None'
* fixed mis-spelling QColor as Qcolor
* Remove warning about existing QApplication
* Remove reference to weave which we do not use
* Do away with opengl warning
* Remove weaveDebug config option
- 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
* set environment variables before starting QApp
* fix-422
* Better support of hidpi
* Fix Typo in App-Name
* Remove fontScaleFactor bits
* Add documenation for hidpi displays
* Fix pg not defined
* set environment variables before starting QApp
* fix-422
* Better support of hidpi
* Fix Typo in App-Name
* Remove fontScaleFactor bits
* Add documenation for hidpi displays
* Add CLI args to video speed test for easier / automated benchmarking
* use a buffer-qimage so we can avoid allocing so much
this should improve performance under windows
* playing with numba
* oh, mins/maxes in the other order
* maybe put the cupy in here and see what happens
* pre-alloc for gpu and cpu
* handle possibility of not having cupy
* no numba in this branch
* organize imports
* name them after their use, not their expected device
* cupy.take does not support clip mode, so do it explicitly
* add CUDA option to the VideoSpeedTest
* rename private attr xp to _xp
* handle resizes at the last moment
* cupy is less accepting of lists as args
* or somehow range isn't allowed? what histogram is this?
* construct the array with python objects
* get the python value right away
* put LUT into cupy if needed
* docstring about cuda toolkit version
* better handling and display of missing cuda lib
* lint
* import need
* handle switching between cupy and numpy in a single ImageItem
* only use xp when necessary
we can now depend on numpy >= 1.17, which means __array_function__-implementing cupy can
seamlessly pass into numpy functions. the remaining uses of xp are for our functions which
need to allocate new data structures, an operation that has to be substrate-specific.
remove empty_cupy; just check if the import succeeded, instead.
* use an option to control use of cupy
* convert cupy.ceil array to int for easier mathing
* RawImageWidget gets to use the getCupy function now, too
* raise error to calm linters; rename for clarity
* Add Generated Template Files
* document things better
* cruft removal
* warnings to communicate when cupy is expected but somehow broken
* playing with settings to suss out timeout
* playing with more stuff to suss out timeout
* replace with empty list
* skip test_ExampleApp on linux+pyside2 only
Co-authored-by: Luke Campagnola <luke.campagnola@gmail.com>
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
* MAINT: Post 0.11.1 release, drop py2, qt4
This focuses on distribution, tests, and docs. This may not be comprehensive, but covers the cases I found by looking and a few greps
Noteably, this does not change any actual internal code yet, to avoid merge conflicts with pending PRs.
* NEP 29 language/versions
* example app now workw with Qt4 and Python2 again
* Example App is now part of the test suite
* Add initExample
* No scary warning when launching examples
* Fix scary examples.__main__ warning
* Use courier new font as its on all platforms
* Remove commented out code
* Add newline
* Updated docs, example app now tested
* Non-relative import for example app
* Proper importing now
* Add a docs build job to CI
* Add sphinxopts to fail on warning
* Test sphinx warning
* Redid ci stage conditionals
* update conf.py to remove deprecation warning
* introduce 3rd stage for proper conditionals
* Attempt to fix malformed table
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
* Add DateAxisItem
* Change style to camelCase
* Fix missing first tick for negative timestamps
* Add ms precision, auto skipping
Auto skipping allows a zoom level to skip ticks automatically if the
maximum number of ticks/pt is exceeded
* fixes suggested by @goetzc
* workaround for negative argument to utcfromtimestamp on windows
* attachToPlotItem method
* default date axis orientation
* Use new DateAxisItem in Plot Customization example
* attachToPlotItem bugfix
* examples of DateAxisItem
* modified description of customPlot example
* added descriptions to the new examples, reformatted their code, included the first one into utils.py
* typo
* Refactored code for setting axis items into new function
Replaces "DateAxisItem.attachToPlotItem"
* Fix string comparison with ==
* Doc: Slightly more text for DateAxisItem, small improvement for PlotItem
* Make PlotWidget.setAxisItems official
* Fix typo in docstring
* renamed an example
* merge bug fix
* Revert "merge bug fix"
This reverts commit 876b5a7cdb.
* Real bug fix
* support for dates upto -1e13..1e13
* Automatically limit DateAxisItem to a range from -1e12 to 1e12 years
Very large years (|y|>1e13) cause infinite loop, and since nobody
needs time 100 times larger than the age of the universe anyways,
this constrains it to 1e12.
Following suggestion by @axil:
https://github.com/pyqtgraph/pyqtgraph/pull/1154#issuecomment-612662168
* Also catch ValueErrors occuring on Linux before OverfloeErrors
While zooming out, before hitting OverflowErrors, utctimestamp
produces ValueErrors (at least on my Linux machine), so they
are also catched.
* Fix: Timestamp 0 corresponds to year 1970
For large years, x axis labels jump by 1970 years if it is not
accounted for timestamp 0 to be equal to year 1970.
* Fix: When zooming into extreme dates, OSError occurs
This commit catches the OSError like the other observed errors
* Disable stepping below years for dates outside *_REGULAR_TIMESTAMP
2 reasons: First: At least on my Linux machine, zooming into
those dates creates infinite loops. Second: Nobody needs
sub-year-precision for those extreme years anyways.
* Adapt zoom level sizes based on current font size and screen resolution
This is somewhat experimental. With this commit, no longer 60 px are
assumed as width for all zoom levels, but the current font and
display resolution are considered to calculate the width of ticks in
each zoom level. See the new function `updateZoomLevels` for
details.
Before calling this function, overridden functions `paint` and
`generateDrawSpecs` provide information over the current display
and font via `self.fontScaleFactor` and `self.fontMetrics`.
* Meaningful error meassage when adding axis to multiple PlotItems
As @axil noted in the DateAxisItem PR, currently users get a
segmentation fault when one tries to add an axis to multiple
PlotItems. This commit adds a meaningful RuntimeError message
for that case.
* setZoomLevelForDensity: Refactoring and calculating optimal spacing on the fly
* DateTimeAxis Fix: 1970 shows when zooming far out
* Refactoring: Make zoomLevels a customizable dict again
* updated the dateaxisitem example
* Fix: Get screen resolution in a way that also works for Qt 4
This is both a simplification in code and an improvement in backwards compatibility with Qt 4.
* DateAxisItem Fix: Also resolve time below 0.5 seconds
* unix line endings in examples
* DateTimeAxis Fix: For years < 1 and > 9999, stepping broke
Stepping was off by 1970 years for years < 1 and > 9999,
resulting in a gap in ticks visible when zooming out. Fixed by
subtracting the usual 1970 years.
* DateTimeAxis Fix: Zooming out too far causes infinite loop
Fixed by setting default limits to +/- 1e10 years. Should still
be enough.
* improved second dateaxisitem example
* 1..9999 years limit
* DateTimeAxis: Use OrderedDict to stay compatible with Python < 3-6
* DateAxisItem: Use font height to determine spacing for vertical axes
* window title
* added dateaxisitem.rst
* updated index.rst
Co-authored-by: Lukas Heiniger <lukas.heiniger@sed.ethz.ch>
Co-authored-by: Lev Maximov <lev.maximov@gmail.com>
Co-authored-by: 2xB <2xB@users.noreply.github.com>
* HDF5Exporter handles ragged curves by saving them into different datasets based on their names.
* Add HDF5Exporter tests
* Document HDF5Exporter
* Fix tmp file path