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

libkonq

  • sources
  • kde-4.12
  • applications
  • kde-baseapps
  • lib
  • konq
  • favicons
favicons.h
Go to the documentation of this file.
1 /* This file is part of the KDE Project
2  Copyright (c) 2001 Malte Starostik <malte@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef _FAVICONS_H_
20 #define _FAVICONS_H_
21 
22 #include <kdedmodule.h>
23 #include <kurl.h>
24 
25 class KJob;
26 namespace KIO { class Job; }
27 
46 class FavIconsModule : public KDEDModule
47 {
48  Q_OBJECT
49  Q_CLASSINFO("D-Bus Interface", "org.kde.FavIcon")
50 
51 public:
52  FavIconsModule(QObject* parent, const QList<QVariant>&);
53  virtual ~FavIconsModule();
54 
55 public Q_SLOTS: // dbus methods, called by the adaptor
65  QString iconForUrl(const KUrl &url);
66 
76  void setIconForUrl(const KUrl &url, const KUrl &iconURL);
84  void downloadHostIcon(const KUrl &url);
85 
95  void forceDownloadHostIcon(const KUrl &url);
96 
97 signals: // D-Bus signals
101  void iconChanged(bool isHost, QString hostOrURL, QString iconName);
105  void infoMessage(QString iconURL, QString msg);
112  void error(bool isHost, QString hostOrURL, QString errorString);
113 
114 private:
115  void startDownload(const QString &, bool, const KUrl &);
116  bool isIconOld(const QString &);
117 
118 private Q_SLOTS:
119  void slotData(KIO::Job *, const QByteArray &);
120  void slotResult(KJob *);
121  void slotInfoMessage(KJob *, const QString &);
122  void slotKill();
123 
124 private:
125  struct FavIconsModulePrivate *d;
126 };
127 
128 #endif
129 
130 // vim: ts=4 sw=4 et
FavIconsModule::infoMessage
void infoMessage(QString iconURL, QString msg)
Progress info while downloading an icon.
KDEDModule
FavIconsModule::downloadHostIcon
void downloadHostIcon(const KUrl &url)
Downloads the icon for a given host if it was not downloaded before or the download was too long ago...
Definition: favicons.cpp:203
QObject
FavIconsModule::~FavIconsModule
virtual ~FavIconsModule()
Definition: favicons.cpp:129
FavIconsModule::iconChanged
void iconChanged(bool isHost, QString hostOrURL, QString iconName)
Emitted once a new icon is available, for a host or url.
FavIconsModule::error
void error(bool isHost, QString hostOrURL, QString errorString)
Emitted if an error occurred while downloading the icon for the given host or url.
FavIconsModule::iconForUrl
QString iconForUrl(const KUrl &url)
Looks up an icon name for a given URL.
Definition: favicons.cpp:146
FavIconsModule::FavIconsModule
FavIconsModule(QObject *parent, const QList< QVariant > &)
Definition: favicons.cpp:111
FavIconsModule
KDED Module to handle shortcut icons ("favicons") FavIconsModule implements a KDED Module that handle...
Definition: favicons.h:46
FavIconsModule::setIconForUrl
void setIconForUrl(const KUrl &url, const KUrl &iconURL)
Associates an icon with the given URL.
Definition: favicons.cpp:184
QList
FavIconsModule::forceDownloadHostIcon
void forceDownloadHostIcon(const KUrl &url)
Downloads the icon for a given host, even if we tried very recently.
Definition: favicons.cpp:214
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