Changeset View
Changeset View
Standalone View
Standalone View
src/konqpixmapprovider.h
Show All 16 Lines | 1 | /* This file is part of the KDE project | |||
---|---|---|---|---|---|
17 | Boston, MA 02110-1301, USA. | 17 | Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef KONQ_PIXMAPPROVIDER_H | 20 | #ifndef KONQ_PIXMAPPROVIDER_H | ||
21 | #define KONQ_PIXMAPPROVIDER_H | 21 | #define KONQ_PIXMAPPROVIDER_H | ||
22 | 22 | | |||
23 | #include "konqprivate_export.h" | 23 | #include "konqprivate_export.h" | ||
24 | 24 | | |||
25 | #include <kpixmapprovider.h> | | |||
26 | | ||||
27 | #include <QMap> | 25 | #include <QMap> | ||
28 | #include <QPixmap> | 26 | #include <QPixmap> | ||
29 | #include <QUrl> | 27 | #include <QUrl> | ||
30 | 28 | | |||
31 | class KConfigGroup; | 29 | class KConfigGroup; | ||
32 | class KConfig; | 30 | class KConfig; | ||
33 | 31 | | |||
34 | class KONQUERORPRIVATE_EXPORT KonqPixmapProvider : public QObject, public KPixmapProvider | 32 | class KONQUERORPRIVATE_EXPORT KonqPixmapProvider : public QObject | ||
35 | { | 33 | { | ||
36 | Q_OBJECT | 34 | Q_OBJECT | ||
37 | public: | 35 | public: | ||
38 | static KonqPixmapProvider *self(); | 36 | static KonqPixmapProvider *self(); | ||
39 | 37 | | |||
40 | ~KonqPixmapProvider() override; | 38 | ~KonqPixmapProvider(); | ||
41 | 39 | | |||
42 | /** | 40 | /** | ||
43 | * Trigger a download of a default favicon | 41 | * Trigger a download of a default favicon | ||
44 | */ | 42 | */ | ||
45 | void downloadHostIcon(const QUrl &hostUrl); | 43 | void downloadHostIcon(const QUrl &hostUrl); | ||
46 | /** | 44 | /** | ||
47 | * Trigger a download of a custom favicon (from the HTML page) | 45 | * Trigger a download of a custom favicon (from the HTML page) | ||
48 | */ | 46 | */ | ||
49 | void setIconForUrl(const QUrl &hostUrl, const QUrl &iconUrl); | 47 | void setIconForUrl(const QUrl &hostUrl, const QUrl &iconUrl); | ||
50 | 48 | | |||
51 | /** | 49 | /** | ||
52 | * Looks up a pixmap for @p url. Uses a cache for the iconname of url. | 50 | * Looks up a pixmap for @p url. Uses a cache for the iconname of url. | ||
53 | */ | 51 | */ | ||
54 | QPixmap pixmapFor(const QString &url, int size) override; | 52 | QPixmap pixmapFor(const QString &url, int size); | ||
55 | 53 | | |||
56 | /** | 54 | /** | ||
57 | * Loads the cache to @p kc from key @p key. | 55 | * Loads the cache to @p kc from key @p key. | ||
58 | */ | 56 | */ | ||
59 | void load(KConfigGroup &kc, const QString &key); | 57 | void load(KConfigGroup &kc, const QString &key); | ||
60 | /** | 58 | /** | ||
61 | * Saves the cache to @p kc as key @p key. | 59 | * Saves the cache to @p kc as key @p key. | ||
62 | * Only those @p items are saved, otherwise the cache would grow forever. | 60 | * Only those @p items are saved, otherwise the cache would grow forever. | ||
Show All 26 Lines |