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
qpixmapcache_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QPIXMAPCACHE_P_H
5#define QPIXMAPCACHE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. This header
12// file may change from version to version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <QtGui/private/qtguiglobal_p.h>
18#include "qpixmapcache.h"
19#include "qpaintengine.h"
20#include <private/qimage_p.h>
21#include <private/qpixmap_raster_p.h>
22#include "qcache.h"
23
25
27{
28public:
29 KeyData() : isValid(true), key(0), ref(1) {}
33
35 bool isValid;
36 int key;
37 int ref;
38};
39
40// XXX: hw: is this a general concept we need to abstract?
42{
43public:
45 {
46 QPlatformPixmap *pd = handle();
47 if (pd && pd->classId() == QPlatformPixmap::RasterClass) {
49 if (!d->image.isNull() && d->image.d->paintEngine
50 && !d->image.d->paintEngine->isActive())
51 {
52 delete d->image.d->paintEngine;
53 d->image.d->paintEngine = nullptr;
54 }
55 }
56 }
59};
60
62
63#endif // QPIXMAPCACHE_P_H
QPixmapCache::Key key
QPixmapCacheEntry(const QPixmapCache::Key &key, const QPixmap &pix)
KeyData(const KeyData &other)
The QPixmapCache::Key class can be used for efficient access to the QPixmapCache.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
QPlatformPixmap * handle() const
Definition qpixmap.cpp:1506
The QPlatformPixmap class provides an abstraction for native pixmaps.
ClassId classId() const
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QPixmap pix
Combined button and popup list for selecting options.
GLuint64 key
GLint ref
QSharedPointer< T > other(t)
[5]
QPaintEngine * paintEngine
Definition qimage_p.h:76