6.103. sibl_gui.components.addons.preview.imagesPreviewer

preview.py

Platform:
Windows, Linux, Mac Os X.
Description:
This module defines the Preview Component Interface class, the ImagesPreviewer class and others images preview related objects.

Others:

6.103.1. Module Attributes

sibl_gui.components.addons.preview.imagesPreviewer.LOGGER
sibl_gui.components.addons.preview.imagesPreviewer.UI_FILE

6.103.2. Classes

class sibl_gui.components.addons.preview.imagesPreviewer.Image_QGraphicsItem(parent=None, image=None)[source]

Bases: PyQt4.QtGui.QGraphicsItem

This class is a QGraphicsItem subclass used
to display given QImage.
Parameters:
  • parent – Object parent. ( QObject )
  • image – Image. ( QImage )
image[source]

This method is the property for self.__image attribute.

Returns:self.__image. ( QImage )
width[source]

This method is the property for self.__width attribute.

Returns:self.__width. ( Integer )
height[source]

This method is the property for self.__height attribute.

Returns:self.__height. ( Integer )
boundingRect()[source]

This method reimplements the QGraphicsItem.boundingRect() method.

paint(painter, options, widget)[source]

This method reimplements the QGraphicsItem.paint() method.

Parameters:
  • painter – QPainter ( QPainter )
  • options – QStyleOptionGraphicsItem ( QStyleOptionGraphicsItem )
  • widget – QWidget ( QWidget )
class sibl_gui.components.addons.preview.imagesPreviewer.ImagesPreviewer(parent, paths=None, *args, **kwargs)[source]

Bases: foundations.ui.common.QWidget

This class provides the Application images previewer.
It defines methods to navigate through the list of given images ( List of images paths ), zoom in / out and fit the displayed image, etc...
Parameters:
  • parent – Object parent. ( QObject )
  • paths – Images paths. ( Tuple / List )
  • *args – Arguments. ( * )
  • **kwargs – Keywords arguments. ( ** )
container[source]

This method is the property for self.__container attribute.

Returns:self.__container. ( QObject )
paths[source]

This method is the property for self.__paths attribute.

Returns:self.__paths. ( Tuple / List )
uiResourcesDirectory[source]

This method is the property for self.__uiResourcesDirectory attribute.

Returns:self.__uiResourcesDirectory. ( String )
uiPreviousImage[source]

This method is the property for self.__uiPreviousImage attribute.

Returns:self.__uiPreviousImage. ( String )
uiNextImage[source]

This method is the property for self.__uiNextImage attribute.

Returns:self.__uiNextImage. ( String )
uiZoomOutImage[source]

This method is the property for self.__uiZoomOutImage attribute.

Returns:self.__uiZoomOutImage. ( String )
uiZoomInImage[source]

This method is the property for self.__uiZoomInImage attribute.

Returns:self.__uiZoomInImage. ( String )
graphicsSceneBackgroundColor[source]

This method is the property for self.__graphicsSceneBackgroundColor attribute.

Returns:self.__graphicsSceneBackgroundColor. ( QColors )
graphicsSceneWidth[source]

This method is the property for self.__graphicsSceneWidth attribute.

Returns:self.__graphicsSceneWidth. ( Integer )
graphicsSceneHeight[source]

This method is the property for self.__graphicsSceneHeight attribute.

Returns:self.__graphicsSceneHeight. ( Object )
minimumZoomFactor[source]

This method is the property for self.__minimumZoomFactor attribute.

Returns:self.__minimumZoomFactor. ( Float )
maximumZoomFactor[source]

This method is the property for self.__maximumZoomFactor attribute.

Returns:self.__maximumZoomFactor. ( Float )
wheelZoomFactor[source]

This method is the property for self.__wheelZoomFactor attribute.

Returns:self.__wheelZoomFactor. ( Float )
keyZoomFactor[source]

This method is the property for self.__keyZoomFactor attribute.

Returns:self.__keyZoomFactor. ( Float )
graphicsView[source]

This method is the property for self.__graphicsView attribute.

Returns:self.__graphicsView. ( QGraphicsView )
graphicsScene[source]

This method is the property for self.__graphicsScene attribute.

Returns:self.__graphicsScene. ( QGraphicsScene )
displayGraphicsItem[source]

This method is the property for self.__displayGraphicsItem attribute.

Returns:self.__displayGraphicsItem. ( QGraphicsItem )
show()[source]

This method reimplements the QWidget.show() method.

closeEvent(event)[source]

This method reimplements the QWidget.closeEvent() method.

Parameters:event – QEvent ( QEvent )
wheelEvent(event)[source]

This method reimplements the QWidget.wheelEvent() method.

Parameters:event – QEvent ( QEvent )
keyPressEvent(event)[source]

This method reimplements the QWidget.keyPressEvent() method.

Parameters:event – QEvent ( QEvent )
loadImage(index=0)[source]

This method loads the display image in the View.

Parameters:index – Index to load. ( Integer )
Returns:Method success. ( Boolean )
scaleView(scaleFactor)[source]

This method scales the Previewer view.

Parameters:scaleFactor – Float ( Float )
Returns:Method success. ( Boolean )
fitWindow()[source]

This method fits the View window.

Returns:Method success. ( Boolean )
fitImage()[source]

This method fits the image to the View.

Returns:Method success. ( Boolean )
loopThroughImages(backward=False)[source]

This method loops through View images.

Parameters:backward – Looping backward. ( Boolean )
Returns:Method success. ( Boolean )