KDE 4.5 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KUriFilterPlugin Class Reference

from PyKDE4.kio import *

Inherits: QObject

Detailed Description

Base class for URI filter plugins.

This class applies a single filter to a URI. All plugins designed to provide URI filtering service should inherit from this abstract class and provide a concrete implementation.

All inheriting classes need to implement the pure virtual function filterUri.

Abstract class for URI filter plugins.


Methods

 __init__ (self, QString name, QObject parent=0)
KCModule configModule (self, QWidget a0, QString a1)
QString configName (self)
bool filterUri (self, KUriFilterData data)
QString iconNameFor (self, KUrl url, KUriFilterData.UriTypes type)
 setArguments (self, KUriFilterData data, QString args)
 setErrorMsg (self, KUriFilterData data, QString errmsg)
 setFilteredUri (self, KUriFilterData data, KUrl uri)
 setSearchProvider (self, KUriFilterData data, QString provider, QString term, QChar separator)
 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.

QString iconNameFor (  self,
KUrl  url,
KUriFilterData.UriTypes  type
)

Returns the icon name for the given url and URI type.

Since:
4.5

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.

setSearchProvider (  self,
KUriFilterData  data,
QString  provider,
QString  term,
QChar  separator
)

Sets the name of the search provider, the search term and keyword/term separator in data.

Since:
4.5

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

Sets the URI type in data to type.

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal