Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qapplefileiconengine_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 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 QAPPLEFILEICONENGINE_P_H
5#define QAPPLEFILEICONENGINE_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/qabstractfileiconengine_p.h>
19#include <QtCore/private/qcore_mac_p.h>
20
23
25
26class Q_GUI_EXPORT QAppleFileIconEngine : public QAbstractFileIconEngine
27{
28public:
29 explicit QAppleFileIconEngine(const QFileInfo &info, QPlatformTheme::IconOptions opts);
30 ~QAppleFileIconEngine() override;
31
32 bool isNull() override;
33 QList<QSize> availableSizes(QIcon::Mode = QIcon::Normal, QIcon::State = QIcon::Off) override;
34
35protected:
36 QPixmap filePixmap(const QSize &size, QIcon::Mode, QIcon::State) override;
37
38private:
39#if defined(Q_OS_MACOS)
40 NSImage *m_image = nil;
41#elif defined(QT_PLATFORM_UIKIT)
42 UIImage *m_image = nil;
43#endif
44
45 QPixmap m_pixmap;
46};
47
48
49QT_END_NAMESPACE
50
51#endif // QAPPLEFILEICONENGINE_P_H
Q_FORWARD_DECLARE_OBJC_CLASS(NSImage)
Q_FORWARD_DECLARE_OBJC_CLASS(UIImage)