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
qwindowsiconengine.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 QWINDOWSICONENGINE_H
5#define QWINDOWSICONENGINE_H
6
7#include <QtCore/qt_windows.h>
8
9#include <QtGui/qfont.h>
10#include <QtGui/qiconengine.h>
11
13
15{
16public:
19 QIconEngine *clone() const override;
20 QString key() const override;
21 QString iconName() override;
22 bool isNull() override;
23
24 QList<QSize> availableSizes(QIcon::Mode, QIcon::State) override;
29
30private:
31 static constexpr quint64 calculateCacheKey(QIcon::Mode mode, QIcon::State state)
32 {
33 return (quint64(mode) << 32) | state;
34 }
35
36 QString glyphs() const;
37
38 const QString m_iconName;
39 const QFont m_iconFont;
40 const QString m_glyphs;
41 mutable QPixmap m_pixmap;
42 mutable quint64 m_cacheKey = {};
43};
44
46
47#endif // QWINDOWSICONENGINE_H
\reentrant
Definition qfont.h:22
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
State
This enum describes the state for which a pixmap is intended to be used.
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
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
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.
QIconEngine * clone() const override
Reimplement this method to return a clone of this icon engine.
QString iconName() override
QList< QSize > availableSizes(QIcon::Mode, QIcon::State) override
QString key() const override
\variable QIconEngine::ScaledPixmapArgument::size
QWindowsIconEngine(const QString &iconName)
QPixmap scaledPixmap(const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) override
QPainter paint
rect
[4]
else opt state
[0]
Combined button and popup list for selecting options.
GLenum mode
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLenum GLenum GLenum scale
unsigned long long quint64
Definition qtypes.h:61
double qreal
Definition qtypes.h:187
widget render & pixmap
QPainter painter(this)
[7]