summaryrefslogtreecommitdiffstats
path: root/knewsticker/common/newsiconmgr.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /knewsticker/common/newsiconmgr.h
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knewsticker/common/newsiconmgr.h')
-rw-r--r--knewsticker/common/newsiconmgr.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/knewsticker/common/newsiconmgr.h b/knewsticker/common/newsiconmgr.h
new file mode 100644
index 00000000..e4c6b657
--- /dev/null
+++ b/knewsticker/common/newsiconmgr.h
@@ -0,0 +1,60 @@
+/*
+ * newsiconmgr.h
+ *
+ * Copyright (c) 2001 Frerich Raabe <raabe@kde.org>
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. For licensing and distribution details, check the
+ * accompanying file 'COPYING'.
+ */
+#ifndef NEWSICONMGR_H
+#define NEWSICONMGR_H
+
+#include <qobject.h>
+#include <qpixmap.h>
+
+#include <dcopobject.h>
+#include <kio/job.h>
+#include <kurl.h>
+
+class DCOPClient;
+
+struct KIODownload;
+typedef QMap<KIO::Job *, KIODownload> KIODownloadMap;
+
+class NewsIconMgr : public QObject, public DCOPObject
+{
+ Q_OBJECT
+ K_DCOP
+
+ public:
+ static NewsIconMgr *self();
+
+ void getIcon(const KURL &);
+ bool isStdIcon(const QPixmap &) const;
+
+ k_dcop:
+ void slotGotIcon(bool, QString, QString);
+
+ signals:
+ void gotIcon(const KURL &, const QPixmap &);
+
+ protected:
+ NewsIconMgr(QObject * = 0L, const char * = 0L);
+ ~NewsIconMgr();
+
+ private slots:
+ void slotData(KIO::Job *, const QByteArray &);
+ void slotResult(KIO::Job *);
+
+ private:
+ QString favicon(const KURL &) const;
+
+ QPixmap m_stdIcon;
+ KIODownloadMap m_kioDownload;
+
+ static NewsIconMgr *m_instance;
+};
+
+#endif // NEWSICONMGR_H