Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > 6282078ae76a671f49c6af38c67b1a07 > files > 511

kdelibs-devel-2.2.2-49.2mdk.i586.rpm

<HTML>
<HEAD>
<TITLE>class KPalette</TITLE>

<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
	<TABLE BORDER="0">
		<TR><TD valign="top" align="left" cellspacing="10">
		<h1>class KPalette</h1>
		</TD>
		<TD valign="top" align="right" colspan="1">
 Class for handling Palettes. <small><A HREF="#longdesc">More...</A></small></TD></TR>
	</TABLE>
	<HR>
	<TABLE BORDER="0">
		<TR><TH>Definition</TH><TD><code>#include &lt;<A HREF="kpalette_h.html">kpalette.h</A>&gt;</code></TD></TR>
<TR><TH><A HREF="full-list-KPalette.html">List of all Methods</A></TH></TR>
	</TABLE>
	</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Types</h4><ul><LI>enum <A HREF="#ref11">Editable</A> { Yes, No, Ask }
</LI>
</ul><h4>Public Methods</h4><ul><LI>&nbsp;<b><A HREF="#ref2">KPalette</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &name=QString::null) 
</LI>
<LI>&nbsp;<b><A HREF="#ref3">KPalette</A></b> (const <A HREF="KPalette.html">KPalette</A> &) 
</LI>
<LI>virtual  &nbsp;<b><A HREF="#ref4">~KPalette</A></b> () 
</LI>
<LI><A HREF="KPalette.html">KPalette</A>& &nbsp;<b><A HREF="#ref5">operator=</A></b> ( const <A HREF="KPalette.html">KPalette</A> &) 
</LI>
<LI>bool &nbsp;<b><A HREF="#ref6">save</A></b> () 
</LI>
<LI><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &nbsp;<b><A HREF="#ref7">description</A></b> () 
</LI>
<LI>void &nbsp;<b><A HREF="#ref8">setDescription</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &desc) 
</LI>
<LI><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &nbsp;<b><A HREF="#ref9">name</A></b> () 
</LI>
<LI>void &nbsp;<b><A HREF="#ref10">setName</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &name) 
</LI>
<LI>Editable &nbsp;<b><A HREF="#ref12">editable</A></b> () 
</LI>
<LI>void &nbsp;<b><A HREF="#ref13">setEditable</A></b> (Editable editable) 
</LI>
<LI>int &nbsp;<b><A HREF="#ref14">nrColors</A></b> () 
</LI>
<LI><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &nbsp;<b><A HREF="#ref15">color</A></b> (int index) 
</LI>
<LI>int &nbsp;<b><A HREF="#ref16">findColor</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &color) 
</LI>
<LI><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &nbsp;<b><A HREF="#ref17">colorName</A></b> (int index) 
</LI>
<LI><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &nbsp;<b><A HREF="#ref18">colorName</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &color) 
</LI>
<LI>int &nbsp;<b><A HREF="#ref19">addColor</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &newColor, 
                const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &newColorName = QString::null) 
</LI>
<LI>int &nbsp;<b><A HREF="#ref20">changeColor</A></b> (int index, 
                   const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &newColor, 
                   const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &newColorName = QString::null) 
</LI>
<LI>int &nbsp;<b><A HREF="#ref21">changeColor</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &oldColor, 
                   const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &newColor, 
                   const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &newColorName = QString::null) 
</LI>
</ul><h4>Public Static Methods</h4><ul><LI>static  <A HREF="#QStringList">QStringList</A> &nbsp;<b><A HREF="#ref1">getPaletteList</A></b> () 
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
 Class for handling Palettes.
</p>
<p> This class makes it easy to handle palettes.
 A palette is a set of colors. This class can read
 and write palettes from and to a file.
</p>
<p> This class uses the "GIMP" palette file format.
</p>
<p> This class is totally unrelated to QPalette.
</p>
<p></p>
<A NAME="getPaletteList"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="#QStringList">QStringList</A> &nbsp;<strong>getPaletteList</strong> ()
<br></td><td align="right"><h3><strong>getPaletteList</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
 Query which KDE palettes are installed.
</p>
<p></p>
<p><b>Returns</b>: A list with a palette names.
    </p>
<A NAME="KPalette"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>KPalette</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &name=QString::null)
<br></td><td align="right"><h3><strong>KPalette</strong></h3></td></tr></table><p></p><p>
 KPalette constructor. Creates a KPalette from a file
 the filename is derived from the name.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">The name of palette as returned by <A HREF="KPalette.html#getPaletteList">getPaletteList</A>()
</TD></TR>
</TABLE></P>
<A NAME="KPalette"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>KPalette</strong> (const <A HREF="KPalette.html">KPalette</A> &)
<br></td><td align="right"><h3><strong>KPalette</strong></h3></td></tr></table><p></p><p>
 KPalette copy constructor.
</p>
<A NAME="~KPalette"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td> &nbsp;<strong>~KPalette</strong> ()
<br></td><td align="right"><h3><strong>~KPalette</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 KPalette destructor.
</p>
<A NAME="operator="></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="KPalette.html">KPalette</A>& &nbsp;<strong>operator=</strong> ( const <A HREF="KPalette.html">KPalette</A> &)
<br></td><td align="right"><h3><strong>operator=</strong></h3></td></tr></table><p></p><p>
 KPalette assignment operator
</p>
<A NAME="save"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool &nbsp;<strong>save</strong> ()
<br></td><td align="right"><h3><strong>save</strong></h3></td></tr></table><p></p><p>
 Save the palette
