KUriFilterPlugin Class Reference
Base class for URI filter plugins. More...
#include <kurifilter.h>

Public Types | |
| typedef QHash< QString, QPair < QString, QString > > | ProviderInfoList |
Public Member Functions | |
| KUriFilterPlugin (const QString &name, QObject *parent=0) | |
| virtual KCModule * | configModule (QWidget *, const char *) const |
| virtual QString | configName () const |
| virtual bool | filterUri (KUriFilterData &data) const =0 |
Protected Member Functions | |
| QString | iconNameFor (const KUrl &url, KUriFilterData::UriTypes type) const |
| void | setArguments (KUriFilterData &data, const QString &args) const |
| void | setErrorMsg (KUriFilterData &data, const QString &errmsg) const |
| void | setFilteredUri (KUriFilterData &data, const KUrl &uri) const |
| void | setPreferredSearchProviders (KUriFilterData &data, const ProviderInfoList &providers) const |
| void | setSearchProvider (KUriFilterData &data, const QString &provider, const QString &term, const QChar &separator) const |
| void | setSearchProviders (KUriFilterData &data, const QList< KUriFilterSearchProvider * > &providers) const |
| void | setUriType (KUriFilterData &data, KUriFilterData::UriTypes type) const |
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.
Definition at line 644 of file kurifilter.h.
Member Typedef Documentation
| typedef QHash<QString, QPair<QString, QString> > KUriFilterPlugin::ProviderInfoList |
List for holding the following search provider information: ([search provider name], [search query, search query icon name])
- Since:
- 4.5
- Deprecated:
- Use KUriFilterSearchProvider instead. See setSearchProviders;
Definition at line 657 of file kurifilter.h.
Constructor & Destructor Documentation
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
Definition at line 488 of file kurifilter.cpp.
Member Function Documentation
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.
Definition at line 494 of file kurifilter.cpp.
| QString KUriFilterPlugin::configName | ( | ) | const [virtual] |
Returns the name of the configuration module for the filter.
- Returns:
- the name of a configuration module or QString() if none.
Definition at line 499 of file kurifilter.cpp.
| 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.
| QString KUriFilterPlugin::iconNameFor | ( | const KUrl & | url, |
| KUriFilterData::UriTypes | type | ||
| ) | const [protected] |
Returns the icon name for the given url and URI type.
- Since:
- 4.5
Definition at line 565 of file kurifilter.cpp.
| 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 524 of file kurifilter.cpp.
| void KUriFilterPlugin::setErrorMsg | ( | KUriFilterData & | data, |
| const QString & | errmsg | ||
| ) | const [protected] |
Sets the error message in data to errormsg.
Definition at line 511 of file kurifilter.cpp.
| void KUriFilterPlugin::setFilteredUri | ( | KUriFilterData & | data, |
| const KUrl & | uri | ||
| ) | const [protected] |
Sets the URL in data to uri.
Definition at line 504 of file kurifilter.cpp.
| void KUriFilterPlugin::setPreferredSearchProviders | ( | KUriFilterData & | data, |
| const ProviderInfoList & | providers | ||
| ) | const [protected] |
Sets the name of the preferred search providers in data.
- Since:
- 4.5
- Deprecated:
- Use setSearchProviders instead.
Definition at line 539 of file kurifilter.cpp.
| void KUriFilterPlugin::setSearchProvider | ( | KUriFilterData & | data, |
| const QString & | provider, | ||
| const QString & | term, | ||
| const QChar & | separator | ||
| ) | const [protected] |
Sets the name of the search provider, the search term and keyword/term separator in data.
- Since:
- 4.5
Definition at line 530 of file kurifilter.cpp.
| void KUriFilterPlugin::setSearchProviders | ( | KUriFilterData & | data, |
| const QList< KUriFilterSearchProvider * > & | providers | ||
| ) | const [protected] |
Sets the information about the search providers in data.
- Since:
- 4.6
Definition at line 557 of file kurifilter.cpp.
| void KUriFilterPlugin::setUriType | ( | KUriFilterData & | data, |
| KUriFilterData::UriTypes | type | ||
| ) | const [protected] |
Sets the URI type in data to type.
Definition at line 517 of file kurifilter.cpp.
The documentation for this class was generated from the following files:
KDE 4.6 API Reference