• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • libkonq
 

libkonq

  • libkonq
konq_faviconmgr.cpp
1 /* This file is part of the KDE project
2  Copyright (C) 2000 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 as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #include <dcopclient.h>
21 #include <tdeapplication.h>
22 #include <tdeconfig.h>
23 #include <tdeglobal.h>
24 #include <kmimetype.h>
25 
26 #include "konq_faviconmgr.moc"
27 
28 KonqFavIconMgr::KonqFavIconMgr(TQObject *parent, const char *name)
29  : TQObject(parent, name),
30  DCOPObject("KonqFavIconMgr")
31 {
32  connectDCOPSignal("kded", "favicons",
33  "iconChanged(bool, TQString, TQString)",
34  "notifyChange(bool, TQString, TQString)", false);
35 }
36 
37 TQString KonqFavIconMgr::iconForURL(const TQString &url)
38 {
39  return KMimeType::favIconForURL( KURL(url) );
40 }
41 
42 void KonqFavIconMgr::setIconForURL(const KURL &url, const KURL &iconURL)
43 {
44  TQByteArray data;
45  TQDataStream str(data, IO_WriteOnly);
46  str << url << iconURL;
47  kapp->dcopClient()->send("kded", "favicons", "setIconForURL(KURL, KURL)", data);
48 }
49 
50 void KonqFavIconMgr::downloadHostIcon(const KURL &url)
51 {
52  TQByteArray data;
53  TQDataStream str(data, IO_WriteOnly);
54  str << url;
55  kapp->dcopClient()->send("kded", "favicons", "downloadHostIcon(KURL)", data);
56 }
57 
KonqFavIconMgr::setIconForURL
static void setIconForURL(const KURL &url, const KURL &iconURL)
Downloads an icon from iconURL and associates url with it.
Definition: konq_faviconmgr.cpp:42
KonqFavIconMgr::KonqFavIconMgr
KonqFavIconMgr(TQObject *parent=0, const char *name=0)
Constructor.
Definition: konq_faviconmgr.cpp:28
KonqFavIconMgr::downloadHostIcon
static void downloadHostIcon(const KURL &url)
Downloads /favicon.ico from the host of url and associates all URLs on that host with it (unless a mo...
Definition: konq_faviconmgr.cpp:50
KonqFavIconMgr::iconForURL
static TQString iconForURL(const TQString &url)
Looks up an icon for url and returns its name if found or TQString::null otherwise.
Definition: konq_faviconmgr.cpp:37

libkonq

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

libkonq

Skip menu "libkonq"
  • kate
  • libkonq
  • twin
  •   lib
Generated for libkonq by doxygen 1.9.1
This website is maintained by Timothy Pearson.