summaryrefslogtreecommitdiff
path: root/doc/source/modules/gui
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source/modules/gui')
-rw-r--r--doc/source/modules/gui/data/img/ArrayTableWidget.pngbin0 -> 29088 bytes
-rw-r--r--doc/source/modules/gui/fit/backgroundwidget.rst7
-rw-r--r--doc/source/modules/gui/fit/img/BackgroundDialog.pngbin0 -> 52076 bytes
-rw-r--r--doc/source/modules/gui/fit/img/FitWidget.pngbin0 -> 43479 bytes
-rw-r--r--doc/source/modules/gui/fit/img/bgwidget.pngbin68544 -> 0 bytes
-rw-r--r--doc/source/modules/gui/fit/index.rst4
-rw-r--r--doc/source/modules/gui/gallery.rst273
-rw-r--r--doc/source/modules/gui/icons.rst54
-rw-r--r--doc/source/modules/gui/img/IPythonDockWidget.pngbin0 -> 27683 bytes
-rw-r--r--doc/source/modules/gui/img/IPythonWidget.pngbin0 -> 28980 bytes
-rw-r--r--doc/source/modules/gui/index.rst8
-rw-r--r--doc/source/modules/gui/plot/actions/control.rst5
-rw-r--r--doc/source/modules/gui/plot/actions/examples.rst (renamed from doc/source/modules/gui/plot/plotactions_examples.rst)6
-rw-r--r--doc/source/modules/gui/plot/actions/fit.rst5
-rw-r--r--doc/source/modules/gui/plot/actions/histogram.rst5
-rw-r--r--doc/source/modules/gui/plot/actions/img/fftAction0.png (renamed from doc/source/modules/gui/plot/img/fftAction0.png)bin91165 -> 91165 bytes
-rw-r--r--doc/source/modules/gui/plot/actions/img/fftAction1.png (renamed from doc/source/modules/gui/plot/img/fftAction1.png)bin38847 -> 38847 bytes
-rw-r--r--doc/source/modules/gui/plot/actions/img/shiftAction0.png (renamed from doc/source/modules/gui/plot/img/shiftAction0.png)bin29092 -> 29092 bytes
-rw-r--r--doc/source/modules/gui/plot/actions/img/shiftAction3.png (renamed from doc/source/modules/gui/plot/img/shiftAction3.png)bin25949 -> 25949 bytes
-rw-r--r--doc/source/modules/gui/plot/actions/index.rst30
-rw-r--r--doc/source/modules/gui/plot/actions/io.rst6
-rw-r--r--doc/source/modules/gui/plot/actions/medfilt.rst5
-rw-r--r--doc/source/modules/gui/plot/colormap.rst16
-rw-r--r--doc/source/modules/gui/plot/compleximageview.rst19
-rw-r--r--doc/source/modules/gui/plot/dev.rst20
-rw-r--r--doc/source/modules/gui/plot/getting_started.rst52
-rw-r--r--doc/source/modules/gui/plot/imageview.rst6
-rw-r--r--doc/source/modules/gui/plot/img/ComplexImageView.pngbin0 -> 72268 bytes
-rw-r--r--doc/source/modules/gui/plot/img/printPreviewMultiPlot.pngbin0 -> 25948 bytes
-rw-r--r--doc/source/modules/gui/plot/index.rst92
-rw-r--r--doc/source/modules/gui/plot/items.rst83
-rw-r--r--doc/source/modules/gui/plot/plot.rst16
-rw-r--r--doc/source/modules/gui/plot/plotactions.rst20
-rw-r--r--doc/source/modules/gui/plot/plotwidget.rst138
-rw-r--r--doc/source/modules/gui/plot/printpreviewtoolbutton.rst8
-rw-r--r--doc/source/modules/gui/plot/stackview.rst4
-rw-r--r--doc/source/modules/gui/plot3d/actions.rst17
-rw-r--r--doc/source/modules/gui/plot3d/dev.rst8
-rw-r--r--doc/source/modules/gui/plot3d/index.rst39
-rw-r--r--doc/source/modules/gui/plot3d/scalarfieldview.rst7
-rw-r--r--doc/source/modules/gui/plot3d/toolbars.rst29
-rw-r--r--doc/source/modules/gui/plot3d/tools.rst40
-rw-r--r--doc/source/modules/gui/widgets/img/FrameBrowser.pngbin0 -> 3731 bytes
-rw-r--r--doc/source/modules/gui/widgets/img/HorizontalSliderWithBrowser.pngbin0 -> 4215 bytes
-rw-r--r--doc/source/modules/gui/widgets/img/PeriodicCombo.pngbin0 -> 3464 bytes
-rw-r--r--doc/source/modules/gui/widgets/img/PeriodicList.pngbin0 -> 12035 bytes
-rw-r--r--doc/source/modules/gui/widgets/img/PeriodicTable.pngbin0 -> 35124 bytes
-rw-r--r--doc/source/modules/gui/widgets/img/TableWidget.pngbin0 -> 4058 bytes
-rw-r--r--doc/source/modules/gui/widgets/img/ThreadPoolPushButton.pngbin0 -> 2729 bytes
-rw-r--r--doc/source/modules/gui/widgets/img/WaitingPushButton.pngbin0 -> 1962 bytes
-rw-r--r--doc/source/modules/gui/widgets/index.rst1
-rw-r--r--doc/source/modules/gui/widgets/printpreview.rst60
52 files changed, 741 insertions, 342 deletions
diff --git a/doc/source/modules/gui/data/img/ArrayTableWidget.png b/doc/source/modules/gui/data/img/ArrayTableWidget.png
new file mode 100644
index 0000000..7c81d02
--- /dev/null
+++ b/doc/source/modules/gui/data/img/ArrayTableWidget.png
Binary files differ
diff --git a/doc/source/modules/gui/fit/backgroundwidget.rst b/doc/source/modules/gui/fit/backgroundwidget.rst
index eea2052..a34c639 100644
--- a/doc/source/modules/gui/fit/backgroundwidget.rst
+++ b/doc/source/modules/gui/fit/backgroundwidget.rst
@@ -7,13 +7,6 @@
.. automodule:: silx.gui.fit.BackgroundWidget
-.. |imgBGWidget| image:: ./img/bgwidget.png
- :height: 300px
- :align: middle
-
-|imgBGWidget|
-
-
API
---
diff --git a/doc/source/modules/gui/fit/img/BackgroundDialog.png b/doc/source/modules/gui/fit/img/BackgroundDialog.png
new file mode 100644
index 0000000..c6b8c03
--- /dev/null
+++ b/doc/source/modules/gui/fit/img/BackgroundDialog.png
Binary files differ
diff --git a/doc/source/modules/gui/fit/img/FitWidget.png b/doc/source/modules/gui/fit/img/FitWidget.png
new file mode 100644
index 0000000..73a80b4
--- /dev/null
+++ b/doc/source/modules/gui/fit/img/FitWidget.png
Binary files differ
diff --git a/doc/source/modules/gui/fit/img/bgwidget.png b/doc/source/modules/gui/fit/img/bgwidget.png
deleted file mode 100644
index 724eadb..0000000
--- a/doc/source/modules/gui/fit/img/bgwidget.png
+++ /dev/null
Binary files differ
diff --git a/doc/source/modules/gui/fit/index.rst b/doc/source/modules/gui/fit/index.rst
index 67c22a1..d9581ed 100644
--- a/doc/source/modules/gui/fit/index.rst
+++ b/doc/source/modules/gui/fit/index.rst
@@ -9,11 +9,11 @@
Snapshot of the widgets:
-.. |imgFitWidget| image:: ../../../Tutorials/img/fitwidget4.png
+.. |imgFitWidget| image:: ./img/FitWidget.png
:height: 150px
:align: middle
-.. |imgBGWidget| image:: ./img/bgwidget.png
+.. |imgBGWidget| image:: ./img/BackgroundDialog.png
:height: 150px
:align: middle
diff --git a/doc/source/modules/gui/gallery.rst b/doc/source/modules/gui/gallery.rst
new file mode 100644
index 0000000..4ae83d6
--- /dev/null
+++ b/doc/source/modules/gui/gallery.rst
@@ -0,0 +1,273 @@
+
+Widgets gallery
+===============
+
+
+:mod:`silx.gui.console` Widgets
++++++++++++++++++++++++++++++++
+
+.. currentmodule:: silx.gui.console
+
+.. list-table::
+ :widths: 1 4
+ :header-rows: 1
+
+ * - Widget
+ - Description
+ * - .. image:: img/IPythonWidget.png
+ :height: 150px
+ :align: center
+ - :class:`IPythonWidget` is an interactive console widget running a
+ :class`QtInProcessKernelManager`. This allows to push variables to the
+ interactive console, and interact with your application (e.g. adding
+ curves to a plot)
+ * - .. image:: img/IPythonDockWidget.png
+ :height: 150px
+ :align: center
+ - :class:`IPythonDockWidget` is an :class:`IPythonWidget` embedded in
+ a :class:`QDockWidget`.
+
+
+:mod:`silx.gui.data` Widgets
+++++++++++++++++++++++++++++
+
+.. currentmodule:: silx.gui.data
+
+.. list-table::
+ :widths: 1 4
+ :header-rows: 1
+
+ * - Widget
+ - Description
+ * - .. image:: data/img/ArrayTableWidget.png
+ :height: 150px
+ :align: center
+ - :class:`ArrayTableWidget` is a table widget with browsers designed to
+ display the content of multi-dimensional data arrays.
+ * - .. image:: data/img/DataViewer.png
+ :height: 150px
+ :align: center
+ - :class:`DataViewer` is a widget designed to display data using the most
+ adapted view.
+ * - .. image:: data/img/DataViewerFrame.png
+ :height: 150px
+ :align: center
+ - :class:`DataViewerFrame` is a :class:`DataViewer` with a view selector
+ that lets you view the data using any compatible view.
+ * - .. image:: data/img/NumpyAxesSelector.png
+ :height: 50px
+ :align: center
+ - :class:`NumpyAxesSelector` is a widget designed to select a subarray in a
+ n-dimensional array, by fixing the index on some of the dimensions.
+
+
+:mod:`silx.gui.fit` Widgets
++++++++++++++++++++++++++++
+
+.. currentmodule:: silx.gui.fit
+
+.. list-table::
+ :widths: 1 4
+ :header-rows: 1
+
+ * - Widget
+ - Description
+ * - .. image:: fit/img/FitWidget.png
+ :height: 150px
+ :align: center
+ - :class:`FitWidget` is a widget designed to configure and run a fitting process,
+ with constraints on parameters.
+ * - .. image:: fit/img/BackgroundDialog.png
+ :height: 150px
+ :align: center
+ - :class:`BackgroundWidget.BackgroundDialog` is a widget designed to adjust
+ the parameters and preview the results of a *snip* or *strip* background
+ filter.
+
+
+:mod:`silx.gui.hdf5` Widgets
+++++++++++++++++++++++++++++
+
+.. currentmodule:: silx.gui.hdf5
+
+.. list-table::
+ :widths: 1 4
+ :header-rows: 1
+
+ * - Widget
+ - Description
+ * - .. image:: hdf5/img/Hdf5TreeView.png
+ :height: 150px
+ :align: center
+ - :class:`Hdf5TreeView` is a tree view desiged to browse an HDF5
+ file structure.
+
+.. _plot-gallery:
+
+:mod:`silx.gui.plot` Widgets
+++++++++++++++++++++++++++++
+
+.. currentmodule:: silx.gui.plot
+
+Plotting widgets:
+
+.. list-table::
+ :widths: 1 4
+ :header-rows: 1
+
+ * - Widget
+ - Description
+ * - .. image:: plot/img/PlotWidget.png
+ :height: 150px
+ :align: center
+ - :class:`PlotWidget` is the base Qt widget providing a plot area.
+ Other plot widgets are based on this one and provides the same API.
+ * - .. image:: plot/img/PlotWindow.png
+ :height: 150px
+ :align: center
+ - :class:`PlotWindow` adds a toolbar to :class:`PlotWidget`.
+ The content of this toolbar can be configured from the
+ :class:`PlotWindow` constructor or by hiding its content afterward.
+ * - .. image:: plot/img/Plot1D.png
+ :height: 150px
+ :align: center
+ - :class:`.Plot1D` is a :class:`PlotWindow` configured with tools useful
+ for curves.
+ * - .. image:: plot/img/Plot2D.png
+ :height: 150px
+ :align: center
+ - :class:`.Plot2D` is a :class:`PlotWindow` configured with tools useful
+ for images.
+ * - .. image:: plot/img/ImageView.png
+ :height: 150px
+ :align: center
+ - :class:`ImageView` adds side histograms to a :class:`.Plot2D` widget.
+ * - .. image:: plot/img/StackView.png
+ :height: 150px
+ :align: center
+ - :class:`StackView` is a widget designed to display an image from a
+ stack of images in a :class:`PlotWindow` widget, with a frame browser
+ to navigate in the stack. The profile tool can do a 2D profile on the
+ stack of images.
+ * - .. image:: plot/img/ComplexImageView.png
+ :height: 150px
+ :align: center
+ - :class:`ComplexImageView` is a widget dedicated to visualize a single
+ 2D dataset of complex data.
+ It allows to switch between viewing amplitude, phase, real, imaginary,
+ colored phase with amplitude or log10(amplitude) as brightness.
+
+
+Additional widgets:
+
+.. list-table::
+ :widths: 1 4
+ :header-rows: 1
+
+ * - Widget
+ - Description
+ * - .. image:: plot/img/PositionInfo.png
+ :width: 300px
+ :align: center
+ - :class:`.PlotTools.PositionInfo` is a widget displaying mouse position and
+ information of a :class:`PlotWidget` associated to the mouse position.
+ * - .. image:: plot/img/LimitsToolBar.png
+ :width: 300px
+ :align: center
+ - :class:`.PlotTools.LimitsToolBar` is a QToolBar displaying and
+ controlling the limits of a :class:`PlotWidget`.
+ * - .. image:: plot/img/logColorbar.png
+ :height: 150px
+ :align: center
+ - :class:`.ColorBar.ColorBarWidget` display colormap gradient and can be linked with a plot
+ to display the colormap
+
+.. _plot3d-gallery:
+
+:mod:`silx.gui.plot3d` Widgets
+++++++++++++++++++++++++++++++
+
+.. currentmodule:: silx.gui.plot3d
+
+.. list-table::
+ :widths: 1 4
+ :header-rows: 1
+
+ * - Widget
+ - Description
+ * - .. image:: plot3d/img/ScalarFieldView.png
+ :height: 150px
+ :align: center
+ - :class:`ScalarFieldView` is a :class:`Plot3DWindow` dedicated to display 3D scalar field.
+ It can display iso-surfaces and an interactive cutting plane.
+ Sample code: :doc:`plot3d/viewer3dvolume_example`.
+ * - .. image:: plot3d/img/Plot3DWindow.png
+ :height: 150px
+ :align: center
+ - :class:`Plot3DWindow` is a :class:`QMainWindow` with a :class:`Plot3DWidget` as central widget
+ and toolbars.
+ * - .. image:: plot3d/img/Plot3DWidget.png
+ :height: 150px
+ :align: center
+ - :class:`Plot3DWidget` is the base Qt widget providing an OpenGL 3D scene.
+ Other widgets are using this widget as the OpenGL scene canvas.
+ * - .. image:: plot3d/img/SFViewParamTree.png
+ :height: 150px
+ :align: center
+ - :class:`SFViewParamTree` is a :class:`QTreeView` widget that can be attached to a :class:`ScalarFieldView`.
+ It displays current parameters of the :class:`ScalarFieldView` and allows to modify it.
+ Sample code: :doc:`plot3d/viewer3dvolume_example`.
+
+
+:mod:`silx.gui.widgets` Widgets
++++++++++++++++++++++++++++++++
+
+.. currentmodule:: silx.gui.widgets
+
+.. list-table::
+ :widths: 1 4
+ :header-rows: 1
+
+ * - Widget
+ - Description
+ * - .. image:: widgets/img/FrameBrowser.png
+ :width: 110px
+ :align: center
+ - :class:`FrameBrowser.FrameBrowser` is a browser widget designed to
+ browse through a sequence of integers (e.g. the indices of an array)
+ * - .. image:: widgets/img/HorizontalSliderWithBrowser.png
+ :width: 150px
+ :align: center
+ - :class:`FrameBrowser.HorizontalSliderWithBrowser` is a :class:`FrameBrowser`
+ with an additional slider.
+ * - .. image:: widgets/img/PeriodicCombo.png
+ :width: 150px
+ :align: center
+ - :class:`PeriodicTable.PeriodicCombo` is a :class:`QComboBox` widget designed to
+ select a single atomic element.
+ * - .. image:: widgets/img/PeriodicList.png
+ :height: 150px
+ :align: center
+ - :class:`PeriodicTable.PeriodicList` is a :class:`QTreeWidget` designed to select one
+ or more atomic elements.
+ * - .. image:: widgets/img/PeriodicTable.png
+ :height: 150px
+ :align: center
+ - :class:`PeriodicTable.PeriodicTable` is a periodic table widget designed to select one
+ or more atomic elements.
+ * - .. image:: widgets/img/TableWidget.png
+ :height: 150px
+ :align: center
+ - :class:`TableWidget.TableWidget` and :class:`TableWidget.TableView` inherit respectively
+ :class:`QTableWidget` and :class:`QTableView`, and add a context menu with *cut/copy/paste*
+ actions.
+ * - .. image:: widgets/img/WaitingPushButton.png
+ :width: 60px
+ :align: center
+ - :class:`WaitingPushButton` is a :class:`QPushButton` that can be graphically disabled,
+ for example to wait for a callback function to finish computing.
+ * - .. image:: widgets/img/ThreadPoolPushButton.png
+ :width: 100px
+ :align: center
+ - :class:`ThreadPoolPushButton` is a :class:`WaitingPushButton` that executes a
+ callback in a thread.
diff --git a/doc/source/modules/gui/icons.rst b/doc/source/modules/gui/icons.rst
index 61ea71d..c3fefd8 100644
--- a/doc/source/modules/gui/icons.rst
+++ b/doc/source/modules/gui/icons.rst
@@ -25,16 +25,22 @@ Available icons
- 3d-plane-normal-y
* - |3d-plane-normal-z|
- 3d-plane-normal-z
+ * - |3d-plane-pan|
+ - 3d-plane-pan
* - |3d-plane|
- 3d-plane
* - |arrow-keys|
- arrow-keys
+ * - |axis|
+ - axis
* - |camera|
- camera
* - |clipboard|
- clipboard
* - |close|
- close
+ * - |colorbar|
+ - colorbar
* - |colormap|
- colormap
* - |crop|
@@ -97,10 +103,14 @@ Available icons
- item-3dim
* - |item-ndim|
- item-ndim
+ * - |item-none|
+ - item-none
* - |item-object|
- item-object
* - |last|
- last
+ * - |math-amplitude|
+ - math-amplitude
* - |math-average|
- math-average
* - |math-derive|
@@ -109,6 +119,8 @@ Available icons
- math-energy
* - |math-fit|
- math-fit
+ * - |math-imaginary|
+ - math-imaginary
* - |math-normalize|
- math-normalize
* - |math-peak-reset|
@@ -117,6 +129,14 @@ Available icons
- math-peak-search
* - |math-peak|
- math-peak
+ * - |math-phase-color-log|
+ - math-phase-color-log
+ * - |math-phase-color|
+ - math-phase-color
+ * - |math-phase|
+ - math-phase
+ * - |math-real|
+ - math-real
* - |math-sigma|
- math-sigma
* - |math-smooth|
@@ -127,10 +147,14 @@ Available icons
- math-swap-sign
* - |math-ymin-to-zero|
- math-ymin-to-zero
+ * - |median-filter|
+ - median-filter
* - |next|
- next
* - |normal|
- normal
+ * - |pan|
+ - pan
* - |pixel-intensities|
- pixel-intensities
* - |plot-grid|
@@ -167,12 +191,16 @@ Available icons
- plot-yup
* - |previous|
- previous
+ * - |profile-clear|
+ - profile-clear
* - |profile1D|
- profile1D
* - |profile2D|
- profile2D
* - |remove|
- remove
+ * - |rotate-3d|
+ - rotate-3d
* - |rudder|
- rudder
* - |selected|
@@ -205,8 +233,6 @@ Available icons
- sliders-on
* - |spec|
- spec
- * - |test-png|
- - test-png
* - |view-1d|
- view-1d
* - |view-2d-stack|
@@ -217,6 +243,10 @@ Available icons
- view-3d
* - |view-fullscreen|
- view-fullscreen
+ * - |view-hdf5|
+ - view-hdf5
+ * - |view-nexus|
+ - view-nexus
* - |view-nofullscreen|
- view-nofullscreen
* - |view-raw|
@@ -227,6 +257,8 @@ Available icons
- view-text
* - |window-new|
- window-new
+ * - |zoom-back|
+ - zoom-back
* - |zoom-in|
- zoom-in
* - |zoom-original|
@@ -239,11 +271,14 @@ Available icons
.. |3d-plane-normal-x| image:: ../../../../silx/resources/gui/icons/3d-plane-normal-x.png
.. |3d-plane-normal-y| image:: ../../../../silx/resources/gui/icons/3d-plane-normal-y.png
.. |3d-plane-normal-z| image:: ../../../../silx/resources/gui/icons/3d-plane-normal-z.png
+.. |3d-plane-pan| image:: ../../../../silx/resources/gui/icons/3d-plane-pan.png
.. |3d-plane| image:: ../../../../silx/resources/gui/icons/3d-plane.png
.. |arrow-keys| image:: ../../../../silx/resources/gui/icons/arrow-keys.png
+.. |axis| image:: ../../../../silx/resources/gui/icons/axis.png
.. |camera| image:: ../../../../silx/resources/gui/icons/camera.png
.. |clipboard| image:: ../../../../silx/resources/gui/icons/clipboard.png
.. |close| image:: ../../../../silx/resources/gui/icons/close.png
+.. |colorbar| image:: ../../../../silx/resources/gui/icons/colorbar.png
.. |colormap| image:: ../../../../silx/resources/gui/icons/colormap.png
.. |crop| image:: ../../../../silx/resources/gui/icons/crop.png
.. |crosshair| image:: ../../../../silx/resources/gui/icons/crosshair.png
@@ -275,23 +310,32 @@ Available icons
.. |item-2dim| image:: ../../../../silx/resources/gui/icons/item-2dim.png
.. |item-3dim| image:: ../../../../silx/resources/gui/icons/item-3dim.png
.. |item-ndim| image:: ../../../../silx/resources/gui/icons/item-ndim.png
+.. |item-none| image:: ../../../../silx/resources/gui/icons/item-none.png
.. |item-object| image:: ../../../../silx/resources/gui/icons/item-object.png
.. |last| image:: ../../../../silx/resources/gui/icons/last.png
+.. |math-amplitude| image:: ../../../../silx/resources/gui/icons/math-amplitude.png
.. |math-average| image:: ../../../../silx/resources/gui/icons/math-average.png
.. |math-derive| image:: ../../../../silx/resources/gui/icons/math-derive.png
.. |math-energy| image:: ../../../../silx/resources/gui/icons/math-energy.png
.. |math-fit| image:: ../../../../silx/resources/gui/icons/math-fit.png
+.. |math-imaginary| image:: ../../../../silx/resources/gui/icons/math-imaginary.png
.. |math-normalize| image:: ../../../../silx/resources/gui/icons/math-normalize.png
.. |math-peak-reset| image:: ../../../../silx/resources/gui/icons/math-peak-reset.png
.. |math-peak-search| image:: ../../../../silx/resources/gui/icons/math-peak-search.png
.. |math-peak| image:: ../../../../silx/resources/gui/icons/math-peak.png
+.. |math-phase-color-log| image:: ../../../../silx/resources/gui/icons/math-phase-color-log.png
+.. |math-phase-color| image:: ../../../../silx/resources/gui/icons/math-phase-color.png
+.. |math-phase| image:: ../../../../silx/resources/gui/icons/math-phase.png
+.. |math-real| image:: ../../../../silx/resources/gui/icons/math-real.png
.. |math-sigma| image:: ../../../../silx/resources/gui/icons/math-sigma.png
.. |math-smooth| image:: ../../../../silx/resources/gui/icons/math-smooth.png
.. |math-substract| image:: ../../../../silx/resources/gui/icons/math-substract.png
.. |math-swap-sign| image:: ../../../../silx/resources/gui/icons/math-swap-sign.png
.. |math-ymin-to-zero| image:: ../../../../silx/resources/gui/icons/math-ymin-to-zero.png
+.. |median-filter| image:: ../../../../silx/resources/gui/icons/median-filter.png
.. |next| image:: ../../../../silx/resources/gui/icons/next.png
.. |normal| image:: ../../../../silx/resources/gui/icons/normal.png
+.. |pan| image:: ../../../../silx/resources/gui/icons/pan.png
.. |pixel-intensities| image:: ../../../../silx/resources/gui/icons/pixel-intensities.png
.. |plot-grid| image:: ../../../../silx/resources/gui/icons/plot-grid.png
.. |plot-roi-above| image:: ../../../../silx/resources/gui/icons/plot-roi-above.png
@@ -310,9 +354,11 @@ Available icons
.. |plot-ylog| image:: ../../../../silx/resources/gui/icons/plot-ylog.png
.. |plot-yup| image:: ../../../../silx/resources/gui/icons/plot-yup.png
.. |previous| image:: ../../../../silx/resources/gui/icons/previous.png
+.. |profile-clear| image:: ../../../../silx/resources/gui/icons/profile-clear.png
.. |profile1D| image:: ../../../../silx/resources/gui/icons/profile1D.png
.. |profile2D| image:: ../../../../silx/resources/gui/icons/profile2D.png
.. |remove| image:: ../../../../silx/resources/gui/icons/remove.png
+.. |rotate-3d| image:: ../../../../silx/resources/gui/icons/rotate-3d.png
.. |rudder| image:: ../../../../silx/resources/gui/icons/rudder.png
.. |selected| image:: ../../../../silx/resources/gui/icons/selected.png
.. |shape-circle-solid| image:: ../../../../silx/resources/gui/icons/shape-circle-solid.png
@@ -329,17 +375,19 @@ Available icons
.. |sliders-off| image:: ../../../../silx/resources/gui/icons/sliders-off.png
.. |sliders-on| image:: ../../../../silx/resources/gui/icons/sliders-on.png
.. |spec| image:: ../../../../silx/resources/gui/icons/spec.png
-.. |test-png| image:: ../../../../silx/resources/gui/icons/test-png.png
.. |view-1d| image:: ../../../../silx/resources/gui/icons/view-1d.png
.. |view-2d-stack| image:: ../../../../silx/resources/gui/icons/view-2d-stack.png
.. |view-2d| image:: ../../../../silx/resources/gui/icons/view-2d.png
.. |view-3d| image:: ../../../../silx/resources/gui/icons/view-3d.png
.. |view-fullscreen| image:: ../../../../silx/resources/gui/icons/view-fullscreen.png
+.. |view-hdf5| image:: ../../../../silx/resources/gui/icons/view-hdf5.png
+.. |view-nexus| image:: ../../../../silx/resources/gui/icons/view-nexus.png
.. |view-nofullscreen| image:: ../../../../silx/resources/gui/icons/view-nofullscreen.png
.. |view-raw| image:: ../../../../silx/resources/gui/icons/view-raw.png
.. |view-refresh| image:: ../../../../silx/resources/gui/icons/view-refresh.png
.. |view-text| image:: ../../../../silx/resources/gui/icons/view-text.png
.. |window-new| image:: ../../../../silx/resources/gui/icons/window-new.png
+.. |zoom-back| image:: ../../../../silx/resources/gui/icons/zoom-back.png
.. |zoom-in| image:: ../../../../silx/resources/gui/icons/zoom-in.png
.. |zoom-original| image:: ../../../../silx/resources/gui/icons/zoom-original.png
.. |zoom-out| image:: ../../../../silx/resources/gui/icons/zoom-out.png
diff --git a/doc/source/modules/gui/img/IPythonDockWidget.png b/doc/source/modules/gui/img/IPythonDockWidget.png
new file mode 100644
index 0000000..111a926
--- /dev/null
+++ b/doc/source/modules/gui/img/IPythonDockWidget.png
Binary files differ
diff --git a/doc/source/modules/gui/img/IPythonWidget.png b/doc/source/modules/gui/img/IPythonWidget.png
new file mode 100644
index 0000000..18b44e0
--- /dev/null
+++ b/doc/source/modules/gui/img/IPythonWidget.png
Binary files differ
diff --git a/doc/source/modules/gui/index.rst b/doc/source/modules/gui/index.rst
index eecd124..0b7f433 100644
--- a/doc/source/modules/gui/index.rst
+++ b/doc/source/modules/gui/index.rst
@@ -19,3 +19,11 @@ The ``silx.gui`` package provides a set of PyQt widgets.
plot3d/index.rst
qt.rst
widgets/index.rst
+
+
+.. toctree::
+ :hidden:
+
+ gallery.rst
+
+See the :doc:`gallery` page for an overview of all available widgets.
diff --git a/doc/source/modules/gui/plot/actions/control.rst b/doc/source/modules/gui/plot/actions/control.rst
new file mode 100644
index 0000000..b35986d
--- /dev/null
+++ b/doc/source/modules/gui/plot/actions/control.rst
@@ -0,0 +1,5 @@
+:mod:`silx.gui.plot.actions.control`
+````````````````````````````````````
+
+.. automodule:: silx.gui.plot.actions.control
+ :members:
diff --git a/doc/source/modules/gui/plot/plotactions_examples.rst b/doc/source/modules/gui/plot/actions/examples.rst
index f14a42a..125e9c5 100644
--- a/doc/source/modules/gui/plot/plotactions_examples.rst
+++ b/doc/source/modules/gui/plot/actions/examples.rst
@@ -17,7 +17,7 @@ Simple example: Shift a curve
The following script is a simplistic example to show the basic required steps:
- - create a new class inheriting from :class:`silx.gui.plot.PlotActions.PlotAction`
+ - create a new class inheriting from :class:`silx.gui.plot.actions.PlotAction`
- define basic parameters such as the icon, the tooltip...
- write a method that will be triggered by the action
- initialize the new plot action by passing a reference to a plot window
@@ -27,7 +27,7 @@ The method implemented in this action interacts with the plot in a basic way. It
then it creates a new data array based on the curve data, and finally it replaces the original curve
with a new one using the modified data array.
-.. literalinclude:: ../../../../../examples/shiftPlotAction.py
+.. literalinclude:: ../../../../../../examples/shiftPlotAction.py
:lines: 36-
.. |imgShiftAction0| image:: img/shiftAction0.png
@@ -66,7 +66,7 @@ the amplitude spectrum. However, the inverse FFT requires the complete FFT data
We are therefore required to store the complex array of FFT data as curve metadata,
in order to be able to reverse the process when the action is unchecked.
-.. literalinclude:: ../../../../../examples/fftPlotAction.py
+.. literalinclude:: ../../../../../../examples/fftPlotAction.py
:lines: 44-
.. |imgFftAction0| image:: img/fftAction0.png
diff --git a/doc/source/modules/gui/plot/actions/fit.rst b/doc/source/modules/gui/plot/actions/fit.rst
new file mode 100644
index 0000000..8b06908
--- /dev/null
+++ b/doc/source/modules/gui/plot/actions/fit.rst
@@ -0,0 +1,5 @@
+:mod:`silx.gui.plot.actions.fit`
+````````````````````````````````
+
+.. automodule:: silx.gui.plot.actions.fit
+ :members:
diff --git a/doc/source/modules/gui/plot/actions/histogram.rst b/doc/source/modules/gui/plot/actions/histogram.rst
new file mode 100644
index 0000000..6a31236
--- /dev/null
+++ b/doc/source/modules/gui/plot/actions/histogram.rst
@@ -0,0 +1,5 @@
+:mod:`silx.gui.plot.actions.histogram`
+``````````````````````````````````````
+
+.. automodule:: silx.gui.plot.actions.histogram
+ :members:
diff --git a/doc/source/modules/gui/plot/img/fftAction0.png b/doc/source/modules/gui/plot/actions/img/fftAction0.png
index 5bd8061..5bd8061 100644
--- a/doc/source/modules/gui/plot/img/fftAction0.png
+++ b/doc/source/modules/gui/plot/actions/img/fftAction0.png
Binary files differ
diff --git a/doc/source/modules/gui/plot/img/fftAction1.png b/doc/source/modules/gui/plot/actions/img/fftAction1.png
index e4b20d7..e4b20d7 100644
--- a/doc/source/modules/gui/plot/img/fftAction1.png
+++ b/doc/source/modules/gui/plot/actions/img/fftAction1.png
Binary files differ
diff --git a/doc/source/modules/gui/plot/img/shiftAction0.png b/doc/source/modules/gui/plot/actions/img/shiftAction0.png
index 2d5837a..2d5837a 100644
--- a/doc/source/modules/gui/plot/img/shiftAction0.png
+++ b/doc/source/modules/gui/plot/actions/img/shiftAction0.png
Binary files differ
diff --git a/doc/source/modules/gui/plot/img/shiftAction3.png b/doc/source/modules/gui/plot/actions/img/shiftAction3.png
index a2187b8..a2187b8 100644
--- a/doc/source/modules/gui/plot/img/shiftAction3.png
+++ b/doc/source/modules/gui/plot/actions/img/shiftAction3.png
Binary files differ
diff --git a/doc/source/modules/gui/plot/actions/index.rst b/doc/source/modules/gui/plot/actions/index.rst
new file mode 100644
index 0000000..f95b1f8
--- /dev/null
+++ b/doc/source/modules/gui/plot/actions/index.rst
@@ -0,0 +1,30 @@
+.. currentmodule:: silx.gui.plot
+
+:mod:`actions`: Actions for PlotWidget
+===========================================
+
+.. currentmodule:: silx.gui.plot.actions
+
+The :class:`PlotAction` is a base class used to define plot actions.
+
+Plot actions serve to add menu items or toolbar items that are associated with a method
+that can interact with the associated :class:`.PlotWidget`.
+
+For an introduction to creating custom plot actions, see :doc:`examples`.
+
+actions API
+-----------
+
+Actions are divided into the following sub-modules:
+
+
+.. toctree::
+ :maxdepth: 1
+
+ control.rst
+ medfilt.rst
+ fit.rst
+ histogram.rst
+ io.rst
+
+.. autoclass:: silx.gui.plot.actions.PlotAction
diff --git a/doc/source/modules/gui/plot/actions/io.rst b/doc/source/modules/gui/plot/actions/io.rst
new file mode 100644
index 0000000..98f1808
--- /dev/null
+++ b/doc/source/modules/gui/plot/actions/io.rst
@@ -0,0 +1,6 @@
+:mod:`silx.gui.plot.actions.io`
+```````````````````````````````
+
+.. automodule:: silx.gui.plot.actions.io
+ :members:
+
diff --git a/doc/source/modules/gui/plot/actions/medfilt.rst b/doc/source/modules/gui/plot/actions/medfilt.rst
new file mode 100644
index 0000000..25f5af1
--- /dev/null
+++ b/doc/source/modules/gui/plot/actions/medfilt.rst
@@ -0,0 +1,5 @@
+:mod:`silx.gui.plot.actions.medfilt`
+````````````````````````````````````
+
+.. automodule:: silx.gui.plot.actions.medfilt
+ :members:
diff --git a/doc/source/modules/gui/plot/colormap.rst b/doc/source/modules/gui/plot/colormap.rst
new file mode 100644
index 0000000..a492605
--- /dev/null
+++ b/doc/source/modules/gui/plot/colormap.rst
@@ -0,0 +1,16 @@
+
+.. currentmodule:: silx.gui.plot.Colormap
+
+:mod:`Colormap`: Colormap API
+=============================
+
+.. automodule:: silx.gui.plot.Colormap
+
+.. currentmodule:: silx.gui.plot.Colormap
+
+:class:`Colormap` class
+-----------------------
+
+.. autoclass:: Colormap
+ :show-inheritance:
+ :members:
diff --git a/doc/source/modules/gui/plot/compleximageview.rst b/doc/source/modules/gui/plot/compleximageview.rst
new file mode 100644
index 0000000..d9009eb
--- /dev/null
+++ b/doc/source/modules/gui/plot/compleximageview.rst
@@ -0,0 +1,19 @@
+
+.. currentmodule:: silx.gui.plot
+
+:mod:`ComplexImageView`: Plot a 2D array of complex
+===================================================
+
+.. automodule:: silx.gui.plot.ComplexImageView
+
+.. currentmodule:: silx.gui.plot.ComplexImageView
+
+.. image:: img/ComplexImageView.png
+ :height: 400px
+ :align: center
+
+:class:`ComplexImageView` class
+-------------------------------
+
+.. autoclass:: ComplexImageView
+ :members:
diff --git a/doc/source/modules/gui/plot/dev.rst b/doc/source/modules/gui/plot/dev.rst
index 707d215..b793b01 100644
--- a/doc/source/modules/gui/plot/dev.rst
+++ b/doc/source/modules/gui/plot/dev.rst
@@ -10,7 +10,7 @@ This package is structured as follows.
:class:`PlotWidget` is a Qt widget (actually a :class:`QMainWindow`) displaying a 1D, 2D plot area.
It provides different interaction modes.
:class:`PlotWindow` is a Qt widget (actually a :class:`QMainWindow`) which adds a set of toolbar buttons and associated functionalities to :class:`PlotWidget`.
-The toolbar QActions are implemented in :mod:`.PlotActions`.
+The toolbar QActions are implemented in :mod:`.actions`.
:mod:`.Plot`, :mod:`.PlotEvents` and :mod:`.PlotInteraction` implement the plotting API regardless of the rendering backend and regardless of its integration in Qt.
The plotting API in defined in :mod:`.Plot`.
@@ -40,7 +40,6 @@ The :class:`PlotWindow` uses additional widgets:
The widgets also use the following miscellaneous modules:
- :mod:`.Colors` to convert colors from name to RGB(A)
-- :mod:`.MPLColormap` to embed recent matplotlib colormaps: 'magma', 'inferno', 'plasma' and 'viridis'.
- :mod:`._utils`: utility functions
The :mod:`backends` package provide the implementation of the rendering used by the :class:`Plot`.
@@ -89,15 +88,6 @@ The following modules are the modules used internally by the plot package.
.. automodule:: silx.gui.plot.backends.BackendMatplotlib
:members:
-:mod:`backends.ModestImage`
-+++++++++++++++++++++++++++
-
-.. currentmodule:: silx.gui.plot.backends.ModestImage
-
-.. automodule:: silx.gui.plot.backends.ModestImage
- :members:
- :undoc-members:
-
:mod:`ColormapDialog`
+++++++++++++++++++++
@@ -164,14 +154,6 @@ The following modules are the modules used internally by the plot package.
:members:
:show-inheritance:
-:mod:`MPLColormap`
-++++++++++++++++++
-
-.. currentmodule:: silx.gui.plot.MPLColormap
-
-.. automodule:: silx.gui.plot.MPLColormap
- :members:
-
:mod:`PlotEvents`
+++++++++++++++++
diff --git a/doc/source/modules/gui/plot/getting_started.rst b/doc/source/modules/gui/plot/getting_started.rst
index 9e45b70..484d3f7 100644
--- a/doc/source/modules/gui/plot/getting_started.rst
+++ b/doc/source/modules/gui/plot/getting_started.rst
@@ -157,6 +157,7 @@ a module from :mod:`silx.gui`:
.. warning::
+
:mod:`silx.gui.plot` widgets are not thread-safe.
All calls to :mod:`silx.gui.plot` widgets must be made from the main thread.
@@ -342,17 +343,15 @@ When updating an image, if ``origin`` and ``scale`` are not provided, the previo
Colormap
++++++++
-A ``colormap`` is described with a :class:`dict` as follows (See :mod:`silx.gui.plot.Plot` for full documentation of the colormap):
+A ``colormap`` is described with a :class:`.Colormap` class as follows:
.. code-block:: python
- colormap = {
- 'name': 'gray', # Name of the colormap
- 'normalization': 'linear', # Either 'linear' or 'log'
- 'autoscale': True, # True to autoscale colormap to data range, False to use [vmin, vmax]
- 'vmin': 0.0, # If not autoscale, data value to bind to min of colormap
- 'vmax': 1.0 # If not autoscale, data value to bind to max of colormap
- }
+ colormap = Colormap(name='gray', # Name of the colormap
+ normalization='linear', # Either 'linear' or 'log'
+ vmin=0.0, # If not autoscale, data value to bind to min of colormap
+ vmax=1.0 # If not autoscale, data value to bind to max of colormap
+ )
At least the following colormap names are guaranteed to be available, but any colormap name from `matplotlib <http://matplotlib.org/>`_ (see `Choosing Colormaps <http://matplotlib.org/users/colormaps.html>`_) should work:
@@ -372,19 +371,23 @@ It is possible to change the default colormap of :meth:`.PlotWidget.addImage` fo
.. code-block:: python
- colormap = {'name': 'viridis', 'normalization': 'linear',
- 'autoscale': True, 'vmin': 0.0, 'vmax': 1.0}
+ colormap = Colormap(name='viridis',
+ normalization='linear',
+ vmin=0.0,
+ vmax=1.0)
plot.setDefaultColormap(colormap)
data = numpy.arange(512 * 512.).reshape(512, -1)
plot.addImage(data) # Rendered with the default colormap set before
-It is also possible to provide a ``colormap`` to :meth:`.PlotWidget.addImage` to override this default for an image:
+It is also possible to provide a :class:`.Colormap` to :meth:`.PlotWidget.addImage` to override this default for an image:
.. code-block:: python
- colormap = {'name': 'magma', 'normalization': 'log',
- 'autoscale': False, 'vmin': 1.2, 'vmax': 1.8}
+ colormap = Colormap(name='magma',
+ normalization='log',
+ vmin=1.2,
+ vmax=1.8)
data = numpy.random.random(512 * 512).reshape(512, -1) + 1.
plot.addImage(data, colormap=colormap)
@@ -432,18 +435,19 @@ Control plot axes
-----------------
The following examples illustrate the API to control the plot axes.
+:meth:`.PlotWidget.getXAxis` and :meth:`.PlotWidget.getYAxis` give access to each plot axis (:class:`.items.Axis`) in order to control them.
Labels and title
++++++++++++++++
Use :meth:`.PlotWidget.setGraphTitle` to set the plot main title.
-Use :meth:`.PlotWidget.setGraphXLabel` and :meth:`.PlotWidget.setGraphYLabel` to set the axes text labels:
+Use :meth:`.PlotWidget.getXAxis` and :meth:`.PlotWidget.getYAxis` to get the axes and set their text label with :meth:`.items.Axis.setLabel`:
.. code-block:: python
plot.setGraphTitle('My plot')
- plot.setGraphXLabel('X')
- plot.setGraphYLabel('Y')
+ plot.getXAxis().setLabel('X')
+ plot.getYAxis().setLabel('Y')
Axes limits
@@ -455,9 +459,9 @@ The following code moves the visible plot area to the right:
.. code-block:: python
- xmin, xmax = plot.getGraphXLimits()
+ xmin, xmax = plot.getXAxis().getLimits()
offset = 0.1 * (xmax - xmin)
- plot.setGraphXLimits(xmin + offset, xmax + offset)
+ plot.getXAxis().setLimits(xmin + offset, xmax + offset)
:meth:`.PlotWidget.resetZoom` set the plot limits to the bounds of the data:
@@ -465,7 +469,7 @@ The following code moves the visible plot area to the right:
plot.resetZoom()
-See :meth:`.PlotWidget.resetZoom`, :meth:`.PlotWidget.setLimits`, :meth:`.PlotWidget.getGraphXLimits`, :meth:`.PlotWidget.setGraphXLimits`, :meth:`.PlotWidget.getGraphYLimits`, :meth:`.PlotWidget.setGraphYLimits` for details.
+See :meth:`.PlotWidget.resetZoom`, :meth:`.PlotWidget.setLimits`, :meth:`.PlotWidget.getXAxis`, :meth:`.PlotWidget.getYAxis` and :class:`.items.Axis` for details.
Axes
@@ -475,17 +479,17 @@ Different methods allow plot axes modifications:
.. code-block:: python
- plot.setYAxisInverted(True) # Makes the Y axis pointing downward
+ plot.getYAxis().setInverted(True) # Makes the Y axis pointing downward
plot.setKeepDataAspectRatio(True) # To keep aspect ratio between X and Y axes
-See :meth:`.PlotWidget.setYAxisInverted`, :meth:`.PlotWidget.setKeepDataAspectRatio` for details.
+See :meth:`.PlotWidget.getYAxis`, :meth:`.PlotWidget.setKeepDataAspectRatio` for details.
.. code-block:: python
plot.setGraphGrid(which='both') # To show a grid for both minor and major axes ticks
# Use logarithmic axes
- plot.setXAxisLogarithmic(True)
- plot.setYAxisLogarithmic(True)
+ plot.getXAxis().setScale("log")
+ plot.getYAxis().setScale("log")
-See :meth:`.PlotWidget.setGraphGrid`, :meth:`.PlotWidget.setXAxisLogarithmic`, :meth:`.PlotWidget.setYAxisLogarithmic` for details.
+See :meth:`.PlotWidget.setGraphGrid`, :meth:`.PlotWidget.getXAxis`, :meth:`.PlotWidget.getXAxis` and :class:`.items.Axis` for details.
diff --git a/doc/source/modules/gui/plot/imageview.rst b/doc/source/modules/gui/plot/imageview.rst
index c2663c7..f03868b 100644
--- a/doc/source/modules/gui/plot/imageview.rst
+++ b/doc/source/modules/gui/plot/imageview.rst
@@ -6,10 +6,12 @@
.. automodule:: silx.gui.plot.ImageView
-.. currentmodule:: silx.gui.plot.ImageView
+.. image:: img/ImageView.png
+ :height: 400
+ :align: center
:class:`ImageView` class
------------------------
.. autoclass:: ImageView
- :members: valueChanged, profile, setImage, getColormap, setColormap, getHistogram, setGraphTitle, setGraphXLabel, setGraphYLabel
+ :members: valueChanged, setImage, getColormap, setColormap, getHistogram, setGraphTitle, getXAxis, getYAxis
diff --git a/doc/source/modules/gui/plot/img/ComplexImageView.png b/doc/source/modules/gui/plot/img/ComplexImageView.png
new file mode 100644
index 0000000..3f8b502
--- /dev/null
+++ b/doc/source/modules/gui/plot/img/ComplexImageView.png
Binary files differ
diff --git a/doc/source/modules/gui/plot/img/printPreviewMultiPlot.png b/doc/source/modules/gui/plot/img/printPreviewMultiPlot.png
new file mode 100644
index 0000000..4ce42b3
--- /dev/null
+++ b/doc/source/modules/gui/plot/img/printPreviewMultiPlot.png
Binary files differ
diff --git a/doc/source/modules/gui/plot/index.rst b/doc/source/modules/gui/plot/index.rst
index 143b85b..b77bbcc 100644
--- a/doc/source/modules/gui/plot/index.rst
+++ b/doc/source/modules/gui/plot/index.rst
@@ -15,94 +15,12 @@
For an introduction to the widgets of this package, see :doc:`getting_started`.
-For examples of custom plot actions, see :doc:`plotactions_examples`.
+For examples of custom plot actions, see :doc:`actions/examples`.
Widgets gallery
---------------
-The :mod:`silx.gui.plot` package provides the following plotting widgets:
-
-.. |imgPlotWidget| image:: img/PlotWidget.png
- :height: 150px
- :align: middle
-
-.. |imgPlotWindow| image:: img/PlotWindow.png
- :height: 150px
- :align: middle
-
-.. |imgPlot1D| image:: img/Plot1D.png
- :height: 150px
- :align: middle
-
-.. |imgPlot2D| image:: img/Plot2D.png
- :height: 150px
- :align: middle
-
-.. |imgImageView| image:: img/ImageView.png
- :height: 150px
- :align: middle
-
-.. |imgStackView| image:: img/StackView.png
- :height: 150px
- :align: middle
-
-.. list-table::
- :widths: 1 4
- :header-rows: 1
-
- * - Widget
- - Description
- * - |imgPlotWidget|
- - :class:`PlotWidget` is the base Qt widget providing a plot area.
- Other plot widgets are based on this one and provides the same API.
- * - |imgPlotWindow|
- - :class:`PlotWindow` adds a toolbar to :class:`PlotWidget`.
- The content of this toolbar can be configured from the
- :class:`PlotWindow` constructor or by hiding its content afterward.
- * - |imgPlot1D|
- - :class:`.Plot1D` is a :class:`PlotWindow` configured with tools useful
- for curves.
- * - |imgPlot2D|
- - :class:`.Plot2D` is a :class:`PlotWindow` configured with tools useful
- for images.
- * - |imgImageView|
- - :class:`ImageView` adds side histograms to a :class:`.Plot2D` widget.
- * - |imgStackView|
- - :class:`StackView` is a widget designed to display an image from a
- stack of images in a :class:`PlotWindow` widget, with a frame browser
- to navigate in the stack. The profile tool can do a 2D profile on the
- stack of images.
-
-It also provides (and uses) widgets that can be attached to a :class:`PlotWidget`:
-
-.. |imgPositionInfo| image:: img/PositionInfo.png
- :width: 300px
- :align: middle
-
-.. |imgLimitsToolBar| image:: img/LimitsToolBar.png
- :width: 300px
- :align: middle
-
-.. |imgColorbar| image:: img/logColorbar.png
- :height: 150px
- :align: middle
-
-
-.. list-table::
- :widths: 1 4
- :header-rows: 1
-
- * - Widget
- - Description
- * - |imgPositionInfo|
- - :class:`.PlotTools.PositionInfo` is a widget displaying mouse position and
- information of a :class:`PlotWidget` associated to the mouse position.
- * - |imgLimitsToolBar|
- - :class:`.PlotTools.LimitsToolBar` is a QToolBar displaying and
- controlling the limits of a :class:`PlotWidget`.
- * - |imgColorbar|
- - :class:`.ColorBar.ColorBarWidget` display colormap gradient and can be linked with a plot
- to display the colormap
+See :ref:`plot-gallery` gallery.
Public modules
--------------
@@ -114,12 +32,14 @@ Public modules
plotwindow.rst
imageview.rst
stackview.rst
- plot.rst
+ compleximageview.rst
+ colormap.rst
items.rst
- plotactions.rst
+ actions/index.rst
plottools.rst
profile.rst
roi.rst
+ printpreviewtoolbutton.rst
Internals
---------
diff --git a/doc/source/modules/gui/plot/items.rst b/doc/source/modules/gui/plot/items.rst
index beba3a1..3cdcf17 100644
--- a/doc/source/modules/gui/plot/items.rst
+++ b/doc/source/modules/gui/plot/items.rst
@@ -8,56 +8,103 @@
.. currentmodule:: silx.gui.plot.items
+Item
+----
+
+All plot primitives inherits from :class:`Item` as a common ground:
+
+.. autoclass:: Item
+ :show-inheritance:
+ :members:
+
Curve
-----
.. autoclass:: Curve
- :members:
- :inherited-members:
+ :members: getData, getXData, getYData, getXErrorData, getYErrorData, setData,
+ getSymbol, setSymbol, getSymbolSize, setSymbolSize,
+ getAlpha, setAlpha,
+ getColor, setColor,
+ getYAxis, setYAxis,
+ isFill, setFill,
+ getXLabel, getYLabel,
+ getLineWidth, setLineWidth, getLineStyle, setLineStyle,
+ isHighlighted, setHighlighted, getHighlightedColor, setHighlightedColor,
+ getCurrentColor
Images
------
.. autoclass:: ImageData
- :members:
- :inherited-members:
+ :members: getData, getRgbaImageData,
+ getOrigin, setOrigin,
+ getScale, setScale,
+ isDraggable,
+ getAlpha, setAlpha,
+ getColormap, setColormap,
+ getAlternativeImageData
.. autoclass:: ImageRgba
- :members:
- :inherited-members:
+ :members: getData, getRgbaImageData,
+ getOrigin, setOrigin,
+ getScale, setScale,
+ isDraggable,
+ getAlpha, setAlpha
Scatter
-------
.. autoclass:: Scatter
- :members:
- :inherited-members:
+ :members: getValueData,
+ getData, getXData, getYData, getXErrorData, getYErrorData, setData,
+ getSymbol, setSymbol, getSymbolSize, setSymbolSize,
+ getAlpha, setAlpha,
+ getColormap, setColormap
Histogram
---------
.. autoclass:: Histogram
- :members:
- :inherited-members:
+ :members: getValueData, getBinEdgesData, getData, setData,
+ getAlpha, setAlpha,
+ getColor, setColor,
+ getYAxis, setYAxis,
+ isFill, setFill,
+ getLineWidth, setLineWidth, getLineStyle, setLineStyle
Markers
-------
.. autoclass:: Marker
- :members:
- :inherited-members:
+ :members: getText, setText, getXPosition, getYPosition, getPosition, setPosition, getConstraint,
+ getSymbol, setSymbol, getSymbolSize, setSymbolSize
.. autoclass:: XMarker
- :members:
- :inherited-members:
+ :members: getText, setText, getXPosition, getYPosition, getPosition, setPosition, getConstraint
.. autoclass:: YMarker
+ :members: getText, setText, getXPosition, getYPosition, getPosition, setPosition, getConstraint
+
+Shapes
+------
+
+.. autoclass:: Shape
+ :members: setOverlay,
+ getColor, setColor,
+ isFill, setFill,
+ getType, getPoints, setPoints
+
+Item changed signal
+-------------------
+
+Plot items emit a :attr:`Item.sigItemChanged` signal when their values are updated.
+This signal provides a flag in the following enumeration describing the modified value:
+
+.. autoclass:: ItemChangedType
:members:
- :inherited-members:
-Item
+Axis
----
-.. autoclass:: Shape
+.. autoclass:: Axis
:members:
- :inherited-members:
diff --git a/doc/source/modules/gui/plot/plot.rst b/doc/source/modules/gui/plot/plot.rst
deleted file mode 100644
index 2b8e096..0000000
--- a/doc/source/modules/gui/plot/plot.rst
+++ /dev/null
@@ -1,16 +0,0 @@
-
-.. currentmodule:: silx.gui.plot
-
-:mod:`Plot`: Full plot API
-==========================
-
-.. automodule:: silx.gui.plot.Plot
-
-.. currentmodule:: silx.gui.plot.Plot
-
-:class:`Plot` class
--------------------
-
-.. autoclass:: Plot
- :show-inheritance:
- :members:
diff --git a/doc/source/modules/gui/plot/plotactions.rst b/doc/source/modules/gui/plot/plotactions.rst
deleted file mode 100644
index 29a3656..0000000
--- a/doc/source/modules/gui/plot/plotactions.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-
-.. currentmodule:: silx.gui.plot
-
-:mod:`PlotActions`: Actions for PlotWidget
-===========================================
-
-.. currentmodule:: silx.gui.plot.PlotActions
-
-The :class:`PlotAction` is a base class used to define plot actions.
-
-Plot actions serve to add menu items or toolbar items that are associated with a method
-that can interact with the associated :class:`PlotWidget`.
-
-For an introduction to creating custom plot actions, see :doc:`plotactions_examples`.
-
-PlotActions API
----------------
-
-.. automodule:: silx.gui.plot.PlotActions
- :members:
diff --git a/doc/source/modules/gui/plot/plotwidget.rst b/doc/source/modules/gui/plot/plotwidget.rst
index df576fc..a8e7831 100644
--- a/doc/source/modules/gui/plot/plotwidget.rst
+++ b/doc/source/modules/gui/plot/plotwidget.rst
@@ -14,13 +14,8 @@ It is the basis of other plot widget, thus all plot widgets share the same API.
For an introduction and examples of the plot API, see :doc:`getting_started`.
-Plot API
---------
-
-.. currentmodule:: silx.gui.plot.Plot
-
-This is a choosen subset of the complete plot API, the full API is
-documented in :class:`silx.gui.plot.Plot`.
+:class:`PlotWidget`
+-------------------
.. currentmodule:: silx.gui.plot.PlotWidget
@@ -37,6 +32,20 @@ Those methods allow to add and update plotted data:
.. automethod:: PlotWidget.addScatter
.. automethod:: PlotWidget.addHistogram
+Get data
+........
+
+Those methods return objects providing access to plotted data:
+
+.. automethod:: PlotWidget.getCurve
+.. automethod:: PlotWidget.getImage
+.. automethod:: PlotWidget.getScatter
+.. automethod:: PlotWidget.getHistogram
+
+.. automethod:: PlotWidget.getAllCurves
+.. automethod:: PlotWidget.getAllImages
+
+
Plot markers
............
@@ -52,59 +61,40 @@ Remove data from the plot
.. automethod:: PlotWidget.clear
.. automethod:: PlotWidget.remove
-Title and labels
-................
+Title
+.....
-Those methods handle the text labels of the axes and the plot title:
+Those methods handle the plot title:
.. automethod:: PlotWidget.getGraphTitle
.. automethod:: PlotWidget.setGraphTitle
-.. automethod:: PlotWidget.getGraphXLabel
-.. automethod:: PlotWidget.setGraphXLabel
-.. automethod:: PlotWidget.getGraphYLabel
-.. automethod:: PlotWidget.setGraphYLabel
-
-Axes limits
-...........
-
-Those methods change the range of data values displayed on each axis.
-
-.. automethod:: PlotWidget.getGraphXLimits
-.. automethod:: PlotWidget.setGraphXLimits
-.. automethod:: PlotWidget.getGraphYLimits
-.. automethod:: PlotWidget.setGraphYLimits
-.. automethod:: PlotWidget.setLimits
Axes
....
-The following methods handle the display properties of the axes:
+Those two methods give access to :class:`.items.Axis` which handle the limits, scales and labels of axis:
-.. automethod:: PlotWidget.isXAxisLogarithmic
-.. automethod:: PlotWidget.setXAxisLogarithmic
-.. automethod:: PlotWidget.isYAxisLogarithmic
-.. automethod:: PlotWidget.setYAxisLogarithmic
+.. automethod:: PlotWidget.getXAxis
+.. automethod:: PlotWidget.getYAxis
-.. automethod:: PlotWidget.isYAxisInverted
-.. automethod:: PlotWidget.setYAxisInverted
+The following methods handle plot limits, aspect ratio, grid and axes display:
+
+.. automethod:: PlotWidget.setLimits
.. automethod:: PlotWidget.isKeepDataAspectRatio
.. automethod:: PlotWidget.setKeepDataAspectRatio
.. automethod:: PlotWidget.getGraphGrid
.. automethod:: PlotWidget.setGraphGrid
+.. automethod:: PlotWidget.setAxesDisplayed
Reset zoom
..........
.. automethod:: PlotWidget.resetZoom
-Those methods change the behavior of :meth:`PlotWidget.resetZoom`.
+The following methods allow to add margins around the data when performing a zoom reset:
.. automethod:: PlotWidget.getDataMargins
.. automethod:: PlotWidget.setDataMargins
-.. automethod:: PlotWidget.isXAxisAutoScale
-.. automethod:: PlotWidget.setXAxisAutoScale
-.. automethod:: PlotWidget.isYAxisAutoScale
-.. automethod:: PlotWidget.setYAxisAutoScale
Defaults
........
@@ -130,10 +120,35 @@ of the plot and to toggle the use of a crosshair cursor:
.. automethod:: PlotWidget.getGraphCursor
.. automethod:: PlotWidget.setGraphCursor
+.. automethod:: PlotWidget.isPanWithArrowKeys
+.. automethod:: PlotWidget.setPanWithArrowKeys
+
+Coordinates conversion
+......................
+
+.. automethod:: PlotWidget.getDataRange
+.. automethod:: PlotWidget.getPlotBoundsInPixels
+.. automethod:: PlotWidget.dataToPixel
+.. automethod:: PlotWidget.pixelToData
+
+Active Item
+...........
+
+.. automethod:: PlotWidget.isActiveCurveHandling
+.. automethod:: PlotWidget.setActiveCurveHandling
+.. automethod:: PlotWidget.getActiveCurveColor
+.. automethod:: PlotWidget.setActiveCurveColor
+.. automethod:: PlotWidget.getActiveCurve
+.. automethod:: PlotWidget.setActiveCurve
+.. automethod:: PlotWidget.getActiveImage
+.. automethod:: PlotWidget.setActiveImage
+
Misc.
.....
+.. automethod:: PlotWidget.getWidgetHandle
.. automethod:: PlotWidget.saveGraph
+.. automethod:: PlotWidget.setDefaultBackend
Signals
.......
@@ -141,11 +156,6 @@ Signals
The :class:`PlotWidget` provides the following Qt signals:
.. autoattribute:: PlotWidget.sigPlotSignal
-.. autoattribute:: PlotWidget.sigSetYAxisInverted
-.. autoattribute:: PlotWidget.sigSetXAxisLogarithmic
-.. autoattribute:: PlotWidget.sigSetYAxisLogarithmic
-.. autoattribute:: PlotWidget.sigSetXAxisAutoScale
-.. autoattribute:: PlotWidget.sigSetYAxisAutoScale
.. autoattribute:: PlotWidget.sigSetKeepDataAspectRatio
.. autoattribute:: PlotWidget.sigSetGraphGrid
.. autoattribute:: PlotWidget.sigSetGraphCursor
@@ -153,21 +163,33 @@ The :class:`PlotWidget` provides the following Qt signals:
.. autoattribute:: PlotWidget.sigContentChanged
.. autoattribute:: PlotWidget.sigActiveCurveChanged
.. autoattribute:: PlotWidget.sigActiveImageChanged
+.. autoattribute:: PlotWidget.sigActiveScatterChanged
.. autoattribute:: PlotWidget.sigInteractiveModeChanged
-.. Not documented:
- addItem, removeItem, clearItems
- isActiveCurveHandling, enableActiveCurveHandling,
- getActiveCurveColor, setActiveCurveColor,
- getActiveCurve, setActiveCurve,
- isCurveHidden, hideCurve,
- getActiveImage, setActiveImage,
- getAllCurves, getCurve, getImage, getAllImages,
- getScatter, getHistogram,
- setDefaultPlotPoints, setDefaultPlotLines,
- getWidgetHandle, notify, setCallback, graphCallback,
- dataToPixel, pixelToData, getPlotBoundsInPixels,
- setGraphCursorShape, pickMarker, moveMarker, pickImageOrCurve, moveImage,
- onMousePress, onMouseMove, onMouseRelease, onMouseWheel,
- isDrawModeEnabled, setDrawModeEnabled, getDrawMode,
- isZoomModeEnabled, setZoomModeEnabled,
+.. PlotWidget public API that is not documented:
+ Could be added:
+ - addItem
+ - pan
+ - getLimitsHistory
+ - isDefaultPlotPoints
+ - isDefaultPlotLines
+ - setGraphCursorShape
+ - getAutoReplot, setAutoReplot, replot
+ Should not be added:
+ * Should be private:
+ - notify, setCallback, graphCallback
+ * Use remove instead:
+ - removeCurve, removeImage, removeItem, removeMarker
+ - clearCurves, clearImages, clearItems, clearMarkers
+ * Use items instead:
+ - isCurveHidden, hideCurve
+ * Use items.axis instead:
+ - getGraphXLimits, setGraphXLimits
+ - getGraphYLimits, setGraphYLimits
+ - getGraphXLabel, setGraphXLabel
+ - getGraphYLabel, setGraphYLabel
+ - isXAxisLogarithmic, setXAxisLogarithmic
+ - isYAxisLogarithmic, setXAxisLogarithmic
+ - isXAxisAutoScale, setXAxisAutoScale
+ - isYAxisAutoScale, setYAxisAutoScale
+ - setYAxisInverted, isYAxisInverted
diff --git a/doc/source/modules/gui/plot/printpreviewtoolbutton.rst b/doc/source/modules/gui/plot/printpreviewtoolbutton.rst
new file mode 100644
index 0000000..42b3832
--- /dev/null
+++ b/doc/source/modules/gui/plot/printpreviewtoolbutton.rst
@@ -0,0 +1,8 @@
+
+.. currentmodule:: silx.gui.plot
+
+:mod:`PrintPreviewToolButton`: Print preview buttons
+====================================================
+
+.. automodule:: silx.gui.plot.PrintPreviewToolButton
+ :members:
diff --git a/doc/source/modules/gui/plot/stackview.rst b/doc/source/modules/gui/plot/stackview.rst
index 7f2442a..11c7828 100644
--- a/doc/source/modules/gui/plot/stackview.rst
+++ b/doc/source/modules/gui/plot/stackview.rst
@@ -13,7 +13,9 @@
.. autoclass:: StackView
:members:
- :exclude-members: remove, setInteractiveMode, addItem
+ :exclude-members: remove, setInteractiveMode, addItem, getActiveImage,
+ resetZoom, setYAxisInverted, isYAxisInverted, getSupportedColormaps,
+ isKeepDataAspectRatio, setKeepDataAspectRatio
:class:`StackViewMainWindow` class
----------------------------------
diff --git a/doc/source/modules/gui/plot3d/actions.rst b/doc/source/modules/gui/plot3d/actions.rst
index a2fde68..c9e3af2 100644
--- a/doc/source/modules/gui/plot3d/actions.rst
+++ b/doc/source/modules/gui/plot3d/actions.rst
@@ -1,10 +1,15 @@
-Actions
-=======
+:mod:`actions`
+==============
-:mod:`Plot3DActions`
---------------------
+.. currentmodule:: silx.gui.plot3d.actions
-.. currentmodule:: silx.gui.plot3d.Plot3DActions
+.. automodule:: silx.gui.plot3d.actions
+ :members:
+
+.. automodule:: silx.gui.plot3d.actions.io
+ :members:
-.. automodule:: silx.gui.plot3d.Plot3DActions
+.. automodule:: silx.gui.plot3d.actions.mode
:members:
+
+.. autoclass:: Plot3DAction
diff --git a/doc/source/modules/gui/plot3d/dev.rst b/doc/source/modules/gui/plot3d/dev.rst
index 757240e..96704f8 100644
--- a/doc/source/modules/gui/plot3d/dev.rst
+++ b/doc/source/modules/gui/plot3d/dev.rst
@@ -12,10 +12,10 @@ Widget-level API
Widgets are available as modules of the :mod:`silx.gui.plot3d` packages.
The :mod:`.Plot3DWidget` module provides the OpenGL canvas where the scene is rendered.
-The :mod:`.Plot3DWindow` module provides a :class:`QMainWindow` with a :class:`Plot3DWindow` as its central widget
-and toolbars: :class:`ViewpointToolBar` and :class:`Plot3DToolBar`.
-:class:`QAction` that can be associated with a :class:`Plot3DWidget` are defined in the :mod:`.Plot3DActions` module.
-Those actions are used by the :class:`Plot3DToolBar` toolbar.
+The :mod:`.Plot3DWindow` module provides a :class:`QMainWindow` with a :class:`Plot3DWindow` as its central widget,
+toolbars (:class:`InteractiveModeToolBar` and :class:`OutputToolBar`) and a :class:`ViewpointToolButton` in a toolbar.
+:class:`QAction` that can be associated with a :class:`Plot3DWidget` are defined in the :mod:`.actions` module.
+Those actions are used by the :class:`OutputToolBar` and the :class:`InteractiveModeToolBar` toolbars.
The :mod:`.ScalarFieldView` module defines the :class:`ScalarFieldView` widget that displays iso-surfaces of a 3D scalar data set and the associated classes.
The :mod:`.SFViewParamTree` module defines a :class:`SFViewParamTree.TreeView` widget that can be attached to a :class:`ScalarFieldView` to control the display.
diff --git a/doc/source/modules/gui/plot3d/index.rst b/doc/source/modules/gui/plot3d/index.rst
index 8941403..38b8f02 100644
--- a/doc/source/modules/gui/plot3d/index.rst
+++ b/doc/source/modules/gui/plot3d/index.rst
@@ -11,42 +11,7 @@
Widgets gallery
---------------
-.. |imgPlot3DWidget| image:: img/Plot3DWidget.png
- :height: 150px
- :align: middle
-
-.. |imgPlot3DWindow| image:: img/Plot3DWindow.png
- :height: 150px
- :align: middle
-
-.. |imgScalarFieldView| image:: img/ScalarFieldView.png
- :height: 150px
- :align: middle
-
-.. |imgSFViewParamTree| image:: img/SFViewParamTree.png
- :height: 150px
- :align: middle
-
-.. list-table::
- :widths: 1 4
- :header-rows: 1
-
- * - Widget
- - Description
- * - |imgScalarFieldView|
- - :class:`ScalarFieldView` is a :class:`Plot3DWindow` dedicated to display 3D scalar field.
- It can display iso-surfaces and an interactive cutting plane.
- Sample code: :doc:`viewer3dvolume_example`.
- * - |imgPlot3DWindow|
- - :class:`Plot3DWindow` is a :class:`QMainWindow` with a :class:`Plot3DWidget` as central widget
- and toolbars.
- * - |imgPlot3DWidget|
- - :class:`Plot3DWidget` is the base Qt widget providing an OpenGL 3D scene.
- Other widgets are using this widget as the OpenGL scene canvas.
- * - |imgSFViewParamTree|
- - :class:`SFViewParamTree` is a :class:`QTreeView` widget that can be attached to a :class:`ScalarFieldView`.
- It displays current parameters of the :class:`ScalarFieldView` and allows to modify it.
- Sample code: :doc:`viewer3dvolume_example`.
+See :ref:`plot3d-gallery` gallery.
Public modules
--------------
@@ -60,7 +25,7 @@ The following sub-modules are available:
plot3dwindow.rst
scalarfieldview.rst
sfviewparamtree.rst
- toolbars.rst
+ tools.rst
actions.rst
diff --git a/doc/source/modules/gui/plot3d/scalarfieldview.rst b/doc/source/modules/gui/plot3d/scalarfieldview.rst
index 763c18e..80127ea 100644
--- a/doc/source/modules/gui/plot3d/scalarfieldview.rst
+++ b/doc/source/modules/gui/plot3d/scalarfieldview.rst
@@ -21,13 +21,6 @@ Helper classes
Those classes are used by :class:`ScalarFieldView`.
-:class:`Colormap`
-+++++++++++++++++
-
-.. autoclass:: Colormap
- :show-inheritance:
- :members:
-
:class:`CutPlane`
+++++++++++++++++
diff --git a/doc/source/modules/gui/plot3d/toolbars.rst b/doc/source/modules/gui/plot3d/toolbars.rst
deleted file mode 100644
index df4b4ef..0000000
--- a/doc/source/modules/gui/plot3d/toolbars.rst
+++ /dev/null
@@ -1,29 +0,0 @@
-Toolbars
-========
-
-
-:mod:`ViewpointToolbar`
------------------------
-
-.. currentmodule:: silx.gui.plot3d.ViewpointToolBar
-
-.. automodule:: silx.gui.plot3d.ViewpointToolBar
-
-.. autoclass:: ViewpointActionGroup
- :show-inheritance:
- :members:
-
-.. autoclass:: ViewpointToolBar
- :show-inheritance:
- :members:
-
-:mod:`Plot3DToolbar`
---------------------
-
-.. currentmodule:: silx.gui.plot3d.Plot3DToolBar
-
-.. automodule:: silx.gui.plot3d.Plot3DToolBar
-
-.. autoclass:: Plot3DToolBar
- :show-inheritance:
- :members:
diff --git a/doc/source/modules/gui/plot3d/tools.rst b/doc/source/modules/gui/plot3d/tools.rst
new file mode 100644
index 0000000..6cd433b
--- /dev/null
+++ b/doc/source/modules/gui/plot3d/tools.rst
@@ -0,0 +1,40 @@
+:mod:`tools`
+============
+
+.. currentmodule:: silx.gui.plot3d.tools
+
+.. automodule:: silx.gui.plot3d.tools
+
+Toolbars
+--------
+
+:class:`InteractiveModeToolbar`
++++++++++++++++++++++++++++++++
+
+.. autoclass:: InteractiveModeToolBar
+ :show-inheritance:
+ :members:
+
+:class:`OutputToolBar`
+++++++++++++++++++++++
+
+.. autoclass:: OutputToolBar
+ :show-inheritance:
+ :members:
+
+:class:`ViewpointToolbar`
++++++++++++++++++++++++++
+
+.. autoclass:: ViewpointToolBar
+ :show-inheritance:
+ :members:
+
+Tool Buttons
+------------
+
+:class:`ViewpointToolButton`
+++++++++++++++++++++++++++++
+
+.. autoclass:: ViewpointToolButton
+ :show-inheritance:
+ :members:
diff --git a/doc/source/modules/gui/widgets/img/FrameBrowser.png b/doc/source/modules/gui/widgets/img/FrameBrowser.png
new file mode 100644
index 0000000..c5624f7
--- /dev/null
+++ b/doc/source/modules/gui/widgets/img/FrameBrowser.png
Binary files differ
diff --git a/doc/source/modules/gui/widgets/img/HorizontalSliderWithBrowser.png b/doc/source/modules/gui/widgets/img/HorizontalSliderWithBrowser.png
new file mode 100644
index 0000000..d64b2df
--- /dev/null
+++ b/doc/source/modules/gui/widgets/img/HorizontalSliderWithBrowser.png
Binary files differ
diff --git a/doc/source/modules/gui/widgets/img/PeriodicCombo.png b/doc/source/modules/gui/widgets/img/PeriodicCombo.png
new file mode 100644
index 0000000..e0b40c2
--- /dev/null
+++ b/doc/source/modules/gui/widgets/img/PeriodicCombo.png
Binary files differ
diff --git a/doc/source/modules/gui/widgets/img/PeriodicList.png b/doc/source/modules/gui/widgets/img/PeriodicList.png
new file mode 100644
index 0000000..d1e540b
--- /dev/null
+++ b/doc/source/modules/gui/widgets/img/PeriodicList.png
Binary files differ
diff --git a/doc/source/modules/gui/widgets/img/PeriodicTable.png b/doc/source/modules/gui/widgets/img/PeriodicTable.png
new file mode 100644
index 0000000..c06dded
--- /dev/null
+++ b/doc/source/modules/gui/widgets/img/PeriodicTable.png
Binary files differ
diff --git a/doc/source/modules/gui/widgets/img/TableWidget.png b/doc/source/modules/gui/widgets/img/TableWidget.png
new file mode 100644
index 0000000..a0f819f
--- /dev/null
+++ b/doc/source/modules/gui/widgets/img/TableWidget.png
Binary files differ
diff --git a/doc/source/modules/gui/widgets/img/ThreadPoolPushButton.png b/doc/source/modules/gui/widgets/img/ThreadPoolPushButton.png
new file mode 100644
index 0000000..4710d16
--- /dev/null
+++ b/doc/source/modules/gui/widgets/img/ThreadPoolPushButton.png
Binary files differ
diff --git a/doc/source/modules/gui/widgets/img/WaitingPushButton.png b/doc/source/modules/gui/widgets/img/WaitingPushButton.png
new file mode 100644
index 0000000..fa1d51a
--- /dev/null
+++ b/doc/source/modules/gui/widgets/img/WaitingPushButton.png
Binary files differ
diff --git a/doc/source/modules/gui/widgets/index.rst b/doc/source/modules/gui/widgets/index.rst
index 2284f22..72f89a8 100644
--- a/doc/source/modules/gui/widgets/index.rst
+++ b/doc/source/modules/gui/widgets/index.rst
@@ -14,6 +14,7 @@ Public modules:
framebrowser.rst
periodictable.rst
+ printpreview.rst
tablewidget.rst
threadpoolpushbutton.rst
waitingpushbutton.rst
diff --git a/doc/source/modules/gui/widgets/printpreview.rst b/doc/source/modules/gui/widgets/printpreview.rst
new file mode 100644
index 0000000..d0b7999
--- /dev/null
+++ b/doc/source/modules/gui/widgets/printpreview.rst
@@ -0,0 +1,60 @@
+
+.. currentmodule:: silx.gui.widgets
+
+:mod:`PrintPreview`: Print preview dialog
+-----------------------------------------
+
+.. automodule:: silx.gui.widgets.PrintPreview
+
+Widgets
++++++++
+
+.. autoclass:: silx.gui.widgets.PrintPreview.PrintPreviewDialog
+ :members:
+ :exclude-members: printDialog, showEvent
+ :show-inheritance:
+
+
+.. autoclass:: silx.gui.widgets.PrintPreview.SingletonPrintPreviewDialog
+ :show-inheritance:
+
+Example
++++++++
+
+.. code-block:: python
+
+ import sys
+ from silx.gui import qt
+ from silx.gui.widgets import PrintPreviewDialog
+
+ a = qt.QApplication(sys.argv)
+
+ if len(sys.argv) < 2:
+ print("give an image file as parameter please.")
+ sys.exit(1)
+
+ if len(sys.argv) > 2:
+ print("only one parameter please.")
+ sys.exit(1)
+
+ filename = sys.argv[1]
+ w = PrintPreviewDialog()
+ w.resize(400, 500)
+
+ comment = ""
+ for i in range(20):
+ comment += "Line number %d: En un lugar de La Mancha de cuyo nombre ...\n"
+
+ if filename[-3:] == "svg":
+ item = qt.QSvgRenderer(filename, w.page)
+ w.addSvgItem(item, title=filename,
+ comment=comment, commentPosition="CENTER")
+ else:
+ w.addPixmap(qt.QPixmap.fromImage(qt.QImage(filename)),
+ title=filename,
+ comment=comment,
+ commentPosition="CENTER")
+ w.addImage(qt.QImage(filename), comment=comment, commentPosition="LEFT")
+
+ w.exec_()
+ a.exec_()