• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

Public Types | Public Member Functions | Protected Member Functions | List of all members
KUriFilterPlugin Class Referenceabstract

#include <kurifilter.h>

Inheritance diagram for KUriFilterPlugin:
Inheritance graph
[legend]

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
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Protected Member Functions

QString iconNameFor (const KUrl &url, KUriFilterData::UriTypes type) const
 
QHostInfo resolveName (const QString &hostname, unsigned long timeout) 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
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

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 645 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 658 of file kurifilter.h.

Constructor & Destructor Documentation

KUriFilterPlugin::KUriFilterPlugin ( const QString &  name,
QObject *  parent = 0 
)
explicit

Constructs a filter plugin with a given name.

Parameters
parentthe parent object, or 0 for no parent
namethe name of the plugin, mandatory

Definition at line 490 of file kurifilter.cpp.

Member Function Documentation

KCModule * KUriFilterPlugin::configModule ( QWidget *  ,
const char *   
) const
virtual

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 496 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 501 of file kurifilter.cpp.

virtual bool KUriFilterPlugin::filterUri ( KUriFilterData &  data) const
pure virtual

Filters a URI.

Parameters
datathe 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 567 of file kurifilter.cpp.

QHostInfo KUriFilterPlugin::resolveName ( const QString &  hostname,
unsigned long  timeout 
) const
protected

Performs a DNS lookup for hostname and returns the result.

This function uses the KIO/KHTML DNS cache to speed up the lookup. It also avoids doing a reverse lookup if the given host name is already an ip address.

Note
All uri filter plugins that need to perform a hostname lookup should use this function.
Parameters
hostnamethe hostname to lookup.
timeoutthe amount of time in msecs to wait for the lookup.
Returns
the result of the host name lookup.
Since
4.7

Definition at line 572 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 526 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 513 of file kurifilter.cpp.

void KUriFilterPlugin::setFilteredUri ( KUriFilterData &  data,
const KUrl &  uri 
) const
protected

Sets the URL in data to uri.

Definition at line 506 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 541 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 532 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 559 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 519 of file kurifilter.cpp.


The documentation for this class was generated from the following files:
  • kurifilter.h
  • kurifilter.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal