# eric3.Tools.UIPreviewer

Module implementing the UI Previewer main window.

### Classes

UIPreviewer | Class implementing the UI Previewer main window.

### Functions

None

## UIPreviewer

Class implementing the UI Previewer main window.

### Derived from

QMainWindow

### Methods

UIPreviewer | Constructor
eventFilter | Protected method called to filter an event.
handleAbout | Private slot to show the about information.
handleAboutQt | Private slot to show info about Qt.
handleCloseEvent | Private slot to handle the close event of a viewed QMainWidget.
handleCopy | Private slot to handle the Copy Image menu action.
handleOpenFile | Private slot to load a new file.
handlePrint | Private slot to handle the Print Image menu action.
handleSaveImage | Private slot to handle the Save Image menu action.
handleStyleSelected | Private slot to handle the selection of a GUI style.
initActions | Private method to define the user interface actions.
initMenus | Private method to create the menus.
initToolbars | Private method to create the toolbars.
loadFile | Private slot to load a ui file.
show | Public slot to show this dialog.
updateActions | Private slot to update the actions state.
updateChildren | Private slot to change the style of the show UI.

### UIPreviewer (Constructor)

UIPreviewer(filename = None, parent = None, name = None)

Constructor

filename
  name of a UI file to load
parent
  parent widget of this window (QWidget)
name
  name of this window (string or QString)

### UIPreviewer.eventFilter

eventFilter(obj, ev)

Protected method called to filter an event.

object
  object, that generated the event (QObject)
event
  the event, that was generated by object (QEvent)

Returns:
  flag indicating if event was filtered out

### UIPreviewer.handleAbout

handleAbout()

Private slot to show the about information.

### UIPreviewer.handleAboutQt

handleAboutQt()

Private slot to show info about Qt.

### UIPreviewer.handleCloseEvent

handleCloseEvent()

Private slot to handle the close event of a viewed QMainWidget.

### UIPreviewer.handleCopy

handleCopy()

Private slot to handle the Copy Image menu action.

### UIPreviewer.handleOpenFile

handleOpenFile()

Private slot to load a new file.

### UIPreviewer.handlePrint

handlePrint()

Private slot to handle the Print Image menu action.

### UIPreviewer.handleSaveImage

handleSaveImage()

Private slot to handle the Save Image menu action.

### UIPreviewer.handleStyleSelected

handleStyleSelected(selectedStyle)

Private slot to handle the selection of a GUI style.

selectedStyle
  name of the selected style (QString)

### UIPreviewer.initActions

initActions()

Private method to define the user interface actions.

### UIPreviewer.initMenus

initMenus()

Private method to create the menus.

### UIPreviewer.initToolbars

initToolbars()

Private method to create the toolbars.

### UIPreviewer.loadFile

loadFile(fn)

Private slot to load a ui file.

fn
  name of the ui file to be laoded (string or QString)

### UIPreviewer.show

show()

Public slot to show this dialog. This overloaded slot loads a UI file to be previewed after the main window has been shown. This way, previewing a dialog doesn't interfere with showing the main window.

### UIPreviewer.updateActions

updateActions()

Private slot to update the actions state.

### UIPreviewer.updateChildren

updateChildren(style)

Private slot to change the style of the show UI.

style
  name of the selected style (QString)

Up