KDE 4.7 PyKDE API Reference

- KDE's Python API

# KUrlPixmapProvider Class Reference

`from PyKDE4.kio import *`

Inherits: KPixmapProvider

## Detailed Description

Implementation of KPixmapProvider.

Uses KMimeType.pixmapForURL() to resolve icons.

Instatiate this class and supply it to the desired class, e.g.

     KHistoryCombo *combo = new KHistoryCombo( this );
     combo->setPixmapProvider( new KUrlPixmapProvider );
     [...]

Resolves pixmaps for URLs

Author:
  Carsten Pfeiffer <pfeiffer@kde.org>

## Methods
| __init__ (self)
| __init__ (self, KUrlPixmapProvider other)
QPixmap | pixmapFor (self, QString url, int size=0)

## Method Documentation

__init__ | ( |  | self ) |

Creates a new url pixmap provider.

__init__ | ( | self, |
|  | KUrlPixmapProvider | other
| ) |  |  |

QPixmap pixmapFor | ( | self, |
|  | QString | url,
|  | int | size=0
| ) |  |  |

Returns a pixmap for url with size size. Uses KMimeType.pixmapForURL().

Parameters:

  | url | the URL to fetch a pixmap for
  | size | the size of the pixmap in pixels, or 0 for default.

Returns:
  the resulting pixmap

See also:
  KIconLoader.StdSizes