#### PyKDE - Python Bindings for KDE

# class KMimeType

Table of contents
Modules
kio Classes
All Classes

Module | kio
Class | KMimeType
Inherits | KServiceType

### methods

- KMimeType (_fullpath, _type, _icon, _comment, _patterns)

  returns a KMimeType instance

  Argument | Type | Default
  --- | --- | ---
  _fullpath | QString |
  _type | QString |
  _icon | QString |
  _comment | QString |
  _patterns | QStringList |

- KMimeType (_fullpath)

  returns a KMimeType instance

  Argument | Type | Default
  --- | --- | ---
  _fullpath | QString |

- KMimeType (config)

  returns a KMimeType instance

  Argument | Type | Default
  --- | --- | ---
  config | KDesktopFile |

- KMimeType (_str, offset)

  returns a KMimeType instance

  Argument | Type | Default
  --- | --- | ---
  _str | QDataStream |
  offset | int |

- allMimeTypes ()

  returns (KMimeType.List)
  static

- buildDefaultType ()

  returns nothing
  static

- checkEssentialMimeTypes ()

  returns nothing
  static

- comment ()

  returns (QString)

- comment (a0, a1)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  a0 | QString |
  a1 | bool |

- comment (a0, a1)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  a0 | KURL |
  a1 | bool |

- defaultMimeType ()

  returns (QString)
  static

- defaultMimeTypePtr ()

  returns (KMimeType.Ptr)
  In versions KDE 3.2.0 and above only
  static

- diagnoseFileName (file, pattern)

  returns (KMimeType.Ptr)
  In versions KDE 3.2.0 and above only
  static

  Argument | Type | Default
  --- | --- | ---
  file | QString |
  pattern | QString |

- errorMissingMimeType (_type)

  returns nothing
  static

  Argument | Type | Default
  --- | --- | ---
  _type | QString |

- favIconForURL (url)

  returns (QString)
  static

  Argument | Type | Default
  --- | --- | ---
  url | KURL |

- findByContent (data)

  returns (KMimeType.Ptr) accuracy (int)
  static

  Argument | Type | Default
  --- | --- | ---
  data | QByteArray |

- findByFileContent (fileName)

  returns (KMimeType.Ptr) accuracy (int)
  static

  Argument | Type | Default
  --- | --- | ---
  fileName | QString |

- findByPath (path, mode = 0, fast_mode = 0)

  returns (KMimeType.Ptr)
  static

  Argument | Type | Default
  --- | --- | ---
  path | QString |
  mode | mode_t | 0
  fast_mode | bool | 0

- findByURL (_url, _mode = 0, _is_local_file = 0, _fast_mode = 0)

  returns (KMimeType.Ptr)
  static

  Argument | Type | Default
  --- | --- | ---
  _url | KURL |
  _mode | mode_t | 0
  _is_local_file | bool | 0
  _fast_mode | bool | 0

- findByURL (_url, _mode, _is_local_file, _fast_mode)

  returns (KMimeType.Ptr) accurate (bool)
  In versions KDE 3.2.0 and above only
  static

  Argument | Type | Default
  --- | --- | ---
  _url | KURL |
  _mode | mode_t |
  _is_local_file | bool |
  _fast_mode | bool |

- findFormatByFileContent (fileName)

  Not Implemented

- icon (a0, a1)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  a0 | QString |
  a1 | bool |

- icon (a0, a1)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  a0 | KURL |
  a1 | bool |

- iconForURL (_url, _mode = 0)

  returns (QString)
  static

  Argument | Type | Default
  --- | --- | ---
  _url | KURL |
  _mode | mode_t | 0

- init (a0)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | KDesktopFile |

- is_ (mimeTypeName)

  returns (bool)
  Renamed: was ' is' in C++
  In versions KDE 3.2.0 and above only

  Argument | Type | Default
  --- | --- | ---
  mimeTypeName | QString |

- load (qs)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  qs | QDataStream |

- loadInternal (a0)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QDataStream |

- mimeType (_name)

  returns (KMimeType.Ptr)
  static

  Argument | Type | Default
  --- | --- | ---
  _name | QString |

- parentMimeType ()

  returns (QString)
  In versions KDE 3.2.0 and above only

- patterns ()

  returns (QStringList)

- patternsAccuracy ()

  returns (int)
  In versions KDE 3.2.0 and above only

- pixmap (group, force_size = 0, state = 0, path = 0)

  returns (QPixmap)

  Argument | Type | Default
  --- | --- | ---
  group | KIcon.Group |
  force_size | int | 0
  state | int | 0
  path | QString | 0

- pixmap (_url, _group, _force_size = 0, _state = 0, _path = 0)

  returns (QPixmap)

  Argument | Type | Default
  --- | --- | ---
  _url | KURL |
  _group | KIcon.Group |
  _force_size | int | 0
  _state | int | 0
  _path | QString | 0

- pixmapForURL (_url, _mode = 0, _group = KIcon .Desktop, _force_size = 0, _state = 0, _path = 0)

  returns (QPixmap)
  static

  Argument | Type | Default
  --- | --- | ---
  _url | KURL |
  _mode | mode_t | 0
  _group | KIcon.Group | KIcon .Desktop
  _force_size | int | 0
  _state | int | 0
  _path | QString | 0

- property (_name)

  returns (QVariant)

  Argument | Type | Default
  --- | --- | ---
  _name | QString |

- propertyNames ()

  returns (QStringList)

- save (qs)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  qs | QDataStream |