# eric4.Graphics.PixmapDiagram

Module implementing a dialog showing a pixmap.

### Global Attributes

None

### Classes

PixmapDiagram | Class implementing a dialog showing a pixmap.

### Functions

None

## PixmapDiagram

Class implementing a dialog showing a pixmap.

### Derived from

KQMainWindow

### Class Attributes

None

### Class Methods

None

### Methods

PixmapDiagram | Constructor
__adjustScrollBar | Private method to adjust a scrollbar by a certain factor.
__doZoom | Private method to perform the zooming.
__initActions | Private method to initialize the view actions.
__initContextMenu | Private method to initialize the context menu.
__initToolBars | Private method to populate the toolbars with our actions.
__print | Private slot to the actual printing.
__printDiagram | Private slot called to print the diagram.
__printPreviewDiagram | Private slot called to show a print preview of the diagram.
__showContextMenu | Private slot to show the context menu of the listview.
__showPixmap | Private method to show a file.
__zoom | Private method to handle the zoom context menu action.
__zoomIn | Private method to handle the zoom in context menu entry.
__zoomOut | Private method to handle the zoom out context menu entry.
__zoomReset | Private method to handle the reset zoom context menu entry.
getDiagramName | Method to retrieve a name for the diagram.
getStatus | Method to retrieve the status of the canvas.

### Static Methods

None

#### PixmapDiagram (Constructor)

PixmapDiagram(pixmap, parent = None, name = None)

Constructor

pixmap
  filename of a graphics file to show (QString or string)
parent
  parent widget of the view (QWidget)
name
  name of the view widget (QString or string)

#### PixmapDiagram.__adjustScrollBar

__adjustScrollBar(scrollBar, factor)

Private method to adjust a scrollbar by a certain factor.

scrollBar
  reference to the scrollbar object (QScrollBar)
factor
  factor to adjust by (float)

#### PixmapDiagram.__doZoom

__doZoom(factor)

Private method to perform the zooming.

factor
  zoom factor (float)

#### PixmapDiagram.__initActions

__initActions()

Private method to initialize the view actions.

#### PixmapDiagram.__initContextMenu

__initContextMenu()

Private method to initialize the context menu.

#### PixmapDiagram.__initToolBars

__initToolBars()

Private method to populate the toolbars with our actions.

#### PixmapDiagram.__print

__print(printer)

Private slot to the actual printing.

printer
  reference to the printer object (QPrinter)

#### PixmapDiagram.__printDiagram

__printDiagram()

Private slot called to print the diagram.

#### PixmapDiagram.__printPreviewDiagram

__printPreviewDiagram()

Private slot called to show a print preview of the diagram.

#### PixmapDiagram.__showContextMenu

__showContextMenu(coord)

Private slot to show the context menu of the listview.

coord
  the position of the mouse pointer (QPoint)

#### PixmapDiagram.__showPixmap

__showPixmap(filename)

Private method to show a file.

filename
  name of the file to be shown (string or QString)

Returns:
  flag indicating success

#### PixmapDiagram.__zoom

__zoom()

Private method to handle the zoom context menu action.

#### PixmapDiagram.__zoomIn

__zoomIn()

Private method to handle the zoom in context menu entry.

#### PixmapDiagram.__zoomOut

__zoomOut()

Private method to handle the zoom out context menu entry.

#### PixmapDiagram.__zoomReset

__zoomReset()

Private method to handle the reset zoom context menu entry.

#### PixmapDiagram.getDiagramName

getDiagramName()

Method to retrieve a name for the diagram.

Returns:
  name for the diagram

#### PixmapDiagram.getStatus

getStatus()

Method to retrieve the status of the canvas.

Returns:
  flag indicating a successful pixmap loading (boolean)

Up