#include <favicons.h>
Inherits KDEDModule.
Public Member Functions | |
FaviconsModule (const TQCString &obj) | |
void | infoMessage (KURL iconURL, TQString msg) |
Public Attributes | |
k_dcop_signals | __pad0__: void iconChanged(bool isHost |
k_dcop_signals TQString | hostOrURL |
k_dcop_signals TQString TQString | iconName |
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 DCOP signal iconChanged() is emitted. It has the signature void iconChanged(bool, TQString, TQString); 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 TDEIconLoader 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 45 of file favicons.h.
Member Function Documentation
◆ downloadHostIcon
void FaviconsModule::downloadHostIcon | ( | const KURL & | url | ) |
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() DCOP signal is emitted.
- Parameters
-
url any URL on the host for which the icon is to be downloaded
Definition at line 173 of file favicons.cpp.
◆ iconForURL
TQString FaviconsModule::iconForURL | ( | const KURL & | url | ) |
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, TQString::null is returned.
- Parameters
-
url the URL for which the icon is queried
- Returns
- the icon name suitable to pass to TDEIconLoader or TQString::null if no icon for this URL was found.
Definition at line 92 of file favicons.cpp.
◆ setIconForURL
void FaviconsModule::setIconForURL | ( | const KURL & | url, |
const KURL & | iconURL | ||
) |
Assiciates 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() DCOP 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 156 of file favicons.cpp.
The documentation for this class was generated from the following files: