Commit Graph

12 Commits

Author SHA1 Message Date
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
KIU Shueng Chuan 81baa182c5 add __all__ to various files 2021-06-25 21:19:33 +08:00
Ogi Moore ff71b6be6b Add actual deprecation warnings 2021-02-11 21:34:02 -08:00
Ogi 4dc0865bae Restore the now-deprecated PlotWindow and ImageWindow classes 2020-06-11 20:55:28 -07:00
Adam Strzelecki 983cc1695e
Patch/window handling (#468)
* 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>
2020-06-01 11:23:18 -07:00
Kenneth Lyons db67a256a9
Miscellaneous doc fixups (#1142)
* Miscellaneous doc cleanup

* Moved dockarea up a level (like flowchart, parametertree). Removed extraneous parametertree doc
2020-04-03 10:06:25 -07:00
Kenneth Lyons b57d45df6d The lazier way 2019-09-23 21:25:52 -07:00
Kenneth Lyons ed264802a2 Raise AttributeError in __getattr__ 2019-09-23 21:19:01 -07:00
Luke Campagnola 927fe44ab9 move mkQApp to Qt.py to make it easier to import internally
GraphicsLayoutWidget now calls mkQApp
2018-02-23 17:34:15 -08:00
Luke Campagnola ae2f0c155f deprecate graphicsWindow classes 2018-02-14 09:06:35 -08:00
Luke Campagnola 193367a56b Signal cleanup:
- Renamed GraphicsView signals to avoid collision with ViewBox signals that
  are wrapped in PlotWidget: sigRangeChanged => sigDeviceRangeChanged and
  sigTransformChanged => sigDeviceTransformChanged.
- All signal disconnections that catch TypeError now also catch RuntimeError
  for pyside compatibility.
2014-02-07 10:38:41 -05: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