File indexing completed on 2025-01-18 10:09:32
0001
0002
0003
0004 #ifndef QCOLORMAP_H
0005 #define QCOLORMAP_H
0006
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtGui/qrgb.h>
0009 #include <QtGui/qwindowdefs.h>
0010 #include <QtCore/qatomic.h>
0011 #include <QtCore/qlist.h>
0012
0013 QT_BEGIN_NAMESPACE
0014
0015
0016 class QColor;
0017 class QColormapPrivate;
0018
0019 class Q_WIDGETS_EXPORT QColormap
0020 {
0021 public:
0022 enum Mode { Direct, Indexed, Gray };
0023
0024 static void initialize();
0025 static void cleanup();
0026
0027 static QColormap instance(int screen = -1);
0028
0029 QColormap(const QColormap &colormap);
0030 ~QColormap();
0031
0032 QColormap &operator=(const QColormap &colormap);
0033
0034 Mode mode() const;
0035
0036 int depth() const;
0037 int size() const;
0038
0039 uint pixel(const QColor &color) const;
0040 const QColor colorAt(uint pixel) const;
0041
0042 const QList<QColor> colormap() const;
0043
0044 private:
0045 QColormap();
0046 QColormapPrivate *d;
0047 };
0048
0049 QT_END_NAMESPACE
0050
0051 #endif