KDE 4.2 PyKDE API Reference

- KDE's Python API

# KUriFilterPlugin Class Reference

`from PyKDE4.kio import *`

Inherits: QObject

## Detailed Description

Abstract class:
  This class can be used as a base class for new classes, but can not be instantiated directly.

## Methods

| __init__ (self, QString name, QObject parent=0)
KCModule | configModule (self, QWidget a0, QString a1)
QString | configName (self)
bool | filterUri (self, KUriFilterData data)
| setArguments (self, KUriFilterData data, QString args)
| setErrorMsg (self, KUriFilterData data, QString errmsg)
| setFilteredUri (self, KUriFilterData data, KUrl uri)
| setUriType (self, KUriFilterData data, KUriFilterData.UriTypes type)

## Method Documentation

__init__ | ( | self, |
|  | QString | name,
|  | QObject | parent=0
| ) |  |  |

Constructs a filter plugin with a given name

Parameters:

  | parent | the parent object, or 0 for no parent
  | name | the name of the plugin, mandatory

KCModule configModule | ( | self, |
|  | QWidget | a0,
|  | QString | a1
| ) |  |  |

Creates a configuration module for the filter.

It is the responsibility of the caller to delete the module once it is not needed anymore.

Returns:
  A configuration module, 0 if the filter isn't configurable.

QString configName | ( |  | self ) |

Returns the name of the configuration module for the filter.

Returns:
  the name of a configuration module or QString() if none.

bool filterUri | ( | self, |
|  | KUriFilterData | data
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

Filters a URI.

Parameters:

  | data | the URI data to be filtered.

Returns:
  A boolean indicating whether the URI has been changed.

setArguments | ( | self, |
|  | KUriFilterData | data,
|  | QString | args
| ) |  |  |

Sets the arguments and options string in data to args if any were found during filterting.

setErrorMsg | ( | self, |
|  | KUriFilterData | data,
|  | QString | errmsg
| ) |  |  |

Sets the error message in data to errormsg.

setFilteredUri | ( | self, |
|  | KUriFilterData | data,
|  | KUrl | uri
| ) |  |  |

Sets the URL in data to uri.

setUriType | ( | self, |
|  | KUriFilterData | data,
|  | KUriFilterData.UriTypes | type
| ) |  |  |

Sets the URI type in data to type.