Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/kurlpixmapprovider.h
Show All 34 Lines | |||||
35 | * \code | 35 | * \code | ||
36 | * KHistoryComboBox *combo = new KHistoryComboBox(this); | 36 | * KHistoryComboBox *combo = new KHistoryComboBox(this); | ||
37 | * combo->setPixmapProvider(new KUrlPixmapProvider); | 37 | * combo->setPixmapProvider(new KUrlPixmapProvider); | ||
38 | * [...] | 38 | * [...] | ||
39 | * \endcode | 39 | * \endcode | ||
40 | * | 40 | * | ||
41 | * @short Resolves pixmaps for URLs | 41 | * @short Resolves pixmaps for URLs | ||
42 | * @author Carsten Pfeiffer <pfeiffer@kde.org> | 42 | * @author Carsten Pfeiffer <pfeiffer@kde.org> | ||
43 | * | ||||
44 | * @deprecated since 5.65, use KIO::iconNameForUrl to get the icon name and use QIcon::fromTheme | ||||
43 | */ | 45 | */ | ||
46 | #if KIOWIDGETS_ENABLE_DEPRECATED_SINCE(5, 65) | ||||
47 | | ||||
44 | class KIOWIDGETS_EXPORT KUrlPixmapProvider : public KPixmapProvider | 48 | class KIOWIDGETS_EXPORT KUrlPixmapProvider : public KPixmapProvider | ||
45 | { | 49 | { | ||
46 | public: | 50 | public: | ||
47 | /** | 51 | /** | ||
48 | * Creates a new url pixmap provider. | 52 | * Creates a new url pixmap provider. | ||
49 | */ | 53 | */ | ||
54 | KIOWIDGETS_DEPRECATED_VERSION(5, 65, "Use KIO::iconNameForUrl to get the icon name and use QIcon::fromTheme") | ||||
50 | KUrlPixmapProvider(); | 55 | KUrlPixmapProvider(); | ||
51 | 56 | | |||
52 | /** | 57 | /** | ||
53 | * Destroys the url pixmap provider. | 58 | * Destroys the url pixmap provider. | ||
54 | */ | 59 | */ | ||
60 | KIOWIDGETS_DEPRECATED_VERSION(5, 65, "Use KIO::iconNameForUrl to get the icon name and use QIcon::fromTheme") | ||||
55 | ~KUrlPixmapProvider(); | 61 | ~KUrlPixmapProvider(); | ||
56 | 62 | | |||
57 | /** | 63 | /** | ||
58 | * Returns a pixmap for @p url with size @p size. | 64 | * Returns a pixmap for @p url with size @p size. | ||
59 | * | 65 | * | ||
60 | * Uses KMimeType::pixmapForURL(). | 66 | * Uses KMimeType::pixmapForURL(). | ||
61 | * | 67 | * | ||
62 | * @param url the URL to fetch a pixmap for | 68 | * @param url the URL to fetch a pixmap for | ||
63 | * @param size the size of the pixmap in pixels, or 0 for default. | 69 | * @param size the size of the pixmap in pixels, or 0 for default. | ||
64 | * @return the resulting pixmap | 70 | * @return the resulting pixmap | ||
65 | * @see KIconLoader::StdSizes | 71 | * @see KIconLoader::StdSizes | ||
66 | */ | 72 | */ | ||
73 | KIOWIDGETS_DEPRECATED_VERSION(5, 65, "Use KIO::iconNameForUrl to get the icon name and use QIcon::fromTheme") | ||||
67 | QPixmap pixmapFor(const QString &url, int size = 0) override; | 74 | QPixmap pixmapFor(const QString &url, int size = 0) override; | ||
68 | protected: | 75 | protected: | ||
69 | void virtual_hook(int id, void *data) override; | 76 | void virtual_hook(int id, void *data) override; | ||
70 | 77 | | |||
71 | private: | 78 | private: | ||
72 | class Private; | 79 | class Private; | ||
73 | Private *const d; | 80 | Private *const d; | ||
74 | }; | 81 | }; | ||
75 | 82 | | |||
83 | #endif | ||||
84 | | ||||
76 | #endif // KURLPIXMAPPROVIDER_H | 85 | #endif // KURLPIXMAPPROVIDER_H |