File: qdrawutil-h.html

package info (click to toggle)
qt4-x11 4%3A4.8.2%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 701,696 kB
  • sloc: cpp: 2,686,179; ansic: 375,485; python: 25,859; sh: 19,349; xml: 17,091; perl: 14,765; yacc: 5,383; asm: 5,038; makefile: 1,259; lex: 555; ruby: 526; objc: 347; cs: 112; pascal: 112; php: 54; sed: 34
file content (196 lines) | stat: -rw-r--r-- 31,994 bytes parent folder | download
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdrawutil.cpp -->
  <title>Qt 4.8: &lt;qdrawutil.h&gt; - Drawing Utility Functions</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
    </ul>
  </div>
</div>
<div class="content mainContent">
<h1 class="title">&lt;qdrawutil.h&gt; - Drawing Utility Functions</h1>
<span class="subtitle"></span>
<ul>
</ul>
<a name="Functionsx"></a>
<h2>Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdrawutil-h.html#qDrawBorderPixmap">qDrawBorderPixmap</a></b> ( QPainter * <i>painter</i>, const QRect &amp; <i>target</i>, const QMargins &amp; <i>margins</i>, const QPixmap &amp; <i>pixmap</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdrawutil-h.html#qDrawPlainRect">qDrawPlainRect</a></b> ( QPainter * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const QColor &amp; <i>lineColor</i>, int <i>lineWidth</i> = 1, const QBrush * <i>fill</i> = 0 )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdrawutil-h.html#qDrawPlainRect-2">qDrawPlainRect</a></b> ( QPainter * <i>painter</i>, const QRect &amp; <i>rect</i>, const QColor &amp; <i>lineColor</i>, int <i>lineWidth</i> = 1, const QBrush * <i>fill</i> = 0 )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdrawutil-h.html#qDrawShadeLine">qDrawShadeLine</a></b> ( QPainter * <i>painter</i>, int <i>x1</i>, int <i>y1</i>, int <i>x2</i>, int <i>y2</i>, const QPalette &amp; <i>palette</i>, bool <i>sunken</i> = true, int <i>lineWidth</i> = 1, int <i>midLineWidth</i> = 0 )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdrawutil-h.html#qDrawShadeLine-2">qDrawShadeLine</a></b> ( QPainter * <i>painter</i>, const QPoint &amp; <i>p1</i>, const QPoint &amp; <i>p2</i>, const QPalette &amp; <i>palette</i>, bool <i>sunken</i> = true, int <i>lineWidth</i> = 1, int <i>midLineWidth</i> = 0 )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdrawutil-h.html#qDrawShadePanel">qDrawShadePanel</a></b> ( QPainter * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const QPalette &amp; <i>palette</i>, bool <i>sunken</i> = false, int <i>lineWidth</i> = 1, const QBrush * <i>fill</i> = 0 )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdrawutil-h.html#qDrawShadePanel-2">qDrawShadePanel</a></b> ( QPainter * <i>painter</i>, const QRect &amp; <i>rect</i>, const QPalette &amp; <i>palette</i>, bool <i>sunken</i> = false, int <i>lineWidth</i> = 1, const QBrush * <i>fill</i> = 0 )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a></b> ( QPainter * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const QPalette &amp; <i>palette</i>, bool <i>sunken</i> = false, int <i>lineWidth</i> = 1, int <i>midLineWidth</i> = 0, const QBrush * <i>fill</i> = 0 )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdrawutil-h.html#qDrawShadeRect-2">qDrawShadeRect</a></b> ( QPainter * <i>painter</i>, const QRect &amp; <i>rect</i>, const QPalette &amp; <i>palette</i>, bool <i>sunken</i> = false, int <i>lineWidth</i> = 1, int <i>midLineWidth</i> = 0, const QBrush * <i>fill</i> = 0 )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdrawutil-h.html#qDrawWinButton">qDrawWinButton</a></b> ( QPainter * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const QPalette &amp; <i>palette</i>, bool <i>sunken</i> = false, const QBrush * <i>fill</i> = 0 )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdrawutil-h.html#qDrawWinButton-2">qDrawWinButton</a></b> ( QPainter * <i>painter</i>, const QRect &amp; <i>rect</i>, const QPalette &amp; <i>palette</i>, bool <i>sunken</i> = false, const QBrush * <i>fill</i> = 0 )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdrawutil-h.html#qDrawWinPanel">qDrawWinPanel</a></b> ( QPainter * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const QPalette &amp; <i>palette</i>, bool <i>sunken</i> = false, const QBrush * <i>fill</i> = 0 )</td></tr>
</table>
<!-- $$$<qdrawutil.h>-description -->
<div class="descr"> <a name="details"></a>
</div>
<p><b>See also </b><a href="qpainter.html">QPainter</a>.</p>
<!-- @@@<qdrawutil.h> -->
<h2>Function Documentation</h2>
<!-- $$$qDrawBorderPixmap[overload1]$$$qDrawBorderPixmapQPainter*constQRect&constQMargins&constQPixmap& -->
<h3 class="fn"><a name="qDrawBorderPixmap"></a><span class="type">void</span> <span class="name">qDrawBorderPixmap</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>target</i>, const <span class="type"><a href="qmargins.html">QMargins</a></span> &amp; <i>margins</i>, const <span class="type"><a href="qpixmap.html">QPixmap</a></span> &amp; <i>pixmap</i> )</h3>
<p>This is an overloaded function.</p>
<p>The qDrawBorderPixmap function is for drawing a pixmap into the margins of a rectangle.</p>
<p>Draws the given <i>pixmap</i> into the given <i>target</i> rectangle, using the given <i>painter</i>. The pixmap will be split into nine segments and drawn according to the <i>margins</i> structure.</p>
<p>This function was introduced in Qt 4.6.</p>
<!-- @@@qDrawBorderPixmap -->
<!-- $$$qDrawPlainRect[overload1]$$$qDrawPlainRectQPainter*intintintintconstQColor&intconstQBrush* -->
<h3 class="fn"><a name="qDrawPlainRect"></a><span class="type">void</span> <span class="name">qDrawPlainRect</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, <span class="type">int</span> <i>x</i>, <span class="type">int</span> <i>y</i>, <span class="type">int</span> <i>width</i>, <span class="type">int</span> <i>height</i>, const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>lineColor</i>, <span class="type">int</span> <i>lineWidth</i> = 1, const <span class="type"><a href="qbrush.html">QBrush</a></span> * <i>fill</i> = 0 )</h3>
<p>Draws the plain rectangle beginning at (<i>x</i>, <i>y</i>) with the given <i>width</i> and <i>height</i>, using the specified <i>painter</i>, <i>lineColor</i> and <i>lineWidth</i>. The rectangle's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p>
<p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p>
<p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a plain rectangle:</p>
<pre class="cpp"> <span class="type"><a href="qframe.html">QFrame</a></span> frame:
 frame<span class="operator">.</span>setFrameStyle(<span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Box <span class="operator">|</span> <span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Plain);</pre>
