File indexing completed on 2024-04-28 11:42:12

0001 /*
0002     This file is part of the KDE libraries
0003     SPDX-FileCopyrightText: 2000-2005 David Faure <faure@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-only
0006 */
0007 
0008 #ifndef KIO_PIXMAPLOADER_H
0009 #define KIO_PIXMAPLOADER_H
0010 
0011 #include "kiowidgets_export.h"
0012 #include <KIconLoader>
0013 #include <QPixmap>
0014 
0015 class QUrl;
0016 
0017 namespace KIO
0018 {
0019 #if KIOWIDGETS_ENABLE_DEPRECATED_SINCE(5, 75)
0020 /**
0021  * Convenience method to find the pixmap for a URL.
0022  *
0023  * Call this one when you don't know the MIME type.
0024  *
0025  * @param url URL for the file.
0026  * @param dummy ignored (was a mode_t parameter in kdelibs 4)
0027  * @param group The icon group where the icon is going to be used.
0028  * @param force_size Override globally configured icon size.
0029  *        Use 0 for the default size
0030  * @param state The icon state, one of: KIconLoader::DefaultState,
0031  * KIconLoader::ActiveState or KIconLoader::DisabledState.
0032  * @param path Output parameter to get the full path. Seldom needed.
0033  *              Ignored if null pointer.
0034  * @return the pixmap of the URL, can be a default icon if not found
0035  * @deprecated since 5.75, use KIO::iconNameForUrl() to get the
0036  * icon name and
0037  * QIcon::fromTheme(name, QIcon::fromTheme(QStringLiteral("application-octet-stream")))
0038  */
0039 KIOWIDGETS_EXPORT
0040 KIOWIDGETS_DEPRECATED_VERSION(5, 75, "Use KIO::iconNameForUrl")
0041 QPixmap
0042 pixmapForUrl(const QUrl &url, int dummy = 0, KIconLoader::Group group = KIconLoader::Desktop, int force_size = 0, int state = 0, QString *path = nullptr);
0043 
0044 #endif
0045 }
0046 
0047 #endif /* KIO_PIXMAPLOADER_H */