1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QPalette Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QPalette Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QPalette class contains color groups for each widget state. <a href="#details">More...</a></p>
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qpalette.html#ColorGroup-enum">ColorGroup</a></b> { Active, Disabled, Inactive, NColorGroups, ..., Normal }</li><li><div class="fn" />enum <b><a href="qpalette.html#ColorRole-enum">ColorRole</a></b> { WindowText, Foreground, Button, Light, ..., NoRole }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qpalette.html#QPalette">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qpalette.html#QPalette-2">__init__</a></b> (<i>self</i>, QColor <i>button</i>)</li><li><div class="fn" /><b><a href="qpalette.html#QPalette-3">__init__</a></b> (<i>self</i>, Qt.GlobalColor <i>button</i>)</li><li><div class="fn" /><b><a href="qpalette.html#QPalette-4">__init__</a></b> (<i>self</i>, QColor <i>button</i>, QColor <i>background</i>)</li><li><div class="fn" /><b><a href="qpalette.html#QPalette-5">__init__</a></b> (<i>self</i>, QBrush <i>foreground</i>, QBrush <i>button</i>, QBrush <i>light</i>, QBrush <i>dark</i>, QBrush <i>mid</i>, QBrush <i>text</i>, QBrush <i>bright_text</i>, QBrush <i>base</i>, QBrush <i>background</i>)</li><li><div class="fn" /><b><a href="qpalette.html#QPalette-6">__init__</a></b> (<i>self</i>, QColor <i>foreground</i>, QColor <i>background</i>, QColor <i>light</i>, QColor <i>dark</i>, QColor <i>mid</i>, QColor <i>text</i>, QColor <i>base</i>)</li><li><div class="fn" /><b><a href="qpalette.html#QPalette-7">__init__</a></b> (<i>self</i>, QVariant)</li><li><div class="fn" /><b><a href="qpalette.html#QPalette-8">__init__</a></b> (<i>self</i>, QPalette <i>palette</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#alternateBase">alternateBase</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#background">background</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#base">base</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#brightText">brightText</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#brush">brush</a></b> (<i>self</i>, ColorGroup <i>cg</i>, ColorRole <i>cr</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#brush-2">brush</a></b> (<i>self</i>, ColorRole <i>cr</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#button">button</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#buttonText">buttonText</a></b> (<i>self</i>)</li><li><div class="fn" />QColor <b><a href="qpalette.html#color">color</a></b> (<i>self</i>, ColorGroup <i>cg</i>, ColorRole <i>cr</i>)</li><li><div class="fn" />QColor <b><a href="qpalette.html#color-2">color</a></b> (<i>self</i>, ColorRole <i>cr</i>)</li><li><div class="fn" />ColorGroup <b><a href="qpalette.html#currentColorGroup">currentColorGroup</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#dark">dark</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#foreground">foreground</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#highlight">highlight</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#highlightedText">highlightedText</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qpalette.html#isCopyOf">isCopyOf</a></b> (<i>self</i>, QPalette <i>p</i>)</li><li><div class="fn" />bool <b><a href="qpalette.html#isEqual">isEqual</a></b> (<i>self</i>, ColorGroup <i>cr1</i>, ColorGroup <i>cr2</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#light">light</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#link">link</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#linkVisited">linkVisited</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#mid">mid</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#midlight">midlight</a></b> (<i>self</i>)</li><li><div class="fn" />QPalette <b><a href="qpalette.html#resolve">resolve</a></b> (<i>self</i>, QPalette)</li><li><div class="fn" />unsigned long <b><a href="qpalette.html#resolve-2">resolve</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qpalette.html#resolve-3">resolve</a></b> (<i>self</i>, unsigned long <i>mask</i>)</li><li><div class="fn" />int <b><a href="qpalette.html#serialNumber">serialNumber</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qpalette.html#setBrush">setBrush</a></b> (<i>self</i>, ColorGroup <i>cg</i>, ColorRole <i>cr</i>, QBrush <i>brush</i>)</li><li><div class="fn" /><b><a href="qpalette.html#setBrush-2">setBrush</a></b> (<i>self</i>, ColorRole <i>acr</i>, QBrush <i>abrush</i>)</li><li><div class="fn" /><b><a href="qpalette.html#setColor">setColor</a></b> (<i>self</i>, ColorGroup <i>acg</i>, ColorRole <i>acr</i>, QColor <i>acolor</i>)</li><li><div class="fn" /><b><a href="qpalette.html#setColor-2">setColor</a></b> (<i>self</i>, ColorRole <i>acr</i>, QColor <i>acolor</i>)</li><li><div class="fn" /><b><a href="qpalette.html#setColorGroup">setColorGroup</a></b> (<i>self</i>, ColorGroup <i>cr</i>, QBrush <i>foreground</i>, QBrush <i>button</i>, QBrush <i>light</i>, QBrush <i>dark</i>, QBrush <i>mid</i>, QBrush <i>text</i>, QBrush <i>bright_text</i>, QBrush <i>base</i>, QBrush <i>background</i>)</li><li><div class="fn" /><b><a href="qpalette.html#setCurrentColorGroup">setCurrentColorGroup</a></b> (<i>self</i>, ColorGroup <i>cg</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#shadow">shadow</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#text">text</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#window">window</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qpalette.html#windowText">windowText</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qpalette.html#__eq__">__eq__</a></b> (<i>self</i>, QPalette <i>p</i>)</li><li><div class="fn" />bool <b><a href="qpalette.html#__ne__">__ne__</a></b> (<i>self</i>, QPalette <i>p</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QPalette class contains color groups for each widget state.</p>
<p>A palette consists of three color groups: <i>Active</i>, <i>Disabled</i>, and <i>Inactive</i>. All widgets in Qt contain a palette and use their palette to draw themselves. This makes the user interface easily configurable and easier to keep consistent.</p>
<p>If you create a new widget we strongly recommend that you use the colors in the palette rather than hard-coding specific colors.</p>
<p>The color groups:</p>
<ul>
<li>The Active group is used for the window that has keyboard focus.</li>
<li>The Inactive group is used for other windows.</li>
<li>The Disabled group is used for widgets (not windows) that are disabled for some reason.</li>
</ul>
<p>Both active and inactive windows can contain disabled widgets. (Disabled widgets are often called <i>inaccessible</i> or <i>grayed out</i>.)</p>
<p>In most styles, Active and Inactive look the same.</p>
<p>Colors and brushes can be set for particular roles in any of a palette's color groups with <a href="qpalette.html#setColor">setColor</a>() and <a href="qpalette.html#setBrush">setBrush</a>(). A color group contains a group of colors used by widgets for drawing themselves. We recommend that widgets use color group roles from the palette such as "foreground" and "base" rather than literal colors like "red" or "turquoise". The color roles are enumerated and defined in the <a href="qpalette.html#ColorRole-enum">ColorRole</a> documentation.</p>
<p>We strongly recommend that you use a system-supplied color group and modify that as necessary.</p>
<p>To modify a color group you call the functions <a href="qpalette.html#setColor">setColor</a>() and <a href="qpalette.html#setBrush">setBrush</a>(), depending on whether you want a pure color or a pixmap pattern.</p>
<p>There are also corresponding <a href="qpalette.html#color">color</a>() and <a href="qpalette.html#brush">brush</a>() getters, and a commonly used convenience function to get the <a href="qpalette.html#ColorRole-enum">ColorRole</a> for the current <a href="qpalette.html#ColorGroup-enum">ColorGroup</a>: <a href="qpalette-obsolete.html#background">background</a>(), <a href="qpalette-obsolete.html#foreground">foreground</a>(), <a href="qpalette.html#base">base</a>(), etc.</p>
<p>You can copy a palette using the copy constructor and test to see if two palettes are <i>identical</i> using <a href="qpalette.html#isCopyOf">isCopyOf</a>().</p>
<p>QPalette is optimized by the use of <a href="shclass.html">implicit sharing</a>, so it is very efficient to pass QPalette objects as arguments.</p>
<p>See also <a href="qapplication.html#setPalette">QApplication.setPalette</a>(), <a href="qwidget.html#palette-prop">QWidget.setPalette</a>(), and <a href="qcolor.html">QColor</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="ColorGroup-enum" />QPalette.ColorGroup</h3><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>QPalette.Disabled</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><tt>QPalette.Active</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><tt>QPalette.Inactive</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><tt>QPalette.Normal</tt></td>
<td align="center" valign="top"><tt>Active</tt></td>
<td valign="top">synonym for Active</td>
</tr>
</table>
<br />
<br />
<h3 class="fn"><a name="ColorRole-enum" />QPalette.ColorRole</h3><p>The ColorRole enum defines the different symbolic color roles used in current GUIs.</p>
<p>The central roles are:</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>QPalette.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>QPalette.Background</tt></td>
<td align="center" valign="top"><tt>Window</tt></td>
<td valign="top">This value is obsolete. Use Window instead.</td>
</tr>
<tr>
<td valign="top"><tt>QPalette.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>QPalette.Foreground</tt></td>
<td align="center" valign="top"><tt>WindowText</tt></td>
<td valign="top">This value is obsolete. Use WindowText instead.</td>
</tr>
<tr>
<td valign="top"><tt>QPalette.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>QPalette.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 <a href="qabstractitemview.html#alternatingRowColors-prop">QAbstractItemView.setAlternatingRowColors</a>()).</td>
</tr>
<tr>
<td valign="top"><tt>QPalette.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>QPalette.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>QPalette.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>
</table>
<br />
<br />
<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>
<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>QPalette.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>QPalette.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>QPalette.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>QPalette.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>QPalette.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 <a href="qt.html#GlobalColor-enum">Qt.black</a>.</td>
</tr>
</table>
<br />
<br />
<p>Selected (marked) items have two roles:</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>QPalette.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 <a href="qt.html#GlobalColor-enum">Qt.darkBlue</a>.</td>
</tr>
<tr>
<td valign="top"><tt>QPalette.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 <a href="qt.html#GlobalColor-enum">Qt.white</a>.</td>
</tr>
</table>
<br />
<br />
<p>Finally, there is a special role for text that needs to be drawn where <tt>Text</tt> or <tt>Foreground</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>
<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>QPalette.BrightText</tt></td>
<td align="center" valign="top"><tt>7</tt></td>
<td valign="top">A text color that is very different from <tt>Foreground</tt>, and contrasts well with e.g. <tt>Dark</tt>.</td>
</tr>
<tr>
<td valign="top"><tt>QPalette.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 <a href="qt.html#GlobalColor-enum">Qt.blue</a>.</td>
</tr>
<tr>
<td valign="top"><tt>QPalette.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 <a href="qt.html#GlobalColor-enum">Qt.magenta</a>.</td>
</tr>
</table>
<br />
<br />
<p>This image shows most of the color roles in use:</p>
<p align="center"><img alt="Color Roles" src="images/palette.png" /></p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QPalette" />QPalette.__init__ (<i>self</i>)</h3><p>Constructs a palette object that uses the application's default palette.</p>
<p>See also <a href="qapplication.html#setPalette">QApplication.setPalette</a>() and <a href="qapplication.html#palette">QApplication.palette</a>().</p>
<h3 class="fn"><a name="QPalette-2" />QPalette.__init__ (<i>self</i>, <a href="qcolor.html">QColor</a> <i>button</i>)</h3><p>Constructs a palette from the <i>button</i> color. The other colors are automatically calculated, based on this color. <tt>Window</tt> will be the button color as well.</p>
<h3 class="fn"><a name="QPalette-3" />QPalette.__init__ (<i>self</i>, <a href="qt.html#GlobalColor-enum">Qt.GlobalColor</a> <i>button</i>)</h3><p>Constructs a palette from the <i>button</i> color. The other colors are automatically calculated, based on this color. <tt>Window</tt> will be the button color as well.</p>
<h3 class="fn"><a name="QPalette-4" />QPalette.__init__ (<i>self</i>, <a href="qcolor.html">QColor</a> <i>button</i>, <a href="qcolor.html">QColor</a> <i>background</i>)</h3><p>Constructs a palette from a <i>button</i> color and a <i>window</i>. The other colors are automatically calculated, based on these colors.</p>
<h3 class="fn"><a name="QPalette-5" />QPalette.__init__ (<i>self</i>, <a href="qbrush.html">QBrush</a> <i>foreground</i>, <a href="qbrush.html">QBrush</a> <i>button</i>, <a href="qbrush.html">QBrush</a> <i>light</i>, <a href="qbrush.html">QBrush</a> <i>dark</i>, <a href="qbrush.html">QBrush</a> <i>mid</i>, <a href="qbrush.html">QBrush</a> <i>text</i>, <a href="qbrush.html">QBrush</a> <i>bright_text</i>, <a href="qbrush.html">QBrush</a> <i>base</i>, <a href="qbrush.html">QBrush</a> <i>background</i>)</h3><p>Constructs a palette. You can pass either brushes, pixmaps or plain colors for <i>windowText</i>, <i>button</i>, <i>light</i>, <i>dark</i>, <i>mid</i>, <i>text</i>, <i>bright_text</i>, <i>base</i> and <i>window</i>.</p>
<p>See also <a href="qbrush.html">QBrush</a>.</p>
<h3 class="fn"><a name="QPalette-6" />QPalette.__init__ (<i>self</i>, <a href="qcolor.html">QColor</a> <i>foreground</i>, <a href="qcolor.html">QColor</a> <i>background</i>, <a href="qcolor.html">QColor</a> <i>light</i>, <a href="qcolor.html">QColor</a> <i>dark</i>, <a href="qcolor.html">QColor</a> <i>mid</i>, <a href="qcolor.html">QColor</a> <i>text</i>, <a href="qcolor.html">QColor</a> <i>base</i>)</h3><h3 class="fn"><a name="QPalette-7" />QPalette.__init__ (<i>self</i>, <a href="qvariant.html">QVariant</a>)</h3><h3 class="fn"><a name="QPalette-8" />QPalette.__init__ (<i>self</i>, <a href="qpalette.html">QPalette</a> <i>palette</i>)</h3><p>Constructs a copy of <i>p</i>.</p>
<p>This constructor is fast because of <a href="shclass.html">implicit sharing</a>.</p>
<h3 class="fn"><a name="alternateBase" /><a href="qbrush.html">QBrush</a> QPalette.alternateBase (<i>self</i>)</h3><p>Returns the alternate base brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="background" /><a href="qbrush.html">QBrush</a> QPalette.background (<i>self</i>)</h3><h3 class="fn"><a name="base" /><a href="qbrush.html">QBrush</a> QPalette.base (<i>self</i>)</h3><p>Returns the base brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="brightText" /><a href="qbrush.html">QBrush</a> QPalette.brightText (<i>self</i>)</h3><p>Returns the bright text foreground brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="brush" /><a href="qbrush.html">QBrush</a> QPalette.brush (<i>self</i>, <a href="qpalette.html#ColorGroup-enum">ColorGroup</a> <i>cg</i>, <a href="qpalette.html#ColorRole-enum">ColorRole</a> <i>cr</i>)</h3><p>Returns the brush in color group <i>gr</i>, used for color role <i>cr</i>.</p>
<p>See also <a href="qpalette.html#color">color</a>(), <a href="qpalette.html#setBrush">setBrush</a>(), and <a href="qpalette.html#ColorRole-enum">ColorRole</a>.</p>
<h3 class="fn"><a name="brush-2" /><a href="qbrush.html">QBrush</a> QPalette.brush (<i>self</i>, <a href="qpalette.html#ColorRole-enum">ColorRole</a> <i>cr</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Returns the brush that has been set for color role <i>r</i> in the current <a href="qpalette.html#ColorGroup-enum">ColorGroup</a>.</p>
<p>See also <a href="qpalette.html#color">color</a>(), <a href="qpalette.html#setBrush">setBrush</a>(), and <a href="qpalette.html#ColorRole-enum">ColorRole</a>.</p>
<h3 class="fn"><a name="button" /><a href="qbrush.html">QBrush</a> QPalette.button (<i>self</i>)</h3><p>Returns the button brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="buttonText" /><a href="qbrush.html">QBrush</a> QPalette.buttonText (<i>self</i>)</h3><p>Returns the button text foreground brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="color" /><a href="qcolor.html">QColor</a> QPalette.color (<i>self</i>, <a href="qpalette.html#ColorGroup-enum">ColorGroup</a> <i>cg</i>, <a href="qpalette.html#ColorRole-enum">ColorRole</a> <i>cr</i>)</h3><p>Returns the color in color group <i>gr</i>, used for color role <i>r</i>.</p>
<p>See also <a href="qpalette.html#brush">brush</a>(), <a href="qpalette.html#setColor">setColor</a>(), and <a href="qpalette.html#ColorRole-enum">ColorRole</a>.</p>
<h3 class="fn"><a name="color-2" /><a href="qcolor.html">QColor</a> QPalette.color (<i>self</i>, <a href="qpalette.html#ColorRole-enum">ColorRole</a> <i>cr</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Returns the color that has been set for color role <i>r</i> in the current <a href="qpalette.html#ColorGroup-enum">ColorGroup</a>.</p>
<p>See also <a href="qpalette.html#brush">brush</a>() and <a href="qpalette.html#ColorRole-enum">ColorRole</a>.</p>
<h3 class="fn"><a name="currentColorGroup" /><a href="qpalette.html#ColorGroup-enum">ColorGroup</a> QPalette.currentColorGroup (<i>self</i>)</h3><p>Returns the palette's current color group.</p>
<p>See also <a href="qpalette.html#setCurrentColorGroup">setCurrentColorGroup</a>().</p>
<h3 class="fn"><a name="dark" /><a href="qbrush.html">QBrush</a> QPalette.dark (<i>self</i>)</h3><p>Returns the dark brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="foreground" /><a href="qbrush.html">QBrush</a> QPalette.foreground (<i>self</i>)</h3><h3 class="fn"><a name="highlight" /><a href="qbrush.html">QBrush</a> QPalette.highlight (<i>self</i>)</h3><p>Returns the highlight brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="highlightedText" /><a href="qbrush.html">QBrush</a> QPalette.highlightedText (<i>self</i>)</h3><p>Returns the highlighted text brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="isCopyOf" />bool QPalette.isCopyOf (<i>self</i>, <a href="qpalette.html">QPalette</a> <i>p</i>)</h3><p>Returns true if this palette and <i>p</i> are copies of each other, i.e. one of them was created as a copy of the other and neither was subsequently modified; otherwise returns false. This is much stricter than equality.</p>
<p>See also <a href="qpalette.html#operator-eq">operator=</a>() and <a href="qpalette.html#operator-eq-eq">operator==</a>().</p>
<h3 class="fn"><a name="isEqual" />bool QPalette.isEqual (<i>self</i>, <a href="qpalette.html#ColorGroup-enum">ColorGroup</a> <i>cr1</i>, <a href="qpalette.html#ColorGroup-enum">ColorGroup</a> <i>cr2</i>)</h3><p>Returns true (usually quickly) if color group <i>cg1</i> is equal to <i>cg2</i>; otherwise returns false.</p>
<h3 class="fn"><a name="light" /><a href="qbrush.html">QBrush</a> QPalette.light (<i>self</i>)</h3><p>Returns the light brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="link" /><a href="qbrush.html">QBrush</a> QPalette.link (<i>self</i>)</h3><p>Returns the unvisited link text brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="linkVisited" /><a href="qbrush.html">QBrush</a> QPalette.linkVisited (<i>self</i>)</h3><p>Returns the visited link text brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="mid" /><a href="qbrush.html">QBrush</a> QPalette.mid (<i>self</i>)</h3><p>Returns the mid brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="midlight" /><a href="qbrush.html">QBrush</a> QPalette.midlight (<i>self</i>)</h3><p>Returns the midlight brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="resolve" /><a href="qpalette.html">QPalette</a> QPalette.resolve (<i>self</i>, <a href="qpalette.html">QPalette</a>)</h3><p>Returns a new <a href="qpalette.html">QPalette</a> that has attributes copied from <i>other</i>.</p>
<h3 class="fn"><a name="resolve-2" />unsigned long QPalette.resolve (<i>self</i>)</h3><h3 class="fn"><a name="resolve-3" />QPalette.resolve (<i>self</i>, unsigned long <i>mask</i>)</h3><h3 class="fn"><a name="serialNumber" />int QPalette.serialNumber (<i>self</i>)</h3><p>Returns a number that uniquely identifies this <a href="qpalette.html">QPalette</a> object. The serial number is intended for caching. Its value may not be used for anything other than equality testing.</p>
<p>Note that <a href="qpalette.html">QPalette</a> uses implicit sharing, and the serial number changes during the lazy copy operation (when the palette is actually modified), not during a shallow copy (copy constructor or assignment).</p>
<p>See also <a href="qpixmap.html">QPixmap</a>, <a href="qpixmapcache.html">QPixmapCache</a>, and <a href="qcache.html">QCache</a>.</p>
<h3 class="fn"><a name="setBrush" />QPalette.setBrush (<i>self</i>, <a href="qpalette.html#ColorGroup-enum">ColorGroup</a> <i>cg</i>, <a href="qpalette.html#ColorRole-enum">ColorRole</a> <i>cr</i>, <a href="qbrush.html">QBrush</a> <i>brush</i>)</h3><p>Sets the brush for color role <i>cr</i> to brush <i>brush</i> for all groups in the palette.</p>
<p>See also <a href="qpalette.html#brush">brush</a>(), <a href="qpalette.html#setColor">setColor</a>(), and <a href="qpalette.html#ColorRole-enum">ColorRole</a>.</p>
<h3 class="fn"><a name="setBrush-2" />QPalette.setBrush (<i>self</i>, <a href="qpalette.html#ColorRole-enum">ColorRole</a> <i>acr</i>, <a href="qbrush.html">QBrush</a> <i>abrush</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Sets the brush in color group <i>cg</i>, used for color role <i>cr</i>, to <i>b</i>.</p>
<p>See also <a href="qpalette.html#brush">brush</a>(), <a href="qpalette.html#setColor">setColor</a>(), and <a href="qpalette.html#ColorRole-enum">ColorRole</a>.</p>
<h3 class="fn"><a name="setColor" />QPalette.setColor (<i>self</i>, <a href="qpalette.html#ColorGroup-enum">ColorGroup</a> <i>acg</i>, <a href="qpalette.html#ColorRole-enum">ColorRole</a> <i>acr</i>, <a href="qcolor.html">QColor</a> <i>acolor</i>)</h3><p>Sets the brush in color group <i>gr</i>, used for color role <i>r</i>, to the solid color <i>c</i>.</p>
<p>See also <a href="qpalette.html#setBrush">setBrush</a>(), <a href="qpalette.html#color">color</a>(), and <a href="qpalette.html#ColorRole-enum">ColorRole</a>.</p>
<h3 class="fn"><a name="setColor-2" />QPalette.setColor (<i>self</i>, <a href="qpalette.html#ColorRole-enum">ColorRole</a> <i>acr</i>, <a href="qcolor.html">QColor</a> <i>acolor</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Sets the color used for color role <i>r</i> in all color groups to a solid color <i>c</i>.</p>
<p>See also <a href="qpalette.html#brush">brush</a>(), <a href="qpalette.html#setColor">setColor</a>(), and <a href="qpalette.html#ColorRole-enum">ColorRole</a>.</p>
<h3 class="fn"><a name="setColorGroup" />QPalette.setColorGroup (<i>self</i>, <a href="qpalette.html#ColorGroup-enum">ColorGroup</a> <i>cr</i>, <a href="qbrush.html">QBrush</a> <i>foreground</i>, <a href="qbrush.html">QBrush</a> <i>button</i>, <a href="qbrush.html">QBrush</a> <i>light</i>, <a href="qbrush.html">QBrush</a> <i>dark</i>, <a href="qbrush.html">QBrush</a> <i>mid</i>, <a href="qbrush.html">QBrush</a> <i>text</i>, <a href="qbrush.html">QBrush</a> <i>bright_text</i>, <a href="qbrush.html">QBrush</a> <i>base</i>, <a href="qbrush.html">QBrush</a> <i>background</i>)</h3><p>Sets a the group at <i>cg</i>. You can pass either brushes, pixmaps or plain colors for <i>windowText</i>, <i>button</i>, <i>light</i>, <i>dark</i>, <i>mid</i>, <i>text</i>, <i>bright_text</i>, <i>base</i> and <i>window</i>.</p>
<p>See also <a href="qbrush.html">QBrush</a>.</p>
<h3 class="fn"><a name="setCurrentColorGroup" />QPalette.setCurrentColorGroup (<i>self</i>, <a href="qpalette.html#ColorGroup-enum">ColorGroup</a> <i>cg</i>)</h3><p>Set the palette's current color group to <i>cg</i>.</p>
<p>See also <a href="qpalette.html#currentColorGroup">currentColorGroup</a>().</p>
<h3 class="fn"><a name="shadow" /><a href="qbrush.html">QBrush</a> QPalette.shadow (<i>self</i>)</h3><p>Returns the shadow brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="text" /><a href="qbrush.html">QBrush</a> QPalette.text (<i>self</i>)</h3><p>Returns the text foreground brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="window" /><a href="qbrush.html">QBrush</a> QPalette.window (<i>self</i>)</h3><p>Returns the window (general background) brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="windowText" /><a href="qbrush.html">QBrush</a> QPalette.windowText (<i>self</i>)</h3><p>Returns the window text (general foreground) brush of the current color group.</p>
<p>See also <a href="qpalette.html#ColorRole-enum">ColorRole</a> and <a href="qpalette.html#brush">brush</a>().</p>
<h3 class="fn"><a name="__eq__" />bool QPalette.__eq__ (<i>self</i>, <a href="qpalette.html">QPalette</a> <i>p</i>)</h3><h3 class="fn"><a name="__ne__" />bool QPalette.__ne__ (<i>self</i>, <a href="qpalette.html">QPalette</a> <i>p</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt 4.0.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.trolltech.com">Trolltech AS</a> 2006</td><td align="right" width="25%">Qt 4.1.4</td></tr></table></div></address></body></html>
|