<p><b>See also </b><a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>() and <a href="qstyle.html">QStyle</a>.</p>
<!-- @@@qDrawPlainRect -->
<!-- $$$qDrawPlainRect$$$qDrawPlainRectQPainter*constQRect&constQColor&intconstQBrush* -->
<h3 class="fn"><a name="qDrawPlainRect-2"></a><span class="type">void</span> <span class="name">qDrawPlainRect</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>rect</i>, const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>lineColor</i>, <span class="type">int</span> <i>lineWidth</i> = 1, const <span class="type"><a href="qbrush.html">QBrush</a></span> * <i>fill</i> = 0 )</h3>
<p>This is an overloaded function.</p>
<p>Draws the plain rectangle specified by <i>rect</i> using the given <i>painter</i>, <i>lineColor</i> and <i>lineWidth</i>. The rectangle's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p>
<p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p>
<p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a plain rectangle:</p>
<pre class="cpp"> <span class="type"><a href="qframe.html">QFrame</a></span> frame:
 frame<span class="operator">.</span>setFrameStyle(<span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Box <span class="operator">|</span> <span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Plain);</pre>
<p><b>See also </b><a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>() and <a href="qstyle.html">QStyle</a>.</p>
<!-- @@@qDrawPlainRect -->
<!-- $$$qDrawShadeLine[overload1]$$$qDrawShadeLineQPainter*intintintintconstQPalette&boolintint -->
<h3 class="fn"><a name="qDrawShadeLine"></a><span class="type">void</span> <span class="name">qDrawShadeLine</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, <span class="type">int</span> <i>x1</i>, <span class="type">int</span> <i>y1</i>, <span class="type">int</span> <i>x2</i>, <span class="type">int</span> <i>y2</i>, const <span class="type"><a href="qpalette.html">QPalette</a></span> &amp; <i>palette</i>, <span class="type">bool</span> <i>sunken</i> = true, <span class="type">int</span> <i>lineWidth</i> = 1, <span class="type">int</span> <i>midLineWidth</i> = 0 )</h3>
<p>Draws a horizontal (<i>y1</i> == <i>y2</i>) or vertical (<i>x1</i> == <i>x2</i>) shaded line using the given <i>painter</i>. Note that nothing is drawn if <i>y1</i> != <i>y2</i> and <i>x1</i> != <i>x2</i> (i.e&#x2e; the line is neither horizontal nor vertical).</p>
<p>The provided <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors). The given <i>lineWidth</i> specifies the line width for each of the lines; it is not the total line width. The given <i>midLineWidth</i> specifies the width of a middle line drawn in the <a href="qpalette.html#mid">QPalette::mid</a>() color.</p>
<p>The line appears sunken if <i>sunken</i> is true, otherwise raised.</p>
<p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p>
<p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded line:</p>
<pre class="cpp"> <span class="type"><a href="qframe.html">QFrame</a></span> frame:
 frame<span class="operator">.</span>setFrameStyle(<span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>HLine <span class="operator">|</span> <span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Sunken);</pre>
