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
qcolormap.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// Qt-Security score:significant reason:default
4
5#ifndef QCOLORMAP_H
6#define QCOLORMAP_H
7
8#include <QtWidgets/qtwidgetsglobal.h>
9#include <QtGui/qrgb.h>
10#include <QtGui/qwindowdefs.h>
11#include <QtCore/qatomic.h>
12#include <QtCore/qlist.h>
13
14QT_BEGIN_NAMESPACE
15
16class QColor;
17class QColormapPrivate;
18
19#if QT_REMOVAL_QT7_DEPRECATED_SINCE(6, 11)
20class Q_WIDGETS_EXPORT QT_DEPRECATED_VERSION_6_11 QColormap
21{
22public:
23 enum Mode { Direct, Indexed, Gray };
24
25 static void initialize();
26 static void cleanup();
27
28 static QColormap instance(int screen = -1);
29
30 QColormap(const QColormap &colormap);
31 ~QColormap();
32
33 QColormap &operator=(const QColormap &colormap);
34
35 Mode mode() const;
36
37 int depth() const;
38 int size() const;
39
40 uint pixel(const QColor &color) const;
41 const QColor colorAt(uint pixel) const;
42
43 const QList<QColor> colormap() const;
44
45private:
46 QColormap();
47 QColormapPrivate *d;
48};
49#endif // QT_REMOVAL_QT7_DEPRECATED_SINCE(6, 11)
50
51QT_END_NAMESPACE
52
53#endif // QCOLORMAP_H
Combined button and popup list for selecting options.