# class KIconTheme

###

Module | kdeui
Namespace |
Class | KIconTheme
Inherits |

Internal Class to use/access icon themes in KDE. This class is used by the iconloader but can be used by others too. You should not use this class externally. This class is exported because the KCM needs it.

See also KIconLoader

### enums

- ContextMenus { TextEditor, ReadOnlyText }

enum details

### methods

- KIconTheme (name, appName)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  appName | QString | QString()

  Load an icon theme by name.

  name - the name of the theme (e.g. "hicolor" or "keramik")

  appName - the name of the application. Can be null. This argument allows applications to have themed application icons.

- KIconTheme (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QString |
  a1 | QString | QString()

- assignIconsToContextMenu (type, actions)

  returns Nothing
  static

  Argument | Type | Default
  --- | --- | ---
  type | KIconTheme.ContextMenus |
  actions | QList<QAction |

  Assigns standard icons to the various standard text edit context menus.

- current ( )

  returns QString
  static

  Returns the current icon theme. Returns the name of the current theme

- defaultSize (group)

  returns int
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  group | KIconLoader.Group |

  The default size of this theme for a certain icon group.

  group - The icon group. See KIconLoader.Group. Returns The default size in pixels for the given icon group.

- defaultThemeName ( )

  returns QString
  static

  Returns the default icon theme. Returns the name of the default theme name

- depth ( )

  returns int

  The minimum display depth required for this theme. This can either be 8 or 32. Returns the minimum bpp (8 or 32)

- description ( )

  returns QString

  A description for the icon theme. Returns a human-readable description of the theme, QString() if there is none

- dir ( )

  returns QString

  Returns the toplevel theme directory. Returns the directory of the theme

- example ( )

  returns QString

  Return the name of the "example" icon. This can be used to present the theme to the user. Returns the name of the example icon, QString() if there is none

- hasContext (context)

  returns bool
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  context | KIconLoader.Context |

  Returns true if the theme has any icons for the given context.

- iconPath (name, size, match)

  returns K3Icon
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  size | int |
  match | KIconLoader.MatchType |

  Lookup an icon in the theme.

  name - The name of the icon, without extension.

  size - The desired size of the icon.

  match - The matching mode. KIconLoader.MatchExact returns an icon only if matches exactly. KIconLoader.MatchBest returns the best matching icon. Returns A K3Icon class that describes the icon. If an icon is found, an invalid K3Icon object otherwise.

  See also KIconLoader.isValid will return true, and false otherwise.

- inherits ( )

  returns QStringList

  The themes this icon theme falls back on. Returns a list of icon themes that are used as fall-backs

- internalName ( )

  returns QString

  The internal name of the icon theme (same as the name argument passed to the constructor). Returns the internal name of the theme

- isHidden ( )

  returns bool

  The icon theme should be hidden to the user? Returns true if the icon theme is hidden

- isValid ( )

  returns bool

  The icon theme exists? Returns true if the icon theme is valid

- list ( )

  returns QStringList
  static

  List all icon themes installed on the system, global and local. Returns the list of all icon themes

- name ( )

  returns QString

  The stylized name of the icon theme. Returns the (human-readable) name of the theme

- queryIcons (size, context)

  returns QStringList
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  size | int |
  context | KIconLoader.Context | KIconLoader.Any

  Query available icons for a size and context.

  size - the size of the icons

  context - the context of the icons Returns the list of icon names

- queryIconsByContext (size, context)

  returns QStringList
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  size | int |
  context | KIconLoader.Context | KIconLoader.Any

  Query available icons for a context and preferred size.

  size - the size of the icons

  context - the context of the icons Returns the list of icon names

- querySizes (group)

  returns QList<int>
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  group | KIconLoader.Group |

  Query available sizes for a group.

  group - The icon group. See KIconLoader.Group. Returns a list of available sized for the given group

- reconfigure ( )

  returns Nothing
  static

  Reconfigure the theme.

- screenshot ( )

  returns QString

  Return the name of the screenshot. Returns the name of the screenshot, QString() if there is none

### enums - detail

- ContextMenus { TextEditor, ReadOnlyText }

  Defines the context menus that assignIconsToContextMenus is aware of.

  For ReadOnlyText the menu is expected to have one entry.

  TextEditor is expected to have the full complement of undo, redo, cut, copy, paste and clear.

  | TextEditor | - | - |
  | ReadOnlyText | - | - |