* Do not wrap PlotView/ImageView
There is no need to wrap PlotView/ImageView into QMainWindow, since
only purpose of the QMainWindow is some default menu toolbar & menu
handling, that is not used by PyQtGraph anyway.
Moreover, every parent-less Qt widget can become window, so this
change just use PlotView/ImageView as windows, removing extra
complexity, eg. method forwarding, self.win property.
Another benefit of this change, it that these windows get initial
dimensions and titles as they were designed in .ui file.
* Properly cleanup on ImageView.close()
We should not close explicitly child widgets or clear scene, otherwise
Qt will deallocate children views, and cause "wrapped C/C++ object of
type ImageItem has been deleted" error next time we call close()
and/or some other methods.
All children, including self.ui.roiPlot, self.ui.graphicsView will be
closed together with its parent, so there is no need to close them
explicitly.
So the purpose of close it to reclaim the memory, but not to make the existing ImageView object dysfunctional.
* Remove references to plot & image windows after close
PyQtGraph images and plots module list variables are currently holding
references to all plots and image windows returned directly from main
module. This does not seem to be documented however, and causes the Qt
windows to be not released from memory, even if user releases all own
references.
This change removes the references from images/plots list once window
is closed, so when there is no other reference, window and all related
memory is reclaimed.
* Change all UI forms title from Form to PyQtGraph
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
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
A new function profiling system is implemented. Most importantly, this
allows one to profile various internal functions directly by setting the
`PYQTGRAPHPROFILE` environment variable to a comma separated list of
function and method names, e.g.
PYQTGRAPHPROFILE=functions.makeARGB,ImageItem.render \
python -mexamples
Specifically, items in `PYQTGRAPHPROFILE` must be of the form
`classname.methodname` or `dotted_module_name.functionname`, with the
initial "pyqtgraph." stripped from the dotted module name.
Moreover, the overhead of inactive profilers has been kept minimal: an
introspective check of the caller's name (only if `PYQTGRAPHPROFILE` is
set) and a trivial function (not method) call per profiler call.
The new profilers rely on `sys._getframe` to find the caller's name,
although the previous system (passing the caller's name explicitely)
could certainly have been kept instead.
Finally the API of profilers has been changed: register a
profiling point simply by calling the profiler, and profilers are
automatically flushed on garbage collection. See the docstring of
`pyqtgraph.debug.Profiler` for more details.