Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qiconengine_p.h
Go to the documentation of this file.
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
25
26class QIconEngine;
27
29{
30public:
34
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
44 QIcon::State state = QIcon::Off) override;
45
46 QString iconName() override;
47 bool isNull() override;
49
50 void virtual_hook(int id, void *data) override;
51protected:
52 virtual QIconEngine *proxiedEngine() const = 0;
53};
54
56
57#endif // QT_NO_ICON
58
59#endif // QICONENGINE_P_H
\inmodule QtCore\reentrant
Definition qdatastream.h:46
The QIconEngine class provides an abstract base class for QIcon renderers.
Definition qiconengine.h:15
Mode
This enum type describes the mode for which a pixmap is intended to be used.
Definition qicon.h:22
@ Normal
Definition qicon.h:22
State
This enum describes the state for which a pixmap is intended to be used.
Definition qicon.h:23
@ Off
Definition qicon.h:23
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
QPixmap scaledPixmap(const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) override
void addFile(const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state) override
Called by QIcon::addFile().
virtual QIconEngine * proxiedEngine() const =0
void virtual_hook(int id, void *data) override
QIconEngine * clone() const override
Reimplement this method to return a clone of this icon engine.
bool read(QDataStream &in) override
Reads icon engine contents from the QDataStream in.
QList< QSize > availableSizes(QIcon::Mode mode=QIcon::Normal, QIcon::State state=QIcon::Off) override
bool isNull() override
bool write(QDataStream &out) const override
Writes the contents of this engine to the QDataStream out.
QString key() const override
\variable QIconEngine::ScaledPixmapArgument::size
void addPixmap(const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state) override
Called by QIcon::addPixmap().
QString iconName() override
QSize actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state) override
Returns the actual size of the icon the engine provides for the requested size, mode and state.
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QPainter paint
rect
[4]
else opt state
[0]
Combined button and popup list for selecting options.
GLenum mode
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint in
GLenum GLenum GLenum GLenum GLenum scale
double qreal
Definition qtypes.h:187
QTextStream out(stdout)
[7]
widget render & pixmap
QPainter painter(this)
[7]