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

libkonq

Public Slots | Signals | Public Member Functions | List of all members
FavIconsModule Class Reference

#include <favicons.h>

Inheritance diagram for FavIconsModule:
Inheritance graph
[legend]

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

Author
Malte Starostik malte.nosp@m.@kde.nosp@m..org

Definition at line 46 of file favicons.h.

Constructor & Destructor Documentation

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

Definition at line 111 of file favicons.cpp.

FavIconsModule::~FavIconsModule ( )
virtual

Definition at line 129 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() D-Bus signal is emitted.

Parameters
urlany URL on the host for which the icon is to be downloaded

Definition at line 203 of file favicons.cpp.

void FavIconsModule::error ( bool  isHost,
QString  hostOrURL,
QString  errorString 
)
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.

void FavIconsModule::forceDownloadHostIcon ( const KUrl &  url)
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
urlany URL on the host for which the icon is to be downloaded

Definition at line 214 of file favicons.cpp.

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

Emitted 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
urlthe 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.

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() D-Bus signal is emitted after the download finished successfully.

Parameters
urlthe URL which will be associated with the icon
iconURLthe 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:
  • favicons.h
  • favicons.cpp
This file is part of the KDE documentation.
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.

libkonq

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Applications
  •   Libraries
  •     libkonq
  • Konsole

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