<p><b>See also </b><a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>(), <a href="qdrawutil-h.html#qDrawShadePanel">qDrawShadePanel</a>(), and <a href="qstyle.html">QStyle</a>.</p>
<!-- @@@qDrawShadeLine -->
<!-- $$$qDrawShadeLine$$$qDrawShadeLineQPainter*constQPoint&constQPoint&constQPalette&boolintint -->
<h3 class="fn"><a name="qDrawShadeLine-2"></a><span class="type">void</span> <span class="name">qDrawShadeLine</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>p1</i>, const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>p2</i>, const <span class="type"><a href="qpalette.html">QPalette</a></span> &amp; <i>palette</i>, <span class="type">bool</span> <i>sunken</i> = true, <span class="type">int</span> <i>lineWidth</i> = 1, <span class="type">int</span> <i>midLineWidth</i> = 0 )</h3>
<p>This is an overloaded function.</p>
<p>Draws a horizontal or vertical shaded line between <i>p1</i> and <i>p2</i> using the given <i>painter</i>. Note that nothing is drawn if the line between the points would be neither horizontal nor vertical.</p>
<p>The provided <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors). The given <i>lineWidth</i> specifies the line width for each of the lines; it is not the total line width. The given <i>midLineWidth</i> specifies the width of a middle line drawn in the <a href="qpalette.html#mid">QPalette::mid</a>() color.</p>
<p>The line appears sunken if <i>sunken</i> is true, otherwise raised.</p>
<p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p>
<p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded line:</p>
<pre class="cpp"> <span class="type"><a href="qframe.html">QFrame</a></span> frame:
 frame<span class="operator">.</span>setFrameStyle(<span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>HLine <span class="operator">|</span> <span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Sunken);</pre>