</p>
<p></p>
<p><b>Returns</b>: 'true' if successfull
</p>
<A NAME="description"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &nbsp;<strong>description</strong> ()
<br></td><td align="right"><h3><strong>description</strong></h3></td></tr></table><p></p><p>
 Get the description of the palette.
</p>
<A NAME="setDescription"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>setDescription</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &desc)
<br></td><td align="right"><h3><strong>setDescription</strong></h3></td></tr></table><p></p><p>   	
 Set the description of the palette.
</p>
<A NAME="name"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &nbsp;<strong>name</strong> ()
<br></td><td align="right"><h3><strong>name</strong></h3></td></tr></table><p></p><p>
 Get the name of the palette. 
</p>
<A NAME="setName"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>setName</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &name)
<br></td><td align="right"><h3><strong>setName</strong></h3></td></tr></table><p></p><p>
 Set the name of the palette.
</p>
<A NAME="Editable"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td>enum <strong>Editable</strong> { Yes, No, Ask }
</td><td align="right"><h3><strong>Editable</strong></h3></td></tr></table><p></p><A NAME="editable"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td>Editable &nbsp;<strong>editable</strong> ()
<br></td><td align="right"><h3><strong>editable</strong></h3></td></tr></table><p></p><p>
 Returns whether the palette may be edited.
</p>
<A NAME="setEditable"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>setEditable</strong> (Editable editable)
<br></td><td align="right"><h3><strong>setEditable</strong></h3></td></tr></table><p></p><p>
 Change whether the palette may be editted.
</p>
<A NAME="nrColors"></A><A NAME="ref14"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int &nbsp;<strong>nrColors</strong> ()
<br></td><td align="right"><h3><strong>nrColors</strong></h3></td></tr></table><p></p><p>
 Return the number of colors in the palette.
</p>
<A NAME="color"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &nbsp;<strong>color</strong> (int index)
<br></td><td align="right"><h3><strong>color</strong></h3></td></tr></table><p></p><p>
 Find color by index.
</p>
<p><b>Returns</b>: The <code>index</code> -th color of the palette.
</p>
<A NAME="findColor"></A><A NAME="ref16"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int &nbsp;<strong>findColor</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &color)
<br></td><td align="right"><h3><strong>findColor</strong></h3></td></tr></table><p></p><p>
 Find index by <code>color</code>.
</p>
<p><b>Returns</b>: The index of the color in the palette or -1 if the
 color is not found.
</p>
<A NAME="colorName"></A><A NAME="ref17"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &nbsp;<strong>colorName</strong> (int index)
<br></td><td align="right"><h3><strong>colorName</strong></h3></td></tr></table><p></p><p> 
 Find colorname by <code>index</code>.
</p>
<p><b>Returns</b>: The name of the <code>index</code> -th color.
 Note that not all palettes have named the colors.
</p>
<A NAME="colorName"></A><A NAME="ref18"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &nbsp;<strong>colorName</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &color)
<br></td><td align="right"><h3><strong>colorName</strong></h3></td></tr></table><p></p><p>
 Find colorname by <code>color</code>.
</p>
<p><b>Returns</b>: The name of color according to this palette.
 Note that not all palettes have named the colors.
 Note also that each palette can give the same color
 a different name.
</p>
<A NAME="addColor"></A><A NAME="ref19"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int &nbsp;<strong>addColor</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &newColor, 
                const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &newColorName = QString::null)
<br></td><td align="right"><h3><strong>addColor</strong></h3></td></tr></table><p></p><p>
 Add a color.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>newColor</i></TD><TD align="left" valign="top">The color to add.
</TD></TR>
<TR><TD align="left" valign="top"><i>newColorName</i></TD><TD align="left" valign="top">The name of the color.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: The index of the added color.
</p>
<A NAME="changeColor"></A><A NAME="ref20"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int &nbsp;<strong>changeColor</strong> (int index, 
                   const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &newColor, 
                   const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &newColorName = QString::null)
<br></td><td align="right"><h3><strong>changeColor</strong></h3></td></tr></table><p></p><p>
 Change a color.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>index</i></TD><TD align="left" valign="top">Index of the color to change
</TD></TR>
<TR><TD align="left" valign="top"><i>newColor</i></TD><TD align="left" valign="top">The new color.
</TD></TR>
<TR><TD align="left" valign="top"><i>newColorName</i></TD><TD align="left" valign="top">The new color name.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: The index of the new color or -1 if the color couldn't
 be changed.
</p>
<A NAME="changeColor"></A><A NAME="ref21"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int &nbsp;<strong>changeColor</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &oldColor, 
                   const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &newColor, 
                   const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> &newColorName = QString::null)
<br></td><td align="right"><h3><strong>changeColor</strong></h3></td></tr></table><p></p><p>
 Change a color.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>oldColor</i></TD><TD align="left" valign="top">The original color
</TD></TR>
<TR><TD align="left" valign="top"><i>newColor</i></TD><TD align="left" valign="top">The new color.
</TD></TR>
<TR><TD align="left" valign="top"><i>newColorName</i></TD><TD align="left" valign="top">The new color name.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: The index of the new color or -1 if the color couldn't
 be changed.
</p>
<HR><UL><LI><i>Version</i>: $Id: kpalette.h,v 1.4 2000/03/08 19:46:47 granroth Exp $
</LI><LI><i>Author</i>: Waldo Bastian (bastian@kde.org)
</LI><LI><i>Generated</i>: qateam on updates.mandrakesoft.com on Mon Dec 30 16:08:56 2002, using kdoc 2.0a53.</LI></UL></BODY></HTML>