libkonq
#include <favicons.h>
Public Slots | |
void | downloadHostIcon (const KUrl &url) |
void | forceDownloadHostIcon (const KUrl &url) |
QString | iconForUrl (const KUrl &url) |
void | setIconForUrl (const KUrl &url, const KUrl &iconURL) |
Signals | |
void | error (bool isHost, QString hostOrURL, QString errorString) |
void | iconChanged (bool isHost, QString hostOrURL, QString iconName) |
void | infoMessage (QString iconURL, QString msg) |
Public Member Functions | |
FavIconsModule (QObject *parent, const QList< QVariant > &) | |
virtual | ~FavIconsModule () |
Detailed Description
KDED Module to handle shortcut icons ("favicons") FavIconsModule implements a KDED Module that handles the association of URLs and hosts with shortcut icons and the icons' downloads in a central place.
After a successful download, the D-Bus signal iconChanged() is emitted. It has the signature void iconChanged(bool, QString, QString); The first parameter is true if the icon is a "host" icon, that is it is the default icon for all URLs on the given host. In this case, the second parameter is a host name, otherwise the second parameter is the URL which is associated with the icon. The third parameter is the KIconLoader friendly name of the downloaded icon, the same as iconForUrl will from now on return for any matching URL.
KDED Module for favicons
Definition at line 46 of file favicons.h.
Constructor & Destructor Documentation
Definition at line 111 of file favicons.cpp.
|
virtual |
Definition at line 129 of file favicons.cpp.
Member Function Documentation
|
slot |
Downloads the icon for a given host if it was not downloaded before or the download was too long ago.
If the download finishes successfully, the iconChanged() D-Bus signal is emitted.
- Parameters
-
url any URL on the host for which the icon is to be downloaded
Definition at line 203 of file favicons.cpp.
|
signal |
Emitted if an error occurred while downloading the icon for the given host or url.
You can usually ignore this (e.g. web browsers don't need to do anything if no favicon was found), but this signal can be useful in some cases, e.g. to let keditbookmarks know that it should move on to the next bookmark.
|
slot |
Downloads the icon for a given host, even if we tried very recently.
Not recommended in the general case; only useful for explicit "update favicon" actions from the user.
If the download finishes successfully, the iconChanged() D-Bus signal is emitted.
- Parameters
-
url any URL on the host for which the icon is to be downloaded
Definition at line 214 of file favicons.cpp.
|
signal |
Emitted once a new icon is available, for a host or url.
|
slot |
Looks up an icon name for a given URL.
This function does not initiate any download. If no icon for the URL or its host has been downloaded yet, QString() is returned.
- Parameters
-
url the URL for which the icon is queried
- Returns
- the icon name suitable to pass to KIconLoader or QString() if no icon for this URL was found.
Definition at line 146 of file favicons.cpp.
|
signal |
Progress info while downloading an icon.
|
slot |
Associates an icon with the given URL.
If the icon was not downloaded before or the downloaded was too long ago, a download attempt will be started and the iconChanged() D-Bus signal is emitted after the download finished successfully.
- Parameters
-
url the URL which will be associated with the icon iconURL the URL of the icon to be downloaded
Definition at line 184 of file favicons.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.