1// Copyright (C) 2023 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 QICONENGINE_P_H
5#define QICONENGINE_P_H
6
7#include <QtGui/private/qtguiglobal_p.h>
8
9#ifndef QT_NO_ICON
10//
11// W A R N I N G
12// -------------
13//
14// This file is not part of the Qt API. It exists purely as an
15// implementation detail. This header file may change from version to
16// version without notice, or even be removed.
17//
18// We mean it.
19//
20
21#include <QtGui/QIcon>
22#include <QtGui/QIconEngine>
23
24QT_BEGIN_NAMESPACE
25
26class QIconEngine;
27
28class QProxyIconEngine : public QIconEngine
29{
30public:
31 void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) override;
32 QSize actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state) override;
33 QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) override;
34
35 void addPixmap(const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state) override;
36 void addFile(const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state) override;
37
38 QString key() const override;
39 QIconEngine *clone() const override;
40 bool read(QDataStream &in) override;
41 bool write(QDataStream &out) const override;
42
43 QList<QSize> availableSizes(QIcon::Mode mode = QIcon::Normal,
44 QIcon::State state = QIcon::Off) override;
45
46 QString iconName() override;
47 bool isNull() override;
48 QPixmap scaledPixmap(const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) override;
49
50 void virtual_hook(int id, void *data) override;
51protected:
52 virtual QIconEngine *proxiedEngine() const = 0;
53};
54
55QT_END_NAMESPACE
56
57#endif // QT_NO_ICON
58
59#endif // QICONENGINE_P_H
60

source code of qtbase/src/gui/image/qiconengine_p.h