<p><b>See also </b><a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>(), <a href="qdrawutil-h.html#qDrawShadePanel">qDrawShadePanel</a>(), and <a href="qstyle.html">QStyle</a>.</p>
<!-- @@@qDrawShadeLine -->
<!-- $$$qDrawShadePanel[overload1]$$$qDrawShadePanelQPainter*intintintintconstQPalette&boolintconstQBrush* -->
<h3 class="fn"><a name="qDrawShadePanel"></a><span class="type">void</span> <span class="name">qDrawShadePanel</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, <span class="type">int</span> <i>x</i>, <span class="type">int</span> <i>y</i>, <span class="type">int</span> <i>width</i>, <span class="type">int</span> <i>height</i>, const <span class="type"><a href="qpalette.html">QPalette</a></span> &amp; <i>palette</i>, <span class="type">bool</span> <i>sunken</i> = false, <span class="type">int</span> <i>lineWidth</i> = 1, const <span class="type"><a href="qbrush.html">QBrush</a></span> * <i>fill</i> = 0 )</h3>
<p>Draws the shaded panel beginning at (<i>x</i>, <i>y</i>) with the given <i>width</i> and <i>height</i> using the provided <i>painter</i> and the given <i>lineWidth</i>.</p>
<p>The given <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors). The panel's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p>
<p>The panel appears sunken if <i>sunken</i> is true, otherwise raised.</p>
<p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p>
<p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded panel:</p>
<pre class="cpp"> <span class="type"><a href="qframe.html">QFrame</a></span> frame:
 frame<span class="operator">.</span>setFrameStyle( <span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Panel <span class="operator">|</span> <span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Sunken);</pre>
<p><b>See also </b><a href="qdrawutil-h.html#qDrawWinPanel">qDrawWinPanel</a>(), <a href="qdrawutil-h.html#qDrawShadeLine">qDrawShadeLine</a>(), <a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>(), and <a href="qstyle.html">QStyle</a>.</p>
<!-- @@@qDrawShadePanel -->
<!-- $$$qDrawShadePanel$$$qDrawShadePanelQPainter*constQRect&constQPalette&boolintconstQBrush* -->
<h3 class="fn"><a name="qDrawShadePanel-2"></a><span class="type">void</span> <span class="name">qDrawShadePanel</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>rect</i>, const <span class="type"><a href="qpalette.html">QPalette</a></span> &amp; <i>palette</i>, <span class="type">bool</span> <i>sunken</i> = false, <span class="type">int</span> <i>lineWidth</i> = 1, const <span class="type"><a href="qbrush.html">QBrush</a></span> * <i>fill</i> = 0 )</h3>
<p>This is an overloaded function.</p>
<p>Draws the shaded panel at the rectangle specified by <i>rect</i> using the given <i>painter</i> and the given <i>lineWidth</i>.</p>
<p>The given <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors). The panel's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p>
<p>The panel appears sunken if <i>sunken</i> is true, otherwise raised.</p>
<p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p>
<p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded panel:</p>
<pre class="cpp"> <span class="type"><a href="qframe.html">QFrame</a></span> frame:
 frame<span class="operator">.</span>setFrameStyle( <span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Panel <span class="operator">|</span> <span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Sunken);</pre>
