icons: Set of icons

Set of icons for buttons.

Use getQIcon() to create Qt QIcon from the name identifying an icon.

class silx.gui.icons.AbstractAnimatedIcon(parent=None)[source]

Store an animated icon.

It provides an event containing the new icon everytime it is updated.

iconChanged

Signal sent with a QIcon everytime the animation changed.

register(obj)[source]

Register an object to the AnimatedIcon. If no object are registred, the animation is paused. Object are stored in a weaked list.

Parameters:obj (object) – An object
unregister(obj)[source]

Remove the object from the registration. If no object are registred the animation is paused.

Parameters:obj (object) – A registered object
hasRegistredObjects()[source]

Returns true if any object is registred.

Return type:bool
isRegistered(obj)[source]

Returns true if the object is registred in the AnimatedIcon.

Parameters:obj (object) – An object
Return type:bool
currentIcon()[source]

Returns the icon of the current frame.

Return type:qt.QIcon
class silx.gui.icons.MovieAnimatedIcon(filename, parent=None)[source]

Store a looping QMovie to provide icons for each frames. Provides an event with the new icon everytime the movie frame is updated.

class silx.gui.icons.MultiImageAnimatedIcon(filename, parent=None)[source]

Store a looping QMovie to provide icons for each frames. Provides an event with the new icon everytime the movie frame is updated.

class silx.gui.icons.AnimatedIcon(*args, **kwargs)[source]

Store a looping QMovie to provide icons for each frames. Provides an event with the new icon everytime the movie frame is updated.

It may not be available anymore for the silx release 0.6.

Deprecated since version 0.5: Use MovieAnimatedIcon instead.

silx.gui.icons.getWaitIcon()[source]

Returns a cached version of the waiting AbstractAnimatedIcon.

Return type:AbstractAnimatedIcon
silx.gui.icons.getAnimatedIcon(name)[source]

Create an AbstractAnimatedIcon from a resource name.

The resource name can be prefixed by the name of a resource directory. For example “silx:foo.png” identify the resource “foo.png” from the resource directory “silx”.

If no prefix are specified, the file with be returned from the silx resource directory with a specific path “gui/icons”.

See also silx.resources.register_resource_directory().

Try to load a mng or a gif file, then try to load a multi-image animated icon.

In Qt5 mng or gif are not used, because the transparency is not very well managed.

Parameters:name (str) – Name of the icon, in one of the defined icons in this module.
Returns:Corresponding AbstractAnimatedIcon
Raises:ValueError when name is not known
silx.gui.icons.getQIcon(name)[source]

Create a QIcon from its name.

The resource name can be prefixed by the name of a resource directory. For example “silx:foo.png” identify the resource “foo.png” from the resource directory “silx”.

If no prefix are specified, the file with be returned from the silx resource directory with a specific path “gui/icons”.

See also silx.resources.register_resource_directory().

Parameters:name (str) – Name of the icon, in one of the defined icons in this module.
Returns:Corresponding QIcon
Raises:ValueError when name is not known
silx.gui.icons.getQPixmap(name)[source]

Create a QPixmap from its name.

The resource name can be prefixed by the name of a resource directory. For example “silx:foo.png” identify the resource “foo.png” from the resource directory “silx”.

If no prefix are specified, the file with be returned from the silx resource directory with a specific path “gui/icons”.

See also silx.resources.register_resource_directory().

Parameters:name (str) – Name of the icon, in one of the defined icons in this module.
Returns:Corresponding QPixmap
Raises:ValueError when name is not known
silx.gui.icons.getQFile(name)[source]

Create a QFile from an icon name. Filename is found according to supported Qt formats.

The resource name can be prefixed by the name of a resource directory. For example “silx:foo.png” identify the resource “foo.png” from the resource directory “silx”.

If no prefix are specified, the file with be returned from the silx resource directory with a specific path “gui/icons”.

See also silx.resources.register_resource_directory().

Parameters:name (str) – Name of the icon, in one of the defined icons in this module.
Returns:Corresponding QFile
Return type:qt.QFile
Raises:ValueError when name is not known

Available icons

Icon Name
3d-plane-normal-x 3d-plane-normal-x
3d-plane-normal-y 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 crop
crosshair crosshair
cube-back cube-back
cube-bottom cube-bottom
cube-front cube-front
cube-left cube-left
cube-right cube-right
cube-rotate cube-rotate
cube-top cube-top
cube cube
document-open document-open
document-print document-print
document-save document-save
draw-brush draw-brush
draw-pencil draw-pencil
draw-rubber draw-rubber
edit-copy edit-copy
first first
folder folder
image-mask image-mask
image-select-add image-select-add
image-select-box image-select-box
image-select-brush image-select-brush
image-select-erase-rubber image-select-erase-rubber
image-select-erase image-select-erase
image image
item-0dim item-0dim
item-1dim item-1dim
item-2dim item-2dim
item-3dim 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 math-derive
math-energy math-energy
math-fit math-fit
math-imaginary math-imaginary
math-normalize math-normalize
math-peak-reset math-peak-reset
math-peak-search 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 math-smooth
math-substract math-substract
math-swap-sign 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 plot-grid
plot-roi-above plot-roi-above
plot-roi-below plot-roi-below
plot-roi-between plot-roi-between
plot-roi-reset plot-roi-reset
plot-roi plot-roi
plot-toggle-points plot-toggle-points
plot-widget plot-widget
plot-window-image plot-window-image
plot-window plot-window
plot-xauto plot-xauto
plot-xlog plot-xlog
plot-yauto plot-yauto
plot-ydown plot-ydown
plot-ylog plot-ylog
plot-yup plot-yup
previous previous
profile-clear profile-clear
profile1D profile1D
profile2D profile2D
remove remove
rotate-3d rotate-3d
rudder rudder
selected selected
shape-circle-solid shape-circle-solid
shape-circle shape-circle
shape-diagonal shape-diagonal
shape-ellipse-solid shape-ellipse-solid
shape-ellipse shape-ellipse
shape-horizontal shape-horizontal
shape-polygon shape-polygon
shape-rectangle shape-rectangle
shape-square shape-square
shape-vertical shape-vertical
silx silx
sliders-off sliders-off
sliders-on sliders-on
spec spec
view-1d view-1d
view-2d-stack view-2d-stack
view-2d view-2d
view-3d view-3d
view-fullscreen view-fullscreen
view-hdf5 view-hdf5
view-nexus view-nexus
view-nofullscreen view-nofullscreen
view-raw view-raw
view-refresh view-refresh
view-text view-text
window-new window-new
zoom-back zoom-back
zoom-in zoom-in
zoom-original zoom-original
zoom-out zoom-out
zoom zoom