| 1 | // Copyright (C) 2020 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QABSTRACTFILEICONPROVIDER_P_H |
| 5 | #define QABSTRACTFILEICONPROVIDER_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtGui/private/qtguiglobal_p.h> |
| 19 | #if QT_CONFIG(mimetype) |
| 20 | #include <QtCore/QMimeDatabase> |
| 21 | #endif |
| 22 | #include "qabstractfileiconprovider.h" |
| 23 | |
| 24 | QT_BEGIN_NAMESPACE |
| 25 | |
| 26 | class Q_GUI_EXPORT QAbstractFileIconProviderPrivate |
| 27 | { |
| 28 | Q_DECLARE_PUBLIC(QAbstractFileIconProvider) |
| 29 | |
| 30 | public: |
| 31 | QAbstractFileIconProviderPrivate(QAbstractFileIconProvider *q); |
| 32 | virtual ~QAbstractFileIconProviderPrivate(); |
| 33 | |
| 34 | QIcon getPlatformThemeIcon(QAbstractFileIconProvider::IconType type) const; |
| 35 | QIcon getIconThemeIcon(QAbstractFileIconProvider::IconType type) const; |
| 36 | QIcon getPlatformThemeIcon(const QFileInfo &info) const; |
| 37 | QIcon getIconThemeIcon(const QFileInfo &info) const; |
| 38 | |
| 39 | static void clearIconTypeCache(); |
| 40 | static QString getFileType(const QFileInfo &info); |
| 41 | |
| 42 | QAbstractFileIconProvider *q_ptr = nullptr; |
| 43 | QAbstractFileIconProvider::Options options = {}; |
| 44 | |
| 45 | #if QT_CONFIG(mimetype) |
| 46 | QMimeDatabase mimeDatabase; |
| 47 | #endif |
| 48 | }; |
| 49 | |
| 50 | QT_END_NAMESPACE |
| 51 | |
| 52 | #endif // QABSTRACTFILEICONPROVIDER_P_H |
| 53 |
