Home · All Classes · All Functions · Overviews

QWebPluginDatabase Class Reference
[
QtWebKit module]

The QWebPluginDatabase class provides an interface for managing Netscape plugins used by WebKit in QWebPages. More...

 #include <QWebPluginDatabase>

This class is not part of the Qt GUI Framework Edition.

Inherits QObject.

This class was introduced in Qt 4.6.


Public Functions

void addSearchPath ( const QString & path )
QWebPluginInfo pluginForMimeType ( const QString & mimeType )
QList<QWebPluginInfo> plugins () const
void refresh ()
QStringList searchPaths () const
void setPreferredPluginForMimeType ( const QString & mimeType, const QWebPluginInfo & plugin )
void setSearchPaths ( const QStringList & paths )

Static Public Members

QStringList defaultSearchPaths ()

Additional Inherited Members


Detailed Description

The QWebPluginDatabase class provides an interface for managing Netscape plugins used by WebKit in QWebPages.

The QWebPluginDatabase class is a database of Netscape plugins that are used by WebKit. The plugins are picked up by WebKit by looking up a set of search paths. The default set can be accessed using defaultSearchPaths(). The search paths can be changed, see searchPaths() and setSearchPaths(). Additional search paths can also be added using addSearchPath().

The plugins that have been detected are exposed by the plugins() method. The list contains QWebPlugin objects that hold both the metadata and the MIME types that are supported by particular plugins.

WebKit specifies a plugin for a MIME type by looking for the first plugin that supports the specific MIME type. To get a plugin, that is used by WebKit to handle a specific MIME type, you can use the pluginForMimeType() function.

To change the way of resolving MIME types ambiguity, you can explicitly set a preferred plugin for a specific MIME type, using setPreferredPluginForMimeType().

See also QWebPluginInfo and QWebSettings::pluginDatabase().


Member Function Documentation

void QWebPluginDatabase::addSearchPath ( const QString & path )

Adds an additional path to the current set. The database is automatically refreshed.

See also searchPaths() and setSearchPaths().

QStringList QWebPluginDatabase::defaultSearchPaths ()   [static]

Returns a default set of search paths.

See also searchPaths() and setSearchPaths().

QWebPluginInfo QWebPluginDatabase::pluginForMimeType ( const QString & mimeType )

Returns the plugin that is currently used by WebKit for a given mimeType.

See also setPreferredPluginForMimeType().

QList<QWebPluginInfo> QWebPluginDatabase::plugins () const

Returns a list of plugins installed in the search paths.

This list will contain disabled plugins, although they will not be used by WebKit.

See also pluginForMimeType().

void QWebPluginDatabase::refresh ()

Refreshes the plugin database, adds new plugins that have been found and removes the ones that are no longer available in the search paths.

You can call this function when the set of plugins installed in the search paths changes. You do not need to call this function when changing search paths, in that case WebKit automatically refreshes the database.

QStringList QWebPluginDatabase::searchPaths () const

Returns a list of search paths that are used by WebKit to look for plugins.

See also defaultSearchPaths() and setSearchPaths().

void QWebPluginDatabase::setPreferredPluginForMimeType ( const QString & mimeType, const QWebPluginInfo & plugin )

Changes the preferred plugin for a given mimeType to plugin. The plugin has to support the given mimeType, otherwise the setting will have no effect.

Calling the function with a null plugin resets the setting.

See also pluginForMimeType().

void QWebPluginDatabase::setSearchPaths ( const QStringList & paths )

Changes the search paths to paths. The database is automatically refreshed.

See also searchPaths() and defaultSearchPaths().


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.6.0