kio Library API Documentation

KURIFilterPlugin Class Reference

Base class for URI filter plugins. Abstract class for URI filter plugins. More...

#include <kurifilter.h>

Inheritance diagram for KURIFilterPlugin:

QObject List of all members.

Public Member Functions

 KURIFilterPlugin (QObject *parent=0, const char *name=0, double pri=1.0)
 Constructs a filter plugin with a given name and priority.

virtual QString name () const
 Returns the filter's name.

virtual double priority () const
 Returns the filter's priority.

virtual bool filterURI (KURIFilterData &data) const =0
 Filters a URI.

virtual KCModuleconfigModule (QWidget *, const char *) const
 Creates a configuration module for the filter.

virtual QString configName () const
 Returns the name of the configuration module for the filter.


Protected Member Functions

void setFilteredURI (KURIFilterData &data, const KURL &uri) const
 Sets the the URL in data to uri.

void setErrorMsg (KURIFilterData &data, const QString &errmsg) const
 Sets the error message in data to errormsg.

void setURIType (KURIFilterData &data, KURIFilterData::URITypes type) const
 Sets the URI type in data to type.

void setArguments (KURIFilterData &data, const QString &args) const
 Sets the arguments and options string in data to args if any were found during filterting.

virtual void virtual_hook (int id, void *data)

Protected Attributes

QString m_strName
double m_dblPriority

Detailed Description

Base class for URI filter plugins. Abstract class for URI filter plugins.

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

All inheriting classes need to implement the pure virtual function filterURI. Otherwise, they would also become abstract.

Definition at line 296 of file kurifilter.h.


Constructor & Destructor Documentation

KURIFilterPlugin::KURIFilterPlugin QObject parent = 0,
const char *  name = 0,
double  pri = 1.0
 

Constructs a filter plugin with a given name and priority.

Parameters:
parent the parent object.
name the name of the plugin.
pri the priority of the plugin.

Definition at line 34 of file kurifilter.cpp.

References QString::fromLatin1(), and KStdAccel::name().


Member Function Documentation

virtual QString KURIFilterPlugin::name  )  const [inline, virtual]
 

Returns the filter's name.

Returns:
A string naming the filter.

Reimplemented from QObject.

Definition at line 317 of file kurifilter.h.

Referenced by configName().

virtual double KURIFilterPlugin::priority  )  const [inline, virtual]
 

Returns the filter's priority.

Each filter has an assigned priority, a float from 0 to 1. Filters with the lowest priority are first given a chance to filter a URI.

Returns:
The priority of the filter.

Definition at line 327 of file kurifilter.h.

virtual bool KURIFilterPlugin::filterURI KURIFilterData data  )  const [pure virtual]
 

Filters a URI.

Parameters:
data the URI data to be filtered.
Returns:
A boolean indicating whether the URI has been changed.

virtual KCModule* KURIFilterPlugin::configModule QWidget ,
const char * 
const [inline, virtual]
 

Creates a configuration module for the filter.

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

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

Definition at line 345 of file kurifilter.h.

virtual QString KURIFilterPlugin::configName  )  const [inline, virtual]
 

Returns the name of the configuration module for the filter.

Returns:
the name of a configuration module or null if none.

Definition at line 352 of file kurifilter.h.

References name().

void KURIFilterPlugin::setFilteredURI KURIFilterData data,
const KURL uri
const [protected]
 

Sets the the URL in data to uri.

Definition at line 41 of file kurifilter.cpp.

References KURIFilterData::m_bChanged, KURIFilterData::m_pURI, and KURIFilterData::uri().

void KURIFilterPlugin::setErrorMsg KURIFilterData data,
const QString errmsg
const [inline, protected]
 

Sets the error message in data to errormsg.

Definition at line 364 of file kurifilter.h.

References KURIFilterData::m_strErrMsg.

void KURIFilterPlugin::setURIType KURIFilterData data,
KURIFilterData::URITypes  type
const [inline, protected]
 

Sets the URI type in data to type.

Definition at line 371 of file kurifilter.h.

References KURIFilterData::m_bChanged, and KURIFilterData::m_iType.

void KURIFilterPlugin::setArguments KURIFilterData data,
const QString args
const [protected]
 

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

Definition at line 166 of file kurifilter.cpp.

References KURIFilterData::d.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 27 22:15:37 2005 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001