# class KMimeTypeChooser

###

Module | kio
Namespace |
Class | KMimeTypeChooser
Inherits | KVBox

This widget provides a checkable list of all available mimetypes, and a list of selected ones, as well as a corresponding list of file extensions, an optional text and an optional edit button (not working yet). Mime types is presented in a list view, with name, comment and patterns columns.

Author Anders Lund (anders at alweb dk), jan 23, 2002

### enums

- Visuals { Comments, Patterns, EditButton }

enum details

### methods

- KMimeTypeChooser (text, selectedMimeTypes, defaultGroup, groupsToShow, visuals, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  text | QString | QString()
  selectedMimeTypes | QStringList | QStringList()
  defaultGroup | QString | QString()
  groupsToShow | QStringList | QStringList()
  visuals | int | Comments|Patterns|EditButton
  parent | QWidget | 0

  Create a new KMimeTypeChooser.

  text - A Text to display above the list

  selectedMimeTypes - A list of mimetype names, theese will be checked in the list if they exist.

  visuals - A OR'd Visuals enum to decide which data and buttons to display.

  defaultGroup - The group to open when no groups are selected (like "text"). If not provided, no group is opened. If groupsToShow is provided and defaultGroup is not a member of that, it is ignored.

  groupsToShow - a list of mimetype groups to show. If empty, all groups are shown.

  parent - The parent widget to use

- KMimeTypeChooser (a0, a1, a2, a3, a4, a5)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QString | QString()
  a1 | QStringList | QStringList()
  a2 | QString | QString()
  a3 | QStringList | QStringList()
  a4 | int | Comments|Patterns|EditButton
  a5 | QWidget | 0

- mimeTypes ( )

  returns QStringList

  Returns a list of all selected selected mimetypes represented by their name.

- patterns ( )

  returns QStringList

  Returns a list of the fileame patterns associated with all selected mimetypes.

### enums - detail

- Visuals { Comments, Patterns, EditButton }

  Buttons and data for display.

  | Comments | - 1 | - |
  | Patterns | - 2 | - |
  | EditButton | - 4 | - |