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
qandroidplatformfileiconengine.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 QANDROIDPLATFORMFILEICONENGINE_H
5#define QANDROIDPLATFORMFILEICONENGINE_H
6
7#include <QtCore/qjnitypes.h>
8
9#include <QtGui/qpixmap.h>
10#include <QtGui/private/qabstractfileiconengine_p.h>
12
13#ifndef QT_NO_ICON
14
16
17Q_DECLARE_JNI_CLASS(Drawable, "android/graphics/drawable/Drawable")
18
19class QAndroidPlatformFileIconEngine : public QAbstractFileIconEngine
20{
21public:
22 explicit QAndroidPlatformFileIconEngine(const QFileInfo &info, QPlatformTheme::IconOptions opts);
23 ~QAndroidPlatformFileIconEngine();
24
25 QList<QSize> availableSizes(QIcon::Mode = QIcon::Normal, QIcon::State = QIcon::Off) override
26 { return {{16, 16}, {24, 24}, {48, 48}, {128, 128}}; }
27
28 bool isNull() override;
29
30protected:
31 QPixmap filePixmap(const QSize &size, QIcon::Mode, QIcon::State) override;
32
33private:
34 std::optional<QtJniTypes::Drawable> m_drawable;
35 QPixmap m_pixmap;
36};
37
38QT_END_NAMESPACE
39
40#endif // QT_NO_ICON
41
42#endif // QANDROIDPLATFORMFILEICONENGINE_H
Q_DECLARE_JNI_CLASS(MotionEvent, "android/view/MotionEvent")