<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_09) on Tue Aug 07 17:02:57 CEST 2007 --> <TITLE> QPalette.ColorRole </TITLE> <META NAME="keywords" CONTENT="com.trolltech.qt.gui.QPalette.ColorRole class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="QPalette.ColorRole"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorGroup.html" title="enum in com.trolltech.qt.gui"><B>PREV CLASS</B></A> <A HREF="../../../../com/trolltech/qt/gui/QPen.html" title="class in com.trolltech.qt.gui"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/trolltech/qt/gui/QPalette.ColorRole.html" target="_top"><B>FRAMES</B></A> <A HREF="QPalette.ColorRole.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#enum_constant_summary">ENUM CONSTANTS</A> | FIELD | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#enum_constant_detail">ENUM CONSTANTS</A> | FIELD | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.trolltech.qt.gui</FONT> <BR> Enum QPalette.ColorRole</H2> <PRE> java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.lang.Enum<<A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A>> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.trolltech.qt.gui.QPalette.ColorRole</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/trolltech/qt/QtEnumerator.html" title="interface in com.trolltech.qt">QtEnumerator</A>, java.io.Serializable, java.lang.Comparable<<A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A>></DD> </DL> <DL> <DT><B>Enclosing class:</B><DD><A HREF="../../../../com/trolltech/qt/gui/QPalette.html" title="class in com.trolltech.qt.gui">QPalette</A></DD> </DL> <HR> <DL> <DT><PRE>public static enum <B>QPalette.ColorRole</B><DT>extends java.lang.Enum<<A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A>><DT>implements <A HREF="../../../../com/trolltech/qt/QtEnumerator.html" title="interface in com.trolltech.qt">QtEnumerator</A></DL> </PRE> <P> <p align="center"><img src="%2E%2E/images/palette.png" alt="Color Roles" /></p><p>The <a href="QPalette.html#ColorRole-enum"><tt>ColorRole</tt></a> enum defines the different symbolic color roles used in current GUIs.</p> <p>The central roles are:</p> <p><table border="1" cellpadding="2" cellspacing="1" width="100%"> <tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr> <tr><td valign="top"><tt>Window</tt></td><td align="center" valign="top"><tt>10</tt></td><td valign="top">A general background color.</td></tr> <tr><td valign="top"><tt>Background</tt></td><td align="center" valign="top"><tt>10</tt></td><td valign="top">This value is obsolete. Use Window instead.</td></tr> <tr><td valign="top"><tt>WindowText</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">A general foreground color.</td></tr> <tr><td valign="top"><tt>Foreground</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">This value is obsolete. Use <a href="QPalette.html#ColorRole-enum"><tt>WindowText</tt></a> instead.</td></tr> <tr><td valign="top"><tt>Base</tt></td><td align="center" valign="top"><tt>9</tt></td><td valign="top">Used as the background color for text entry widgets; usually white or another light color.</td></tr> <tr><td valign="top"><tt>AlternateBase</tt></td><td align="center" valign="top"><tt>16</tt></td><td valign="top">Used as the alternate background color in views with alternating row colors (see QAbstractItemView::setAlternatingRowColors()).</td></tr> <tr><td valign="top"><tt>Text</tt></td><td align="center" valign="top"><tt>6</tt></td><td valign="top">The foreground color used with <tt>Base</tt>. This is usually the same as the <tt>WindowText</tt>, in which case it must provide good contrast with <tt>Window</tt> and <tt>Base</tt>.</td></tr> <tr><td valign="top"><tt>Button</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The general button background color. This background can be different from <tt>Window</tt> as some styles require a different background color for buttons.</td></tr> <tr><td valign="top"><tt>ButtonText</tt></td><td align="center" valign="top"><tt>8</tt></td><td valign="top">A foreground color used with the <tt>Button</tt> color.</td></tr> <tr><td valign="top"><tt>BrightText</tt></td><td align="center" valign="top"><tt>7</tt></td><td valign="top">A text color that is very different from <tt>WindowText</tt>, and contrasts well with e.g. <tt>Dark</tt>. Typically used for text that needs to be drawn where <tt>Text</tt> or <tt>WindowText</tt> would give poor contrast, such as on pressed push buttons. Note that text colors can be used for things other than just words; text colors are <i>usually</i> used for text, but it's quite common to use the text color roles for lines, icons, etc.</td></tr> </table></p> <p>There are some color roles used mostly for 3D bevel and shadow effects. All of these are normally derived from <tt>Window</tt>, and used in ways that depend on that relationship. For example, buttons depend on it to make the bevels look attractive, and Motif scroll bars depend on <tt>Mid</tt> to be slightly different from <tt>Window</tt>.</p> <p><table border="1" cellpadding="2" cellspacing="1" width="100%"> <tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr> <tr><td valign="top"><tt>Light</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Lighter than <tt>Button</tt> color.</td></tr> <tr><td valign="top"><tt>Midlight</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">Between <tt>Button</tt> and <tt>Light</tt>.</td></tr> <tr><td valign="top"><tt>Dark</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">Darker than <tt>Button</tt>.</td></tr> <tr><td valign="top"><tt>Mid</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">Between <tt>Button</tt> and <tt>Dark</tt>.</td></tr> <tr><td valign="top"><tt>Shadow</tt></td><td align="center" valign="top"><tt>11</tt></td><td valign="top">A very dark color. By default, the shadow color is Qt::black.</td></tr> </table></p> <p>Selected (marked) items have two roles:</p> <p><table border="1" cellpadding="2" cellspacing="1" width="100%"> <tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr> <tr><td valign="top"><tt>Highlight</tt></td><td align="center" valign="top"><tt>12</tt></td><td valign="top">A color to indicate a selected item or the current item. By default, the highlight color is Qt::darkBlue.</td></tr> <tr><td valign="top"><tt>HighlightedText</tt></td><td align="center" valign="top"><tt>13</tt></td><td valign="top">A text color that contrasts with <tt>Highlight</tt>. By default, the highlighted text color is Qt::white.</td></tr> </table></p> <p>There are two color roles related to hyperlinks:</p> <p><table border="1" cellpadding="2" cellspacing="1" width="100%"> <tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr> <tr><td valign="top"><tt>Link</tt></td><td align="center" valign="top"><tt>14</tt></td><td valign="top">A text color used for unvisited hyperlinks. By default, the link color is Qt::blue.</td></tr> <tr><td valign="top"><tt>LinkVisited</tt></td><td align="center" valign="top"><tt>15</tt></td><td valign="top">A text color used for already visited hyperlinks. By default, the linkvisited color is Qt::magenta.</td></tr> </table></p> <p>Note that we do not use the <tt>Link</tt> and <tt>LinkVisited</tt> roles when rendering rich text in Qt, and that we recommend that you use CSS and the QTextDocument::setDefaultStyleSheet() function to alter the appearance of links. For example:</p> <pre> QTextBrowser browser; QColor linkColor(Qt::red); QString sheet = QString::fromLatin1("a { text-decoration: underline; color: %1 }").arg(linkColor.name()); browser.document()->setDefaultStyleSheet(sheet);</pre> <P> <P> <HR> <P> <!-- =========== ENUM CONSTANT SUMMARY =========== --> <A NAME="enum_constant_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Enum Constant Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#AlternateBase">AlternateBase</A></B></CODE> <BR> Used as the alternate background color in views with alternating row colors (see QAbstractItemView::setAlternatingRowColors()).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#Base">Base</A></B></CODE> <BR> Used as the background color for text entry widgets; usually white or another light color.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#BrightText">BrightText</A></B></CODE> <BR> A text color that is very different from <tt>WindowText</tt>, and contrasts well with e.g. <tt>Dark</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#Button">Button</A></B></CODE> <BR> The general button background color.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#ButtonText">ButtonText</A></B></CODE> <BR> A foreground color used with the <tt>Button</tt> color.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#Dark">Dark</A></B></CODE> <BR> Darker than <tt>Button</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#Highlight">Highlight</A></B></CODE> <BR> A color to indicate a selected item or the current item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#HighlightedText">HighlightedText</A></B></CODE> <BR> A text color that contrasts with <tt>Highlight</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#Light">Light</A></B></CODE> <BR> Lighter than <tt>Button</tt> color.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#Link">Link</A></B></CODE> <BR> A text color used for unvisited hyperlinks.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#LinkVisited">LinkVisited</A></B></CODE> <BR> A text color used for already visited hyperlinks.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#Mid">Mid</A></B></CODE> <BR> Between <tt>Button</tt> and <tt>Dark</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#Midlight">Midlight</A></B></CODE> <BR> Between <tt>Button</tt> and <tt>Light</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#NoRole">NoRole</A></B></CODE> <BR> Internal.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#Shadow">Shadow</A></B></CODE> <BR> A very dark color.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#Text">Text</A></B></CODE> <BR> The foreground color used with <tt>Base</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#Window">Window</A></B></CODE> <BR> A general background color.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#WindowText">WindowText</A></B></CODE> <BR> A general foreground color.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#resolve(int)">resolve</A></B>(int value)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#value()">value</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#valueOf(java.lang.String)">valueOf</A></B>(java.lang.String name)</CODE> <BR> Returns the enum constant of this type with the specified name.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html#values()">values</A></B>()</CODE> <BR> Returns an array containing the constants of this enum type, in the order they're declared.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Enum"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Enum</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf</CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>finalize, getClass, notify, notifyAll, wait, wait, wait</CODE></TD> </TR> </TABLE> <P> <!-- ============ ENUM CONSTANT DETAIL =========== --> <A NAME="enum_constant_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Enum Constant Detail</B></FONT></TH> </TR> </TABLE> <A NAME="WindowText"><!-- --></A><H3> WindowText</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>WindowText</B></PRE> <DL> <DD><p>A general foreground color.</p> <P> <DL> </DL> </DL> <HR> <A NAME="Button"><!-- --></A><H3> Button</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>Button</B></PRE> <DL> <DD><p>The general button background color. This background can be different from <tt>Window</tt> as some styles require a different background color for buttons.</p> <P> <DL> </DL> </DL> <HR> <A NAME="Light"><!-- --></A><H3> Light</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>Light</B></PRE> <DL> <DD><p>Lighter than <tt>Button</tt> color.</p> <P> <DL> </DL> </DL> <HR> <A NAME="Midlight"><!-- --></A><H3> Midlight</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>Midlight</B></PRE> <DL> <DD><p>Between <tt>Button</tt> and <tt>Light</tt>.</p> <P> <DL> </DL> </DL> <HR> <A NAME="Dark"><!-- --></A><H3> Dark</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>Dark</B></PRE> <DL> <DD><p>Darker than <tt>Button</tt>.</p> <P> <DL> </DL> </DL> <HR> <A NAME="Mid"><!-- --></A><H3> Mid</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>Mid</B></PRE> <DL> <DD><p>Between <tt>Button</tt> and <tt>Dark</tt>.</p> <P> <DL> </DL> </DL> <HR> <A NAME="Text"><!-- --></A><H3> Text</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>Text</B></PRE> <DL> <DD><p>The foreground color used with <tt>Base</tt>. This is usually the same as the <tt>WindowText</tt>, in which case it must provide good contrast with <tt>Window</tt> and <tt>Base</tt>.</p> <P> <DL> </DL> </DL> <HR> <A NAME="BrightText"><!-- --></A><H3> BrightText</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>BrightText</B></PRE> <DL> <DD><p>A text color that is very different from <tt>WindowText</tt>, and contrasts well with e.g. <tt>Dark</tt>. Typically used for text that needs to be drawn where <tt>Text</tt> or <tt>WindowText</tt> would give poor contrast, such as on pressed push buttons. Note that text colors can be used for things other than just words; text colors are <i>usually</i> used for text, but it's quite common to use the text color roles for lines, icons, etc.</p> <P> <DL> </DL> </DL> <HR> <A NAME="ButtonText"><!-- --></A><H3> ButtonText</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>ButtonText</B></PRE> <DL> <DD><p>A foreground color used with the <tt>Button</tt> color.</p> <P> <DL> </DL> </DL> <HR> <A NAME="Base"><!-- --></A><H3> Base</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>Base</B></PRE> <DL> <DD><p>Used as the background color for text entry widgets; usually white or another light color.</p> <P> <DL> </DL> </DL> <HR> <A NAME="Window"><!-- --></A><H3> Window</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>Window</B></PRE> <DL> <DD><p>A general background color.</p> <P> <DL> </DL> </DL> <HR> <A NAME="Shadow"><!-- --></A><H3> Shadow</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>Shadow</B></PRE> <DL> <DD><p>A very dark color. By default, the shadow color is Qt::black.</p> <P> <DL> </DL> </DL> <HR> <A NAME="Highlight"><!-- --></A><H3> Highlight</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>Highlight</B></PRE> <DL> <DD><p>A color to indicate a selected item or the current item. By default, the highlight color is Qt::darkBlue.</p> <P> <DL> </DL> </DL> <HR> <A NAME="HighlightedText"><!-- --></A><H3> HighlightedText</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>HighlightedText</B></PRE> <DL> <DD><p>A text color that contrasts with <tt>Highlight</tt>. By default, the highlighted text color is Qt::white.</p> <P> <DL> </DL> </DL> <HR> <A NAME="Link"><!-- --></A><H3> Link</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>Link</B></PRE> <DL> <DD><p>A text color used for unvisited hyperlinks. By default, the link color is Qt::blue.</p> <P> <DL> </DL> </DL> <HR> <A NAME="LinkVisited"><!-- --></A><H3> LinkVisited</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>LinkVisited</B></PRE> <DL> <DD><p>A text color used for already visited hyperlinks. By default, the linkvisited color is Qt::magenta.</p> <P> <DL> </DL> </DL> <HR> <A NAME="AlternateBase"><!-- --></A><H3> AlternateBase</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>AlternateBase</B></PRE> <DL> <DD><p>Used as the alternate background color in views with alternating row colors (see QAbstractItemView::setAlternatingRowColors()).</p> <P> <DL> </DL> </DL> <HR> <A NAME="NoRole"><!-- --></A><H3> NoRole</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>NoRole</B></PRE> <DL> <DD>Internal. <P> <DL> </DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="values()"><!-- --></A><H3> values</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A>[] <B>values</B>()</PRE> <DL> <DD>Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows: <pre> for(QPalette.ColorRole c : QPalette.ColorRole.values()) System.out.println(c); </pre> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an array containing the constants of this enum type, in the order they're declared</DL> </DD> </DL> <HR> <A NAME="valueOf(java.lang.String)"><!-- --></A><H3> valueOf</H3> <PRE> public static <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>valueOf</B>(java.lang.String name)</PRE> <DL> <DD>Returns the enum constant of this type with the specified name. The string must match <I>exactly</I> an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.) <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the enum constant to be returned. <DT><B>Returns:</B><DD>the enum constant with the specified name <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalArgumentException</CODE> - if this enum type has no constant with the specified name</DL> </DD> </DL> <HR> <A NAME="value()"><!-- --></A><H3> value</H3> <PRE> public int <B>value</B>()</PRE> <DL> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/QtEnumerator.html#value()">value</A></CODE> in interface <CODE><A HREF="../../../../com/trolltech/qt/QtEnumerator.html" title="interface in com.trolltech.qt">QtEnumerator</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="resolve(int)"><!-- --></A><H3> resolve</H3> <PRE> public static <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorRole.html" title="enum in com.trolltech.qt.gui">QPalette.ColorRole</A> <B>resolve</B>(int value)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/trolltech/qt/gui/QPalette.ColorGroup.html" title="enum in com.trolltech.qt.gui"><B>PREV CLASS</B></A> <A HREF="../../../../com/trolltech/qt/gui/QPen.html" title="class in com.trolltech.qt.gui"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/trolltech/qt/gui/QPalette.ColorRole.html" target="_top"><B>FRAMES</B></A> <A HREF="QPalette.ColorRole.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#enum_constant_summary">ENUM CONSTANTS</A> | FIELD | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#enum_constant_detail">ENUM CONSTANTS</A> | FIELD | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>