• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkonq

FavIconsModule Class Reference

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. More...

#include <favicons.h>

Inheritance diagram for FavIconsModule:

Inheritance graph
[legend]

List of all members.


Public Slots

void downloadHostIcon (const KUrl &url)
QString iconForUrl (const KUrl &url)
void setIconForUrl (const KUrl &url, const KUrl &iconURL)

Signals

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 DBUS 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

Author:
Malte Starostik <malte@kde.org>

Definition at line 46 of file favicons.h.


Constructor & Destructor Documentation

FavIconsModule::FavIconsModule ( QObject *  parent,
const QList< QVariant > &   
)

Definition at line 104 of file favicons.cpp.

FavIconsModule::~FavIconsModule (  )  [virtual]

Definition at line 121 of file favicons.cpp.


Member Function Documentation

void FavIconsModule::downloadHostIcon ( const KUrl &  url  )  [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() DBUS signal is emitted.

Parameters:
url any URL on the host for which the icon is to be downloaded

Definition at line 192 of file favicons.cpp.

void FavIconsModule::iconChanged ( bool  isHost,
QString  hostOrURL,
QString  iconName 
) [signal]

Emitting once a new icon is available, for a host or url.

QString FavIconsModule::iconForUrl ( const KUrl &  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 139 of file favicons.cpp.

void FavIconsModule::infoMessage ( QString  iconURL,
QString  msg 
) [signal]

Progress info while downloading an icon.

void FavIconsModule::setIconForUrl ( const KUrl &  url,
const KUrl &  iconURL 
) [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() DBUS 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 175 of file favicons.cpp.


The documentation for this class was generated from the following files:
  • favicons.h
  • favicons.cpp

libkonq

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

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal