<class name="QGLColormap" doc="/**
&lt;p&gt;The &lt;a href=&quot;QGLColormap.html#QGLColormap(com.trolltech.qt.opengl.QGLColormap)&quot;&gt;&lt;tt&gt;QGLColormap&lt;/tt&gt;&lt;/a&gt; class is used for installing custom colormaps into QGLWidgets.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QGLColormap.html#QGLColormap(com.trolltech.qt.opengl.QGLColormap)&quot;&gt;&lt;tt&gt;QGLColormap&lt;/tt&gt;&lt;/a&gt; provides a platform independent way of specifying and installing indexed colormaps into QGLWidgets. &lt;a href=&quot;QGLColormap.html#QGLColormap(com.trolltech.qt.opengl.QGLColormap)&quot;&gt;&lt;tt&gt;QGLColormap&lt;/tt&gt;&lt;/a&gt; is especially useful when using the OpenGL color-index mode.&lt;/p&gt;
&lt;p&gt;Under X11 you must use an X server that supports either a &lt;tt&gt;PseudoColor&lt;/tt&gt; or &lt;tt&gt;DirectColor&lt;/tt&gt; visual class. If your X server currently only provides a &lt;tt&gt;GrayScale&lt;/tt&gt;, &lt;tt&gt;TrueColor&lt;/tt&gt;, &lt;tt&gt;StaticColor&lt;/tt&gt; or &lt;tt&gt;StaticGray&lt;/tt&gt; 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 &lt;tt&gt;PseudoColor&lt;/tt&gt; visual. Note that you may experience colormap flashing if your X server is running in 8 bit mode.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;This class uses implicit sharing&lt;/tt&gt; as a memory and speed optimization.&lt;/p&gt;
&lt;p&gt;Example of use:&lt;/p&gt;
&lt;pre&gt;    #include &amp;lt;QApplication&amp;gt;
    #include &amp;lt;QGLColormap&amp;gt;

    int main()
    {
        QApplication app(argc, argv);

        MySuperGLWidget widget;     &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; a QGLWidget in color-index mode
        QGLColormap colormap;

        &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; This will fill the colormap with colors ranging from
        &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; black to white.
        for (int i = 0; i &amp;lt; colormap.size(); i++)
            colormap.setEntry(i, qRgb(i, i, i));

        widget.setColormap(colormap);
        widget.show();
        return app.exec();
    }&lt;/pre&gt;

@see &lt;tt&gt;QGLWidget::setColormap&lt;/tt&gt;
@see &lt;tt&gt;QGLWidget::colormap&lt;/tt&gt; */">
    <method name="public QGLColormap()" doc="/**
&lt;p&gt;Construct a &lt;a href=&quot;QGLColormap.html#QGLColormap(com.trolltech.qt.opengl.QGLColormap)&quot;&gt;&lt;tt&gt;QGLColormap&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
    <method name="public QGLColormap(com.trolltech.qt.opengl.QGLColormap arg__1)" doc="/**
&lt;p&gt;Construct a shallow copy of &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.gui.QColor entryColor(int idx)" doc="/**
&lt;p&gt;Returns the QRgb value in the colorcell with index &lt;tt&gt;idx&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final int entryRgb(int idx)" doc="/**
&lt;p&gt;Returns the QRgb value in the colorcell with index &lt;tt&gt;idx&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final int find(int color)" doc="/**
&lt;p&gt;Returns the index of the color &lt;tt&gt;color&lt;/tt&gt;. If &lt;tt&gt;color&lt;/tt&gt; is not in the map, -1 is returned.&lt;/p&gt;
 */"/>
    <method name="public final int findNearest(int color)" doc="/**
&lt;p&gt;Returns the index of the color that is the closest match to color &lt;tt&gt;color&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="protected final long handle()" doc="/**
&lt;p&gt;&lt;/p&gt;

@see &lt;a href=&quot;QGLColormap.html#setHandle(long)&quot;&gt;&lt;tt&gt;setHandle&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isEmpty()" doc="/**
&lt;p&gt;Returns true if the colormap is empty; otherwise returns false. A colormap with no color values set is considered to be empty.&lt;/p&gt;
 */"/>
    <method name="public final void setEntry(int idx, com.trolltech.qt.gui.QColor color)" doc="/**
&lt;p&gt;Set the cell with index &lt;tt&gt;idx&lt;/tt&gt; in the colormap to color &lt;tt&gt;color&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final void setEntry(int idx, int color)" doc="/**
&lt;p&gt;Set cell at index &lt;tt&gt;idx&lt;/tt&gt; in the colormap to color &lt;tt&gt;color&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="protected final void setHandle(long ahandle)" doc="/**
&lt;p&gt;&lt;/p&gt;

@see &lt;a href=&quot;QGLColormap.html#handle()&quot;&gt;&lt;tt&gt;handle&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int size()" doc="/**
&lt;p&gt;Returns the number of colorcells in the colormap.&lt;/p&gt;
 */"/>
</class>