<p><b>See also </b><a href="qdrawutil-h.html#qDrawWinPanel">qDrawWinPanel</a>(), <a href="qdrawutil-h.html#qDrawShadeLine">qDrawShadeLine</a>(), <a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>(), and <a href="qstyle.html">QStyle</a>.</p>
<!-- @@@qDrawShadePanel -->
<!-- $$$qDrawShadeRect[overload1]$$$qDrawShadeRectQPainter*intintintintconstQPalette&boolintintconstQBrush* -->
<h3 class="fn"><a name="qDrawShadeRect"></a><span class="type">void</span> <span class="name">qDrawShadeRect</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, <span class="type">int</span> <i>x</i>, <span class="type">int</span> <i>y</i>, <span class="type">int</span> <i>width</i>, <span class="type">int</span> <i>height</i>, const <span class="type"><a href="qpalette.html">QPalette</a></span> &amp; <i>palette</i>, <span class="type">bool</span> <i>sunken</i> = false, <span class="type">int</span> <i>lineWidth</i> = 1, <span class="type">int</span> <i>midLineWidth</i> = 0, const <span class="type"><a href="qbrush.html">QBrush</a></span> * <i>fill</i> = 0 )</h3>
<p>Draws the shaded rectangle beginning at (<i>x</i>, <i>y</i>) with the given <i>width</i> and <i>height</i> using the provided <i>painter</i>.</p>
<p>The provide <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors. The given <i>lineWidth</i> specifies the line width for each of the lines; it is not the total line width. The <i>midLineWidth</i> specifies the width of a middle line drawn in the <a href="qpalette.html#mid">QPalette::mid</a>() color. The rectangle's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p>
<p>The rectangle appears sunken if <i>sunken</i> is true, otherwise raised.</p>
<p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p>
<p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded rectangle:</p>
<pre class="cpp"> <span class="type"><a href="qframe.html">QFrame</a></span> frame:
 frame<span class="operator">.</span>setFrameStyle(<span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Box <span class="operator">|</span> <span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Raised);</pre>
<p><b>See also </b><a href="qdrawutil-h.html#qDrawShadeLine">qDrawShadeLine</a>(), <a href="qdrawutil-h.html#qDrawShadePanel">qDrawShadePanel</a>(), <a href="qdrawutil-h.html#qDrawPlainRect">qDrawPlainRect</a>(), and <a href="qstyle.html">QStyle</a>.</p>
<!-- @@@qDrawShadeRect -->
<!-- $$$qDrawShadeRect$$$qDrawShadeRectQPainter*constQRect&constQPalette&boolintintconstQBrush* -->
<h3 class="fn"><a name="qDrawShadeRect-2"></a><span class="type">void</span> <span class="name">qDrawShadeRect</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>rect</i>, const <span class="type"><a href="qpalette.html">QPalette</a></span> &amp; <i>palette</i>, <span class="type">bool</span> <i>sunken</i> = false, <span class="type">int</span> <i>lineWidth</i> = 1, <span class="type">int</span> <i>midLineWidth</i> = 0, const <span class="type"><a href="qbrush.html">QBrush</a></span> * <i>fill</i> = 0 )</h3>
<p>This is an overloaded function.</p>
<p>Draws the shaded rectangle specified by <i>rect</i> using the given <i>painter</i>.</p>
<p>The provide <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors. The given <i>lineWidth</i> specifies the line width for each of the lines; it is not the total line width. The <i>midLineWidth</i> specifies the width of a middle line drawn in the <a href="qpalette.html#mid">QPalette::mid</a>() color. The rectangle's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p>
<p>The rectangle appears sunken if <i>sunken</i> is true, otherwise raised.</p>
<p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p>
<p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded rectangle:</p>
<pre class="cpp"> <span class="type"><a href="qframe.html">QFrame</a></span> frame:
 frame<span class="operator">.</span>setFrameStyle(<span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Box <span class="operator">|</span> <span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Raised);</pre>
