.BI "void \fBsetEntries\fR ( int count, const QRgb * colors, int base = 0 )"
.br
.ti -1c
.BI "void \fBsetEntry\fR ( int idx, QRgb color )"
.br
.ti -1c
.BI "void \fBsetEntry\fR ( int idx, const QColor & color )"
.br
.ti -1c
.BI "QRgb \fBentryRgb\fR ( int idx ) const"
.br
.ti -1c
.BI "QColor \fBentryColor\fR ( int idx ) const"
.br
.ti -1c
.BI "int \fBfind\fR ( QRgb color ) const"
.br
.ti -1c
.BI "int \fBfindNearest\fR ( QRgb color ) const"
.br
.in -1c
.SH DESCRIPTION
The QGLColormap class is used for installing custom colormaps into QGLWidgets.
.PP
QGLColormap provides a platform independent way of specifying and installing indexed colormaps into QGLWidgets. QGLColormap is especially useful when using the OpenGL color-index mode.
.PP
Under X11 you must use an X server that supports either a \fCPseudoColor\fR or \fCDirectColor\fR visual class. If your X server currently only provides a \fCGrayScale\fR, \fCTrueColor\fR, \fCStaticColor\fR or \fCStaticGray\fR visual, you will not be able to allocate colorcells for writing. If this is the case, try setting your X server to 8 bit mode. It should then provide you with at least a \fCPseudoColor\fR visual. Note that you may experience colormap flashing if your X server is running in 8 bit mode.
.PP
Under Windows the size of the colormap is always set to 256 colors. Note that under Windows you can also install colormaps in child widgets.
.PP
This class uses explicit sharing (see Shared Classes).
Assign a shallow copy of \fImap\fR to this QGLColormap.
.SH "void QGLColormap::setEntries ( int count, const QRgb * colors, int base = 0 )"
Set an array of cells in this colormap. \fIcount\fR is the number of colors that should be set, \fIcolors\fR is the array of colors, and \fIbase\fR is the starting index.
.SH "void QGLColormap::setEntry ( int idx, QRgb color )"
Set cell at index \fIidx\fR in the colormap to color \fIcolor\fR.
.SH "void QGLColormap::setEntry ( int idx, const QColor & color )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Set the cell with index \fIidx\fR in the colormap to color \fIcolor\fR.