# eric6.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

E5MainWindow

### Class Attributes

windows

### Class Methods

None

### Methods

IconEditorWindow | Constructor
__about | Private slot to show a little About message.
__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 | Private 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.
__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 | Protected event handler for the close event.
event | Public method handling events.
gestureEvent | Protected method handling gesture events.
setRecentPaths | Public method to set the last open and save paths.
wheelEvent | Protected method to handle wheel events.

### Static Methods

None

#### IconEditorWindow (Constructor)

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

Constructor

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

#### IconEditorWindow.__about

__about()

Private slot to show a little About message.

#### 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).

#### 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()

Private 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.

Returns:
  flag indicating success (boolean)

#### IconEditorWindow.__saveIconAs

__saveIconAs()

Private slot to save the icon with a new name.

Returns:
  flag indicating success (boolean)

#### IconEditorWindow.__saveIconFile

__saveIconFile(fileName)

Private method to save to the given file.

fileName
  name of the file to save to (string)

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)

#### IconEditorWindow.__strippedName

__strippedName(fullFileName)

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

fullFileName
  full pathname of the given file (string)

Returns:
  filename part (string)

#### 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.__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)

Protected 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.

#### IconEditorWindow.event

event(evt)

Public method handling events.

evt
  reference to the event (QEvent)

Returns:
  flag indicating, if the event was handled (boolean)

#### IconEditorWindow.gestureEvent

gestureEvent(evt)

Protected method handling gesture events.

evt
  reference to the gesture event (QGestureEvent

#### IconEditorWindow.setRecentPaths

setRecentPaths(openPath, savePath)

Public method to set the last open and save paths.

openPath
  least recently used open path (string)
savePath
  least recently used save path (string)

#### IconEditorWindow.wheelEvent

wheelEvent(evt)

Protected method to handle wheel events.

evt
  reference to the wheel event (QWheelEvent)

Up