<p><b>See also </b><a href="qdrawutil-h.html#qDrawShadeLine">qDrawShadeLine</a>(), <a href="qdrawutil-h.html#qDrawShadePanel">qDrawShadePanel</a>(), <a href="qdrawutil-h.html#qDrawPlainRect">qDrawPlainRect</a>(), and <a href="qstyle.html">QStyle</a>.</p>
<!-- @@@qDrawShadeRect -->
<!-- $$$qDrawWinButton[overload1]$$$qDrawWinButtonQPainter*intintintintconstQPalette&boolconstQBrush* -->
<h3 class="fn"><a name="qDrawWinButton"></a><span class="type">void</span> <span class="name">qDrawWinButton</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, <span class="type">int</span> <i>x</i>, <span class="type">int</span> <i>y</i>, <span class="type">int</span> <i>width</i>, <span class="type">int</span> <i>height</i>, const <span class="type"><a href="qpalette.html">QPalette</a></span> &amp; <i>palette</i>, <span class="type">bool</span> <i>sunken</i> = false, const <span class="type"><a href="qbrush.html">QBrush</a></span> * <i>fill</i> = 0 )</h3>
<p>Draws the Windows-style button specified by the given point (<i>x</i>, <i>y</i>}, <i>width</i> and <i>height</i> using the provided <i>painter</i> with a line width of 2 pixels. The button's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p>
<p>The given <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors).</p>
<p>The button appears sunken if <i>sunken</i> is true, otherwise raised.</p>
<p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>()-&gt; Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p>
<p><b>See also </b><a href="qdrawutil-h.html#qDrawWinPanel">qDrawWinPanel</a>() and <a href="qstyle.html">QStyle</a>.</p>
<!-- @@@qDrawWinButton -->
<!-- $$$qDrawWinButton$$$qDrawWinButtonQPainter*constQRect&constQPalette&boolconstQBrush* -->
<h3 class="fn"><a name="qDrawWinButton-2"></a><span class="type">void</span> <span class="name">qDrawWinButton</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>rect</i>, const <span class="type"><a href="qpalette.html">QPalette</a></span> &amp; <i>palette</i>, <span class="type">bool</span> <i>sunken</i> = false, const <span class="type"><a href="qbrush.html">QBrush</a></span> * <i>fill</i> = 0 )</h3>
<p>This is an overloaded function.</p>
<p>Draws the Windows-style button at the rectangle specified by <i>rect</i> using the given <i>painter</i> with a line width of 2 pixels. The button's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p>
<p>The given <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors).</p>
<p>The button appears sunken if <i>sunken</i> is true, otherwise raised.</p>
<p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>()-&gt; Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p>
<p><b>See also </b><a href="qdrawutil-h.html#qDrawWinPanel">qDrawWinPanel</a>() and <a href="qstyle.html">QStyle</a>.</p>
<!-- @@@qDrawWinButton -->
<!-- $$$qDrawWinPanel[overload1]$$$qDrawWinPanelQPainter*intintintintconstQPalette&boolconstQBrush* -->
<h3 class="fn"><a name="qDrawWinPanel"></a><span class="type">void</span> <span class="name">qDrawWinPanel</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, <span class="type">int</span> <i>x</i>, <span class="type">int</span> <i>y</i>, <span class="type">int</span> <i>width</i>, <span class="type">int</span> <i>height</i>, const <span class="type"><a href="qpalette.html">QPalette</a></span> &amp; <i>palette</i>, <span class="type">bool</span> <i>sunken</i> = false, const <span class="type"><a href="qbrush.html">QBrush</a></span> * <i>fill</i> = 0 )</h3>
<p>Draws the Windows-style panel specified by the given point(<i>x</i>, <i>y</i>), <i>width</i> and <i>height</i> using the provided <i>painter</i> with a line width of 2 pixels. The button's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p>
<p>The given <i>palette</i> specifies the shading colors. The panel appears sunken if <i>sunken</i> is true, otherwise raised.</p>
<p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p>
<p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded panel:</p>
<pre class="cpp"> <span class="type"><a href="qframe.html">QFrame</a></span> frame:
 frame<span class="operator">.</span>setFrameStyle(<span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>WinPanel <span class="operator">|</span> <span class="type"><a href="qframe.html">QFrame</a></span><span class="operator">::</span>Raised);</pre>
<p><b>See also </b><a href="qdrawutil-h.html#qDrawShadePanel">qDrawShadePanel</a>(), <a href="qdrawutil-h.html#qDrawWinButton">qDrawWinButton</a>(), and <a href="qstyle.html">QStyle</a>.</p>
<!-- @@@qDrawWinPanel -->
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2012 Nokia Corporation and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>