# eric4.IconEditor.IconEditorWindow

Module implementing the icon editor main window.

### Global Attributes

None

### Classes

IconEditorWindow | Class implementing the web browser main window.

### Functions

None

## IconEditorWindow

Class implementing the web browser main window.

### Signals

editorClosed()
  emitted after the window was requested to close down

### Derived from

KQMainWindow

### Class Attributes

windows

### Class Methods

None

### Methods

IconEditorWindow | Constructor
__about | Private slot to show a little About message.
__aboutKde | Private slot to handle the About KDE dialog.
__aboutQt | Private slot to handle the About Qt dialog.
__checkActions | Private slot to check some actions for their enable/disable status.
__closeAll | Private slot to close all other windows.
__createPaletteDock | Private method to initialize the palette dock widget.
__createStatusBar | Private method to initialize the status bar.
__initActions | Private method to define the user interface actions.
__initEditActions | Private method to create the Edit actions.
__initFileActions | Private method to define the file related user interface actions.
__initFileFilters | Private method to define the supported image file filters.
__initHelpActions | Private method to create the Help actions.
__initMenus | Private method to create the menus.
__initToolbars | Private method to create the toolbars.
__initToolsActions | Private method to create the View actions.
__initViewActions | Private method to create the View actions.
__loadIconFile | Private method to load an icon file.
__maybeSave | Private method to ask the user to save the file, if it was modified.
__modificationChanged | Private slot to handle the modificationChanged signal.
__newIcon | Private slot to create a new icon.
__newWindow | Public slot called to open a new icon editor window.
__openIcon | Private slot to open an icon file.
__saveIcon | Private slot to save the icon.
__saveIconAs | Private slot to save the icon with a new name.
__saveIconFile | Private method to save to the given file.
__setCurrentFile | Private method to register the file name of the current file.
__strippedName | Private method to return the filename part of the given path.
__updatePosition | Private slot to show the current cursor position.
__updateSize | Private slot to show the current icon size.
__updateZoom | Private slot to show the current zoom factor.
__whatsThis | Private slot called in to enter Whats This mode.
__zoom | Private method to handle the zoom action.
__zoomIn | Private slot called to handle the zoom in action.
__zoomOut | Private slot called to handle the zoom out action.
__zoomReset | Private slot called to handle the zoom reset action.
closeEvent | Private event handler for the close event.

### Static Methods

None

#### IconEditorWindow (Constructor)

IconEditorWindow(fileName = "", parent = None, fromEric = False, initShortcutsOnly = False)

Constructor

fileName
  name of a file to load on startup (string or QString)
parent
  parent widget of this window (QWidget)
fromEric=
  flag indicating whether it was called from within eric4 (boolean)
initShortcutsOnly=
  flag indicating to just initialize the keyboard shortcuts (boolean)

#### IconEditorWindow.__about

__about()

Private slot to show a little About message.

#### IconEditorWindow.__aboutKde

__aboutKde()

Private slot to handle the About KDE dialog.

#### IconEditorWindow.__aboutQt

__aboutQt()

Private slot to handle the About Qt dialog.

#### IconEditorWindow.__checkActions

__checkActions()

Private slot to check some actions for their enable/disable status.

#### IconEditorWindow.__closeAll

__closeAll()

Private slot to close all other windows.

#### IconEditorWindow.__createPaletteDock

__createPaletteDock()

Private method to initialize the palette dock widget.

#### IconEditorWindow.__createStatusBar

__createStatusBar()

Private method to initialize the status bar.

#### IconEditorWindow.__initActions

__initActions()

Private method to define the user interface actions.

#### IconEditorWindow.__initEditActions

__initEditActions()

Private method to create the Edit actions.

#### IconEditorWindow.__initFileActions

__initFileActions()

Private method to define the file related user interface actions.

#### IconEditorWindow.__initFileFilters

__initFileFilters()

Private method to define the supported image file filters.

#### IconEditorWindow.__initHelpActions

__initHelpActions()

Private method to create the Help actions.

#### IconEditorWindow.__initMenus

__initMenus()

Private method to create the menus.

#### IconEditorWindow.__initToolbars

__initToolbars()

Private method to create the toolbars.

#### IconEditorWindow.__initToolsActions

__initToolsActions()

Private method to create the View actions.

#### IconEditorWindow.__initViewActions

__initViewActions()

Private method to create the View actions.

#### IconEditorWindow.__loadIconFile

__loadIconFile(fileName)

Private method to load an icon file.

fileName
  name of the icon file to load (string or QString).

#### IconEditorWindow.__maybeSave

__maybeSave()

Private method to ask the user to save the file, if it was modified.

Returns:
  flag indicating, if it is ok to continue (boolean)

#### IconEditorWindow.__modificationChanged

__modificationChanged(m)

Private slot to handle the modificationChanged signal.

m
  modification status

#### IconEditorWindow.__newIcon

__newIcon()

Private slot to create a new icon.

#### IconEditorWindow.__newWindow

__newWindow()

Public slot called to open a new icon editor window.

#### IconEditorWindow.__openIcon

__openIcon()

Private slot to open an icon file.

#### IconEditorWindow.__saveIcon

__saveIcon()

Private slot to save the icon.

#### IconEditorWindow.__saveIconAs

__saveIconAs()

Private slot to save the icon with a new name.

#### IconEditorWindow.__saveIconFile

__saveIconFile(fileName)

Private method to save to the given file.

fileName
  name of the file to save to (string or QString)

Returns:
  flag indicating success (boolean)

#### IconEditorWindow.__setCurrentFile

__setCurrentFile(fileName)

Private method to register the file name of the current file.

fileName
  name of the file to register (string or QString)

#### IconEditorWindow.__strippedName

__strippedName(fullFileName)

Private method to return the filename part of the given path.

fullFileName
  full pathname of the given file (QString)

Returns:
  filename part (QString)

#### IconEditorWindow.__updatePosition

__updatePosition(x, y)

Private slot to show the current cursor position.

x
  x-coordinate (integer)
y
  y-coordinate (integer)

#### IconEditorWindow.__updateSize

__updateSize(w, h)

Private slot to show the current icon size.

w
  width of the icon (integer)
h
  height of the icon (integer)

#### IconEditorWindow.__updateZoom

__updateZoom()

Private slot to show the current zoom factor.

#### IconEditorWindow.__whatsThis

__whatsThis()

Private slot called in to enter Whats This mode.

#### IconEditorWindow.__zoom

__zoom()

Private method to handle the zoom action.

#### IconEditorWindow.__zoomIn

__zoomIn()

Private slot called to handle the zoom in action.

#### IconEditorWindow.__zoomOut

__zoomOut()

Private slot called to handle the zoom out action.

#### IconEditorWindow.__zoomReset

__zoomReset()

Private slot called to handle the zoom reset action.

#### IconEditorWindow.closeEvent

closeEvent(evt)

Private event handler for the close event.

evt
  the close event (QCloseEvent)
  This event is simply accepted after the history has been saved and all window references have been deleted.

Up