diff options
author | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2018-07-31 16:22:25 +0200 |
---|---|---|
committer | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2018-07-31 16:22:25 +0200 |
commit | 159ef14fb9e198bb0066ea14e6b980f065de63dd (patch) | |
tree | bc37c7d4ba09ee59deb708897fa0571709aec293 /doc/source/sample_code | |
parent | 270d5ddc31c26b62379e3caa9044dd75ccc71847 (diff) |
New upstream version 0.8.0+dfsg
Diffstat (limited to 'doc/source/sample_code')
-rw-r--r-- | doc/source/sample_code/img/plotInteractiveImageROI.png | bin | 0 -> 564397 bytes | |||
-rw-r--r-- | doc/source/sample_code/img/plotUpdateCurveFromThread.png (renamed from doc/source/sample_code/img/plotUpdateFromThread.png) | bin | 62761 -> 62761 bytes | |||
-rw-r--r-- | doc/source/sample_code/img/plotUpdateImageFromThread.png | bin | 0 -> 50938 bytes | |||
-rw-r--r-- | doc/source/sample_code/index.rst | 53 |
4 files changed, 38 insertions, 15 deletions
diff --git a/doc/source/sample_code/img/plotInteractiveImageROI.png b/doc/source/sample_code/img/plotInteractiveImageROI.png Binary files differnew file mode 100644 index 0000000..de62dc3 --- /dev/null +++ b/doc/source/sample_code/img/plotInteractiveImageROI.png diff --git a/doc/source/sample_code/img/plotUpdateFromThread.png b/doc/source/sample_code/img/plotUpdateCurveFromThread.png Binary files differindex ac97ccd..ac97ccd 100644 --- a/doc/source/sample_code/img/plotUpdateFromThread.png +++ b/doc/source/sample_code/img/plotUpdateCurveFromThread.png diff --git a/doc/source/sample_code/img/plotUpdateImageFromThread.png b/doc/source/sample_code/img/plotUpdateImageFromThread.png Binary files differnew file mode 100644 index 0000000..c0caec3 --- /dev/null +++ b/doc/source/sample_code/img/plotUpdateImageFromThread.png diff --git a/doc/source/sample_code/index.rst b/doc/source/sample_code/index.rst index 933d162..a5cbf11 100644 --- a/doc/source/sample_code/index.rst +++ b/doc/source/sample_code/index.rst @@ -142,7 +142,7 @@ Widgets - .. image:: img/colormapDialog.png :height: 150px :align: center - - This script shows the features of a :mod:`~silx.gui.plot.ColormapDialog`. + - This script shows the features of a :mod:`~silx.gui.dialog.ColormapDialog`. :class:`silx.gui.plot.actions.PlotAction` ......................................... @@ -208,14 +208,15 @@ Sample code that adds specific tools or functions to plot widgets. - .. image:: img/plotWidget.png :height: 150px :align: center - - This script shows how to subclass :class:`~silx.gui.plot.PlotWidget` to tune its tools. + - This script shows how to create a custom window around a PlotWidget. - It subclasses a :class:`~silx.gui.plot.PlotWidget` and adds toolbars and - a colorbar by using pluggable widgets: + It subclasses :class:`QMainWindow`, uses a :class:`~silx.gui.plot.PlotWidget` + as its central widget and adds toolbars and a colorbar by using pluggable widgets: + - :class:`~silx.gui.plot.PlotWidget` from :mod:`silx.gui.plot` + - QToolBar from :mod:`silx.gui.plot.tools` - QAction from :mod:`silx.gui.plot.actions` - QToolButton from :mod:`silx.gui.plot.PlotToolButtons` - - QToolBar from :mod:`silx.gui.plot.PlotTools` - :class:`silx.gui.plot.ColorBar.ColorBarWidget` * - :download:`plotContextMenu.py <../../../examples/plotContextMenu.py>` - .. image:: img/plotContextMenu.png @@ -246,21 +247,43 @@ Sample code that adds specific tools or functions to plot widgets. :align: center - This script is an example to illustrate how to use axis synchronization tool. - * - :download:`plotUpdateFromThread.py <../../../examples/plotUpdateFromThread.py>` - - .. image:: img/plotUpdateFromThread.png + * - :download:`plotUpdateCurveFromThread.py <../../../examples/plotUpdateCurveFromThread.py>` + - .. image:: img/plotUpdateCurveFromThread.png :height: 150px :align: center - This script illustrates the update of a :mod:`silx.gui.plot` widget from a thread. The problem is that plot and GUI methods should be called from the main thread. - To safely update the plot from another thread, one need to make the update - asynchronously from the main thread. - In this example, this is achieved through a Qt signal. - - In this example we create a subclass of :class:`~silx.gui.plot.PlotWindow.Plot1D` - that adds a thread-safe method to add curves: - :meth:`ThreadSafePlot1D.addCurveThreadSafe`. - This thread-safe method is then called from a thread to update the plot.. + To safely update the plot from another thread, one need to execute the update + asynchronously in the main thread. + In this example, this is achieved with + :func:`~silx.gui.utils.concurrent.submitToQtMainThread`. + + In this example a thread calls submitToQtMainThread to update the curve + of a plot. + * - :download:`plotUpdateImageFromThread.py <../../../examples/plotUpdateImageFromThread.py>` + - .. image:: img/plotUpdateImageFromThread.png + :height: 150px + :align: center + - This script illustrates the update of a :mod:`silx.gui.plot` widget from a thread. + + The problem is that plot and GUI methods should be called from the main thread. + To safely update the plot from another thread, one need to execute the update + asynchronously in the main thread. + In this example, this is achieved with + :func:`~silx.gui.utils.concurrent.submitToQtMainThread`. + + In this example a thread calls submitToQtMainThread to update the curve + of a plot. + * - :download:`plotInteractiveImageROI.py <../../../examples/plotInteractiveImageROI.py>` + - .. image:: img/plotInteractiveImageROI.png + :height: 150px + :align: center + - This script illustrates image ROI selection in a :class:`~silx.gui.plot.PlotWidget` + + It uses :class:`~silx.gui.plot.tools.roi.RegionOfInterestManager` and + :class:`~silx.gui.plot.tools.roi.RegionOfInterestTableWidget` to handle the + interactive selection and to display the list of selected ROIs. * - :download:`printPreview.py <../../../examples/printPreview.py>` - .. image:: img/printPreview.png :height: 150px |