20
21
<li><a href="qrect-obsolete.html">Obsolete members</a></li>
21
22
<li><a href="qrect-qt3.html">Qt 3 support members</a></li>
23
25
<a name="public-functions"></a>
24
<h3>Public Functions</h3>
26
<li><div class="fn"></div><b><a href="qrect.html#QRect">QRect</a></b> ()</li>
27
<li><div class="fn"></div><b><a href="qrect.html#QRect-2">QRect</a></b> ( const QPoint & <i>topLeft</i>, const QPoint & <i>bottomRight</i> )</li>
28
<li><div class="fn"></div><b><a href="qrect.html#QRect-3">QRect</a></b> ( const QPoint & <i>topLeft</i>, const QSize & <i>size</i> )</li>
29
<li><div class="fn"></div><b><a href="qrect.html#QRect-4">QRect</a></b> ( int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i> )</li>
30
<li><div class="fn"></div>void <b><a href="qrect.html#adjust">adjust</a></b> ( int <i>dx1</i>, int <i>dy1</i>, int <i>dx2</i>, int <i>dy2</i> )</li>
31
<li><div class="fn"></div>QRect <b><a href="qrect.html#adjusted">adjusted</a></b> ( int <i>dx1</i>, int <i>dy1</i>, int <i>dx2</i>, int <i>dy2</i> ) const</li>
32
<li><div class="fn"></div>int <b><a href="qrect.html#bottom">bottom</a></b> () const</li>
33
<li><div class="fn"></div>QPoint <b><a href="qrect.html#bottomLeft">bottomLeft</a></b> () const</li>
34
<li><div class="fn"></div>QPoint <b><a href="qrect.html#bottomRight">bottomRight</a></b> () const</li>
35
<li><div class="fn"></div>QPoint <b><a href="qrect.html#center">center</a></b> () const</li>
36
<li><div class="fn"></div>bool <b><a href="qrect.html#contains">contains</a></b> ( const QPoint & <i>point</i>, bool <i>proper</i> = false ) const</li>
37
<li><div class="fn"></div>bool <b><a href="qrect.html#contains-2">contains</a></b> ( int <i>x</i>, int <i>y</i>, bool <i>proper</i> ) const</li>
38
<li><div class="fn"></div>bool <b><a href="qrect.html#contains-3">contains</a></b> ( int <i>x</i>, int <i>y</i> ) const</li>
39
<li><div class="fn"></div>bool <b><a href="qrect.html#contains-4">contains</a></b> ( const QRect & <i>rectangle</i>, bool <i>proper</i> = false ) const</li>
40
<li><div class="fn"></div>void <b><a href="qrect.html#getCoords">getCoords</a></b> ( int * <i>x1</i>, int * <i>y1</i>, int * <i>x2</i>, int * <i>y2</i> ) const</li>
41
<li><div class="fn"></div>void <b><a href="qrect.html#getRect">getRect</a></b> ( int * <i>x</i>, int * <i>y</i>, int * <i>width</i>, int * <i>height</i> ) const</li>
42
<li><div class="fn"></div>int <b><a href="qrect.html#height">height</a></b> () const</li>
43
<li><div class="fn"></div>QRect <b><a href="qrect.html#intersected">intersected</a></b> ( const QRect & <i>rectangle</i> ) const</li>
44
<li><div class="fn"></div>bool <b><a href="qrect.html#intersects">intersects</a></b> ( const QRect & <i>rectangle</i> ) const</li>
45
<li><div class="fn"></div>bool <b><a href="qrect.html#isEmpty">isEmpty</a></b> () const</li>
46
<li><div class="fn"></div>bool <b><a href="qrect.html#isNull">isNull</a></b> () const</li>
47
<li><div class="fn"></div>bool <b><a href="qrect.html#isValid">isValid</a></b> () const</li>
48
<li><div class="fn"></div>int <b><a href="qrect.html#left">left</a></b> () const</li>
49
<li><div class="fn"></div>void <b><a href="qrect.html#moveBottom">moveBottom</a></b> ( int <i>y</i> )</li>
50
<li><div class="fn"></div>void <b><a href="qrect.html#moveBottomLeft">moveBottomLeft</a></b> ( const QPoint & <i>position</i> )</li>
51
<li><div class="fn"></div>void <b><a href="qrect.html#moveBottomRight">moveBottomRight</a></b> ( const QPoint & <i>position</i> )</li>
52
<li><div class="fn"></div>void <b><a href="qrect.html#moveCenter">moveCenter</a></b> ( const QPoint & <i>position</i> )</li>
53
<li><div class="fn"></div>void <b><a href="qrect.html#moveLeft">moveLeft</a></b> ( int <i>x</i> )</li>
54
<li><div class="fn"></div>void <b><a href="qrect.html#moveRight">moveRight</a></b> ( int <i>x</i> )</li>
55
<li><div class="fn"></div>void <b><a href="qrect.html#moveTo">moveTo</a></b> ( int <i>x</i>, int <i>y</i> )</li>
56
<li><div class="fn"></div>void <b><a href="qrect.html#moveTo-2">moveTo</a></b> ( const QPoint & <i>position</i> )</li>
57
<li><div class="fn"></div>void <b><a href="qrect.html#moveTop">moveTop</a></b> ( int <i>y</i> )</li>
58
<li><div class="fn"></div>void <b><a href="qrect.html#moveTopLeft">moveTopLeft</a></b> ( const QPoint & <i>position</i> )</li>
59
<li><div class="fn"></div>void <b><a href="qrect.html#moveTopRight">moveTopRight</a></b> ( const QPoint & <i>position</i> )</li>
60
<li><div class="fn"></div>QRect <b><a href="qrect.html#normalized">normalized</a></b> () const</li>
61
<li><div class="fn"></div>int <b><a href="qrect.html#right">right</a></b> () const</li>
62
<li><div class="fn"></div>void <b><a href="qrect.html#setBottom">setBottom</a></b> ( int <i>y</i> )</li>
63
<li><div class="fn"></div>void <b><a href="qrect.html#setBottomLeft">setBottomLeft</a></b> ( const QPoint & <i>position</i> )</li>
64
<li><div class="fn"></div>void <b><a href="qrect.html#setBottomRight">setBottomRight</a></b> ( const QPoint & <i>position</i> )</li>
65
<li><div class="fn"></div>void <b><a href="qrect.html#setCoords">setCoords</a></b> ( int <i>x1</i>, int <i>y1</i>, int <i>x2</i>, int <i>y2</i> )</li>
66
<li><div class="fn"></div>void <b><a href="qrect.html#setHeight">setHeight</a></b> ( int <i>height</i> )</li>
67
<li><div class="fn"></div>void <b><a href="qrect.html#setLeft">setLeft</a></b> ( int <i>x</i> )</li>
68
<li><div class="fn"></div>void <b><a href="qrect.html#setRect">setRect</a></b> ( int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i> )</li>
69
<li><div class="fn"></div>void <b><a href="qrect.html#setRight">setRight</a></b> ( int <i>x</i> )</li>
70
<li><div class="fn"></div>void <b><a href="qrect.html#setSize">setSize</a></b> ( const QSize & <i>size</i> )</li>
71
<li><div class="fn"></div>void <b><a href="qrect.html#setTop">setTop</a></b> ( int <i>y</i> )</li>
72
<li><div class="fn"></div>void <b><a href="qrect.html#setTopLeft">setTopLeft</a></b> ( const QPoint & <i>position</i> )</li>
73
<li><div class="fn"></div>void <b><a href="qrect.html#setTopRight">setTopRight</a></b> ( const QPoint & <i>position</i> )</li>
74
<li><div class="fn"></div>void <b><a href="qrect.html#setWidth">setWidth</a></b> ( int <i>width</i> )</li>
75
<li><div class="fn"></div>void <b><a href="qrect.html#setX">setX</a></b> ( int <i>x</i> )</li>
76
<li><div class="fn"></div>void <b><a href="qrect.html#setY">setY</a></b> ( int <i>y</i> )</li>
77
<li><div class="fn"></div>QSize <b><a href="qrect.html#size">size</a></b> () const</li>
78
<li><div class="fn"></div>int <b><a href="qrect.html#top">top</a></b> () const</li>
79
<li><div class="fn"></div>QPoint <b><a href="qrect.html#topLeft">topLeft</a></b> () const</li>
80
<li><div class="fn"></div>QPoint <b><a href="qrect.html#topRight">topRight</a></b> () const</li>
81
<li><div class="fn"></div>void <b><a href="qrect.html#translate">translate</a></b> ( int <i>dx</i>, int <i>dy</i> )</li>
82
<li><div class="fn"></div>void <b><a href="qrect.html#translate-2">translate</a></b> ( const QPoint & <i>offset</i> )</li>
83
<li><div class="fn"></div>QRect <b><a href="qrect.html#translated">translated</a></b> ( int <i>dx</i>, int <i>dy</i> ) const</li>
84
<li><div class="fn"></div>QRect <b><a href="qrect.html#translated-2">translated</a></b> ( const QPoint & <i>offset</i> ) const</li>
85
<li><div class="fn"></div>QRect <b><a href="qrect.html#united">united</a></b> ( const QRect & <i>rectangle</i> ) const</li>
86
<li><div class="fn"></div>int <b><a href="qrect.html#width">width</a></b> () const</li>
87
<li><div class="fn"></div>int <b><a href="qrect.html#x">x</a></b> () const</li>
88
<li><div class="fn"></div>int <b><a href="qrect.html#y">y</a></b> () const</li>
89
<li><div class="fn"></div>QRect <b><a href="qrect.html#operator-and">operator&</a></b> ( const QRect & <i>rectangle</i> ) const</li>
90
<li><div class="fn"></div>QRect & <b><a href="qrect.html#operator-and-eq">operator&=</a></b> ( const QRect & <i>rectangle</i> )</li>
91
<li><div class="fn"></div>QRect <b><a href="qrect.html#operator-7c">operator|</a></b> ( const QRect & <i>rectangle</i> ) const</li>
92
<li><div class="fn"></div>QRect & <b><a href="qrect.html#operator-7c-eq">operator|=</a></b> ( const QRect & <i>rectangle</i> )</li>
26
<h2>Public Functions</h2>
27
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
28
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#QRect">QRect</a></b> ()</td></tr>
29
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#QRect-2">QRect</a></b> ( const QPoint & <i>topLeft</i>, const QPoint & <i>bottomRight</i> )</td></tr>
30
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#QRect-3">QRect</a></b> ( const QPoint & <i>topLeft</i>, const QSize & <i>size</i> )</td></tr>
31
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#QRect-4">QRect</a></b> ( int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i> )</td></tr>
32
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#adjust">adjust</a></b> ( int <i>dx1</i>, int <i>dy1</i>, int <i>dx2</i>, int <i>dy2</i> )</td></tr>
33
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#adjusted">adjusted</a></b> ( int <i>dx1</i>, int <i>dy1</i>, int <i>dx2</i>, int <i>dy2</i> ) const</td></tr>
34
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#bottom">bottom</a></b> () const</td></tr>
35
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#bottomLeft">bottomLeft</a></b> () const</td></tr>
36
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#bottomRight">bottomRight</a></b> () const</td></tr>
37
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#center">center</a></b> () const</td></tr>
38
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#contains">contains</a></b> ( const QPoint & <i>point</i>, bool <i>proper</i> = false ) const</td></tr>
39
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#contains-2">contains</a></b> ( int <i>x</i>, int <i>y</i>, bool <i>proper</i> ) const</td></tr>
40
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#contains-3">contains</a></b> ( int <i>x</i>, int <i>y</i> ) const</td></tr>
41
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#contains-4">contains</a></b> ( const QRect & <i>rectangle</i>, bool <i>proper</i> = false ) const</td></tr>
42
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#getCoords">getCoords</a></b> ( int * <i>x1</i>, int * <i>y1</i>, int * <i>x2</i>, int * <i>y2</i> ) const</td></tr>
43
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#getRect">getRect</a></b> ( int * <i>x</i>, int * <i>y</i>, int * <i>width</i>, int * <i>height</i> ) const</td></tr>
44
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#height">height</a></b> () const</td></tr>
45
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#intersected">intersected</a></b> ( const QRect & <i>rectangle</i> ) const</td></tr>
46
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#intersects">intersects</a></b> ( const QRect & <i>rectangle</i> ) const</td></tr>
47
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#isEmpty">isEmpty</a></b> () const</td></tr>
48
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#isNull">isNull</a></b> () const</td></tr>
49
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#isValid">isValid</a></b> () const</td></tr>
50
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#left">left</a></b> () const</td></tr>
51
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#moveBottom">moveBottom</a></b> ( int <i>y</i> )</td></tr>
52
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#moveBottomLeft">moveBottomLeft</a></b> ( const QPoint & <i>position</i> )</td></tr>
53
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#moveBottomRight">moveBottomRight</a></b> ( const QPoint & <i>position</i> )</td></tr>
54
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#moveCenter">moveCenter</a></b> ( const QPoint & <i>position</i> )</td></tr>
55
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#moveLeft">moveLeft</a></b> ( int <i>x</i> )</td></tr>
56
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#moveRight">moveRight</a></b> ( int <i>x</i> )</td></tr>
57
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#moveTo">moveTo</a></b> ( int <i>x</i>, int <i>y</i> )</td></tr>
58
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#moveTo-2">moveTo</a></b> ( const QPoint & <i>position</i> )</td></tr>
59
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#moveTop">moveTop</a></b> ( int <i>y</i> )</td></tr>
60
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#moveTopLeft">moveTopLeft</a></b> ( const QPoint & <i>position</i> )</td></tr>
61
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#moveTopRight">moveTopRight</a></b> ( const QPoint & <i>position</i> )</td></tr>
62
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#normalized">normalized</a></b> () const</td></tr>
63
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#right">right</a></b> () const</td></tr>
64
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setBottom">setBottom</a></b> ( int <i>y</i> )</td></tr>
65
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setBottomLeft">setBottomLeft</a></b> ( const QPoint & <i>position</i> )</td></tr>
66
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setBottomRight">setBottomRight</a></b> ( const QPoint & <i>position</i> )</td></tr>
67
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setCoords">setCoords</a></b> ( int <i>x1</i>, int <i>y1</i>, int <i>x2</i>, int <i>y2</i> )</td></tr>
68
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setHeight">setHeight</a></b> ( int <i>height</i> )</td></tr>
69
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setLeft">setLeft</a></b> ( int <i>x</i> )</td></tr>
70
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setRect">setRect</a></b> ( int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i> )</td></tr>
71
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setRight">setRight</a></b> ( int <i>x</i> )</td></tr>
72
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setSize">setSize</a></b> ( const QSize & <i>size</i> )</td></tr>
73
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setTop">setTop</a></b> ( int <i>y</i> )</td></tr>
74
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setTopLeft">setTopLeft</a></b> ( const QPoint & <i>position</i> )</td></tr>
75
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setTopRight">setTopRight</a></b> ( const QPoint & <i>position</i> )</td></tr>
76
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setWidth">setWidth</a></b> ( int <i>width</i> )</td></tr>
77
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setX">setX</a></b> ( int <i>x</i> )</td></tr>
78
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#setY">setY</a></b> ( int <i>y</i> )</td></tr>
79
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#size">size</a></b> () const</td></tr>
80
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#top">top</a></b> () const</td></tr>
81
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#topLeft">topLeft</a></b> () const</td></tr>
82
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#topRight">topRight</a></b> () const</td></tr>
83
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#translate">translate</a></b> ( int <i>dx</i>, int <i>dy</i> )</td></tr>
84
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#translate-2">translate</a></b> ( const QPoint & <i>offset</i> )</td></tr>
85
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#translated">translated</a></b> ( int <i>dx</i>, int <i>dy</i> ) const</td></tr>
86
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#translated-2">translated</a></b> ( const QPoint & <i>offset</i> ) const</td></tr>
87
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#united">united</a></b> ( const QRect & <i>rectangle</i> ) const</td></tr>
88
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#width">width</a></b> () const</td></tr>
89
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#x">x</a></b> () const</td></tr>
90
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#y">y</a></b> () const</td></tr>
91
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#operator-and">operator&</a></b> ( const QRect & <i>rectangle</i> ) const</td></tr>
92
<tr><td class="memItemLeft" align="right" valign="top">QRect & </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#operator-and-eq">operator&=</a></b> ( const QRect & <i>rectangle</i> )</td></tr>
93
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#operator-7c">operator|</a></b> ( const QRect & <i>rectangle</i> ) const</td></tr>
94
<tr><td class="memItemLeft" align="right" valign="top">QRect & </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#operator-7c-eq">operator|=</a></b> ( const QRect & <i>rectangle</i> )</td></tr>
94
97
<a name="related-non-members"></a>
95
<h3>Related Non-Members</h3>
97
<li><div class="fn"></div>Q_CORE_EXPORT_INLINE <b><a href="qrect.html#operator-not-eq">operator!=</a></b> ( const QRect & <i>r1</i>, const QRect & <i>r2</i> )</li>
98
<li><div class="fn"></div>QDataStream & <b><a href="qrect.html#operator-lt-lt-16">operator<<</a></b> ( QDataStream & <i>stream</i>, const QRect & <i>rectangle</i> )</li>
99
<li><div class="fn"></div>Q_CORE_EXPORT_INLINE <b><a href="qrect.html#operator-eq-eq">operator==</a></b> ( const QRect & <i>r1</i>, const QRect & <i>r2</i> )</li>
100
<li><div class="fn"></div>QDataStream & <b><a href="qrect.html#operator-gt-gt-9">operator>></a></b> ( QDataStream & <i>stream</i>, QRect & <i>rectangle</i> )</li>
98
<h2>Related Non-Members</h2>
99
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
100
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#operator-not-eq-27">operator!=</a></b> ( const QRect & <i>r1</i>, const QRect & <i>r2</i> )</td></tr>
101
<tr><td class="memItemLeft" align="right" valign="top">QDataStream & </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#operator-lt-lt-118">operator<<</a></b> ( QDataStream & <i>stream</i>, const QRect & <i>rectangle</i> )</td></tr>
102
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#operator-eq-eq-36">operator==</a></b> ( const QRect & <i>r1</i>, const QRect & <i>r2</i> )</td></tr>
103
<tr><td class="memItemLeft" align="right" valign="top">QDataStream & </td><td class="memItemRight" valign="bottom"><b><a href="qrect.html#operator-gt-gt-63">operator>></a></b> ( QDataStream & <i>stream</i>, QRect & <i>rectangle</i> )</td></tr>
102
105
<a name="details"></a>
104
107
<h2>Detailed Description</h2>
187
198
<h3 class="fn"><a name="contains-4"></a>bool QRect::contains ( const QRect & <i>rectangle</i>, bool <i>proper</i> = false ) const</h3>
188
199
<p>This is an overloaded function.</p>
189
200
<p>Returns true if the given <i>rectangle</i> is inside this rectangle. otherwise returns false. If <i>proper</i> is true, this function only returns true if the <i>rectangle</i> is entirely inside this rectangle (not on the edge).</p>
201
<a name="//apple_ref/cpp/instm/QRect/getCoords" />
190
202
<h3 class="fn"><a name="getCoords"></a>void QRect::getCoords ( int * <i>x1</i>, int * <i>y1</i>, int * <i>x2</i>, int * <i>y2</i> ) const</h3>
191
203
<p>Extracts the position of the rectangle's top-left corner to *<i>x1</i> and *<i>y1</i>, and the position of the bottom-right corner to *<i>x2</i> and *<i>y2</i>.</p>
192
204
<p>See also <a href="qrect.html#setCoords">setCoords</a>() and <a href="qrect.html#getRect">getRect</a>().</p>
205
<a name="//apple_ref/cpp/instm/QRect/getRect" />
193
206
<h3 class="fn"><a name="getRect"></a>void QRect::getRect ( int * <i>x</i>, int * <i>y</i>, int * <i>width</i>, int * <i>height</i> ) const</h3>
194
207
<p>Extracts the position of the rectangle's top-left corner to *<i>x</i> and *<i>y</i>, and its dimensions to *<i>width</i> and *<i>height</i>.</p>
195
208
<p>See also <a href="qrect.html#setRect">setRect</a>() and <a href="qrect.html#getCoords">getCoords</a>().</p>
209
<a name="//apple_ref/cpp/instm/QRect/height" />
196
210
<h3 class="fn"><a name="height"></a>int QRect::height () const</h3>
197
211
<p>Returns the height of the rectangle.</p>
198
212
<p>See also <a href="qrect.html#setHeight">setHeight</a>(), <a href="qrect.html#width">width</a>(), and <a href="qrect.html#size">size</a>().</p>
213
<a name="//apple_ref/cpp/instm/QRect/intersected" />
199
214
<h3 class="fn"><a name="intersected"></a>QRect QRect::intersected ( const QRect & <i>rectangle</i> ) const</h3>
200
215
<p>Returns the intersection of this rectangle and the given <i>rectangle</i>. Note that <tt>r.intersected(s)</tt> is equivalent to <tt>r & s</tt>.</p>
201
216
<p align="center"><img src="images/qrect-intersect.png" /></p><p>This function was introduced in Qt 4.2.</p>
202
217
<p>See also <a href="qrect.html#intersects">intersects</a>(), <a href="qrect.html#united">united</a>(), and <a href="qrect.html#operator-and-eq">operator&=</a>().</p>
218
<a name="//apple_ref/cpp/instm/QRect/intersects" />
203
219
<h3 class="fn"><a name="intersects"></a>bool QRect::intersects ( const QRect & <i>rectangle</i> ) const</h3>
204
220
<p>Returns true if this rectangle intersects with the given <i>rectangle</i> (i.e., there is at least one pixel that is within both rectangles), otherwise returns false.</p>
205
221
<p>The intersection rectangle can be retrieved using the <a href="qrect.html#intersected">intersected</a>() function.</p>
206
222
<p>See also <a href="qrect.html#contains">contains</a>().</p>
223
<a name="//apple_ref/cpp/instm/QRect/isEmpty" />
207
224
<h3 class="fn"><a name="isEmpty"></a>bool QRect::isEmpty () const</h3>
208
225
<p>Returns true if the rectangle is empty, otherwise returns false.</p>
209
226
<p>An empty rectangle has a <a href="qrect.html#left">left</a>() > <a href="qrect.html#right">right</a>() or <a href="qrect.html#top">top</a>() > <a href="qrect.html#bottom">bottom</a>(). An empty rectangle is not valid (i.e., isEmpty() == !<a href="qrect.html#isValid">isValid</a>()).</p>
210
227
<p>Use the <a href="qrect.html#normalized">normalized</a>() function to retrieve a rectangle where the corners are swapped.</p>
211
228
<p>See also <a href="qrect.html#isNull">isNull</a>(), <a href="qrect.html#isValid">isValid</a>(), and <a href="qrect.html#normalized">normalized</a>().</p>
229
<a name="//apple_ref/cpp/instm/QRect/isNull" />
212
230
<h3 class="fn"><a name="isNull"></a>bool QRect::isNull () const</h3>
213
231
<p>Returns true if the rectangle is a null rectangle, otherwise returns false.</p>
214
232
<p>A null rectangle has both the width and the height set to 0 (i.e., <a href="qrect.html#right">right</a>() == <a href="qrect.html#left">left</a>() - 1 and <a href="qrect.html#bottom">bottom</a>() == <a href="qrect.html#top">top</a>() - 1). A null rectangle is also empty, and hence is not valid.</p>
215
233
<p>See also <a href="qrect.html#isEmpty">isEmpty</a>() and <a href="qrect.html#isValid">isValid</a>().</p>
234
<a name="//apple_ref/cpp/instm/QRect/isValid" />
216
235
<h3 class="fn"><a name="isValid"></a>bool QRect::isValid () const</h3>
217
236
<p>Returns true if the rectangle is valid, otherwise returns false.</p>
218
237
<p>A valid rectangle has a <a href="qrect.html#left">left</a>() < <a href="qrect.html#right">right</a>() and <a href="qrect.html#top">top</a>() < <a href="qrect.html#bottom">bottom</a>(). Note that non-trivial operations like intersections are not defined for invalid rectangles. A valid rectangle is not empty (i.e., isValid() == !<a href="qrect.html#isEmpty">isEmpty</a>()).</p>
219
238
<p>See also <a href="qrect.html#isNull">isNull</a>(), <a href="qrect.html#isEmpty">isEmpty</a>(), and <a href="qrect.html#normalized">normalized</a>().</p>
239
<a name="//apple_ref/cpp/instm/QRect/left" />
220
240
<h3 class="fn"><a name="left"></a>int QRect::left () const</h3>
221
241
<p>Returns the x-coordinate of the rectangle's left edge. Equivalent to <a href="qrect.html#x">x</a>().</p>
222
242
<p>See also <a href="qrect.html#setLeft">setLeft</a>(), <a href="qrect.html#topLeft">topLeft</a>(), and <a href="qrect.html#bottomLeft">bottomLeft</a>().</p>
243
<a name="//apple_ref/cpp/instm/QRect/moveBottom" />
223
244
<h3 class="fn"><a name="moveBottom"></a>void QRect::moveBottom ( int <i>y</i> )</h3>
224
245
<p>Moves the rectangle vertically, leaving the rectangle's bottom edge at the given <i>y</i> coordinate. The rectangle's size is unchanged.</p>
225
246
<p>See also <a href="qrect.html#bottom">bottom</a>(), <a href="qrect.html#setBottom">setBottom</a>(), and <a href="qrect.html#moveTop">moveTop</a>().</p>
247
<a name="//apple_ref/cpp/instm/QRect/moveBottomLeft" />
226
248
<h3 class="fn"><a name="moveBottomLeft"></a>void QRect::moveBottomLeft ( const <a href="qpoint.html">QPoint</a> & <i>position</i> )</h3>
227
249
<p>Moves the rectangle, leaving the bottom-left corner at the given <i>position</i>. The rectangle's size is unchanged.</p>
228
250
<p>See also <a href="qrect.html#setBottomLeft">setBottomLeft</a>(), <a href="qrect.html#moveBottom">moveBottom</a>(), and <a href="qrect.html#moveLeft">moveLeft</a>().</p>
251
<a name="//apple_ref/cpp/instm/QRect/moveBottomRight" />
229
252
<h3 class="fn"><a name="moveBottomRight"></a>void QRect::moveBottomRight ( const <a href="qpoint.html">QPoint</a> & <i>position</i> )</h3>
230
253
<p>Moves the rectangle, leaving the bottom-right corner at the given <i>position</i>. The rectangle's size is unchanged.</p>
231
254
<p>See also <a href="qrect.html#setBottomRight">setBottomRight</a>(), <a href="qrect.html#moveRight">moveRight</a>(), and <a href="qrect.html#moveBottom">moveBottom</a>().</p>
255
<a name="//apple_ref/cpp/instm/QRect/moveCenter" />
232
256
<h3 class="fn"><a name="moveCenter"></a>void QRect::moveCenter ( const <a href="qpoint.html">QPoint</a> & <i>position</i> )</h3>
233
257
<p>Moves the rectangle, leaving the center point at the given <i>position</i>. The rectangle's size is unchanged.</p>
234
258
<p>See also <a href="qrect.html#center">center</a>().</p>
259
<a name="//apple_ref/cpp/instm/QRect/moveLeft" />
235
260
<h3 class="fn"><a name="moveLeft"></a>void QRect::moveLeft ( int <i>x</i> )</h3>
236
261
<p>Moves the rectangle horizontally, leaving the rectangle's left edge at the given <i>x</i> coordinate. The rectangle's size is unchanged.</p>
237
262
<p>See also <a href="qrect.html#left">left</a>(), <a href="qrect.html#setLeft">setLeft</a>(), and <a href="qrect.html#moveRight">moveRight</a>().</p>
263
<a name="//apple_ref/cpp/instm/QRect/moveRight" />
238
264
<h3 class="fn"><a name="moveRight"></a>void QRect::moveRight ( int <i>x</i> )</h3>
239
265
<p>Moves the rectangle horizontally, leaving the rectangle's right edge at the given <i>x</i> coordinate. The rectangle's size is unchanged.</p>
240
266
<p>See also <a href="qrect.html#right">right</a>(), <a href="qrect.html#setRight">setRight</a>(), and <a href="qrect.html#moveLeft">moveLeft</a>().</p>
267
<a name="//apple_ref/cpp/instm/QRect/moveTo" />
241
268
<h3 class="fn"><a name="moveTo"></a>void QRect::moveTo ( int <i>x</i>, int <i>y</i> )</h3>
242
269
<p>Moves the rectangle, leaving the top-left corner at the given position (<i>x</i>, <i>y</i>). The rectangle's size is unchanged.</p>
243
270
<p>See also <a href="qrect.html#translate">translate</a>() and <a href="qrect.html#moveTopLeft">moveTopLeft</a>().</p>
244
271
<h3 class="fn"><a name="moveTo-2"></a>void QRect::moveTo ( const <a href="qpoint.html">QPoint</a> & <i>position</i> )</h3>
245
272
<p>Moves the rectangle, leaving the top-left corner at the given <i>position</i>.</p>
273
<a name="//apple_ref/cpp/instm/QRect/moveTop" />
246
274
<h3 class="fn"><a name="moveTop"></a>void QRect::moveTop ( int <i>y</i> )</h3>
247
275
<p>Moves the rectangle vertically, leaving the rectangle's top edge at the given <i>y</i> coordinate. The rectangle's size is unchanged.</p>
248
276
<p>See also <a href="qrect.html#top">top</a>(), <a href="qrect.html#setTop">setTop</a>(), and <a href="qrect.html#moveBottom">moveBottom</a>().</p>
277
<a name="//apple_ref/cpp/instm/QRect/moveTopLeft" />
249
278
<h3 class="fn"><a name="moveTopLeft"></a>void QRect::moveTopLeft ( const <a href="qpoint.html">QPoint</a> & <i>position</i> )</h3>
250
279
<p>Moves the rectangle, leaving the top-left corner at the given <i>position</i>. The rectangle's size is unchanged.</p>
251
280
<p>See also <a href="qrect.html#setTopLeft">setTopLeft</a>(), <a href="qrect.html#moveTop">moveTop</a>(), and <a href="qrect.html#moveLeft">moveLeft</a>().</p>
281
<a name="//apple_ref/cpp/instm/QRect/moveTopRight" />
252
282
<h3 class="fn"><a name="moveTopRight"></a>void QRect::moveTopRight ( const <a href="qpoint.html">QPoint</a> & <i>position</i> )</h3>
253
283
<p>Moves the rectangle, leaving the top-right corner at the given <i>position</i>. The rectangle's size is unchanged.</p>
254
284
<p>See also <a href="qrect.html#setTopRight">setTopRight</a>(), <a href="qrect.html#moveTop">moveTop</a>(), and <a href="qrect.html#moveRight">moveRight</a>().</p>
285
<a name="//apple_ref/cpp/instm/QRect/normalized" />
255
286
<h3 class="fn"><a name="normalized"></a>QRect QRect::normalized () const</h3>
256
287
<p>Returns a normalized rectangle; i.e., a rectangle that has a non-negative width and height.</p>
257
288
<p>If <a href="qrect.html#width">width</a>() < 0 the function swaps the left and right corners, and it swaps the top and bottom corners if <a href="qrect.html#height">height</a>() < 0.</p>
258
289
<p>See also <a href="qrect.html#isValid">isValid</a>() and <a href="qrect.html#isEmpty">isEmpty</a>().</p>
290
<a name="//apple_ref/cpp/instm/QRect/right" />
259
291
<h3 class="fn"><a name="right"></a>int QRect::right () const</h3>
260
292
<p>Returns the x-coordinate of the rectangle's right edge.</p>
261
293
<p>Note that for historical reasons this function returns <a href="qrect.html#left">left</a>() + <a href="qrect.html#width">width</a>() - 1; use <a href="qrect.html#x">x</a>() + <a href="qrect.html#width">width</a>() to retrieve the true x-coordinate.</p>
262
294
<p>See also <a href="qrect.html#setRight">setRight</a>(), <a href="qrect.html#topRight">topRight</a>(), and <a href="qrect.html#bottomRight">bottomRight</a>().</p>
295
<a name="//apple_ref/cpp/instm/QRect/setBottom" />
263
296
<h3 class="fn"><a name="setBottom"></a>void QRect::setBottom ( int <i>y</i> )</h3>
264
297
<p>Sets the bottom edge of the rectangle to the given <i>y</i> coordinate. May change the height, but will never change the top edge of the rectangle.</p>
265
298
<p>See also <a href="qrect.html#bottom">bottom</a>() and <a href="qrect.html#moveBottom">moveBottom</a>().</p>
299
<a name="//apple_ref/cpp/instm/QRect/setBottomLeft" />
266
300
<h3 class="fn"><a name="setBottomLeft"></a>void QRect::setBottomLeft ( const <a href="qpoint.html">QPoint</a> & <i>position</i> )</h3>
267
301
<p>Set the bottom-left corner of the rectangle to the given <i>position</i>. May change the size, but will never change the top-right corner of the rectangle.</p>
268
302
<p>See also <a href="qrect.html#bottomLeft">bottomLeft</a>() and <a href="qrect.html#moveBottomLeft">moveBottomLeft</a>().</p>
303
<a name="//apple_ref/cpp/instm/QRect/setBottomRight" />
269
304
<h3 class="fn"><a name="setBottomRight"></a>void QRect::setBottomRight ( const <a href="qpoint.html">QPoint</a> & <i>position</i> )</h3>
270
305
<p>Set the bottom-right corner of the rectangle to the given <i>position</i>. May change the size, but will never change the top-left corner of the rectangle.</p>
271
306
<p>See also <a href="qrect.html#bottomRight">bottomRight</a>() and <a href="qrect.html#moveBottomRight">moveBottomRight</a>().</p>
307
<a name="//apple_ref/cpp/instm/QRect/setCoords" />
272
308
<h3 class="fn"><a name="setCoords"></a>void QRect::setCoords ( int <i>x1</i>, int <i>y1</i>, int <i>x2</i>, int <i>y2</i> )</h3>
273
309
<p>Sets the coordinates of the rectangle's top-left corner to (<i>x1</i>, <i>y1</i>), and the coordinates of its bottom-right corner to (<i>x2</i>, <i>y2</i>).</p>
274
<p>See also <a href="qrect-qt3.html#coords">coords</a>(), <a href="qrect.html#getCoords">getCoords</a>(), and <a href="qrect.html#setRect">setRect</a>().</p>
310
<p>See also <a href="qrect-qt3.html#coords" class="compat">coords</a>(), <a href="qrect.html#getCoords">getCoords</a>(), and <a href="qrect.html#setRect">setRect</a>().</p>
311
<a name="//apple_ref/cpp/instm/QRect/setHeight" />
275
312
<h3 class="fn"><a name="setHeight"></a>void QRect::setHeight ( int <i>height</i> )</h3>
276
313
<p>Sets the height of the rectangle to the given <i>height</i>. The bottom edge is changed, but not the top one.</p>
277
314
<p>See also <a href="qrect.html#height">height</a>() and <a href="qrect.html#setSize">setSize</a>().</p>
315
<a name="//apple_ref/cpp/instm/QRect/setLeft" />
278
316
<h3 class="fn"><a name="setLeft"></a>void QRect::setLeft ( int <i>x</i> )</h3>
279
317
<p>Sets the left edge of the rectangle to the given <i>x</i> coordinate. May change the width, but will never change the right edge of the rectangle.</p>
280
318
<p>Equivalent to <a href="qrect.html#setX">setX</a>().</p>
281
319
<p>See also <a href="qrect.html#left">left</a>() and <a href="qrect.html#moveLeft">moveLeft</a>().</p>
320
<a name="//apple_ref/cpp/instm/QRect/setRect" />
282
321
<h3 class="fn"><a name="setRect"></a>void QRect::setRect ( int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i> )</h3>
283
322
<p>Sets the coordinates of the rectangle's top-left corner to (<i>x</i>, <i>y</i>), and its size to the given <i>width</i> and <i>height</i>.</p>
284
<p>See also <a href="qrect-qt3.html#rect">rect</a>(), <a href="qrect.html#getRect">getRect</a>(), and <a href="qrect.html#setCoords">setCoords</a>().</p>
323
<p>See also <a href="qrect-qt3.html#rect" class="compat">rect</a>(), <a href="qrect.html#getRect">getRect</a>(), and <a href="qrect.html#setCoords">setCoords</a>().</p>
324
<a name="//apple_ref/cpp/instm/QRect/setRight" />
285
325
<h3 class="fn"><a name="setRight"></a>void QRect::setRight ( int <i>x</i> )</h3>
286
326
<p>Sets the right edge of the rectangle to the given <i>x</i> coordinate. May change the width, but will never change the left edge of the rectangle.</p>
287
327
<p>See also <a href="qrect.html#right">right</a>() and <a href="qrect.html#moveRight">moveRight</a>().</p>
328
<a name="//apple_ref/cpp/instm/QRect/setSize" />
288
329
<h3 class="fn"><a name="setSize"></a>void QRect::setSize ( const <a href="qsize.html">QSize</a> & <i>size</i> )</h3>
289
330
<p>Sets the size of the rectangle to the given <i>size</i>. The top-left corner is not moved.</p>
290
331
<p>See also <a href="qrect.html#size">size</a>(), <a href="qrect.html#setWidth">setWidth</a>(), and <a href="qrect.html#setHeight">setHeight</a>().</p>
332
<a name="//apple_ref/cpp/instm/QRect/setTop" />
291
333
<h3 class="fn"><a name="setTop"></a>void QRect::setTop ( int <i>y</i> )</h3>
292
334
<p>Sets the top edge of the rectangle to the given <i>y</i> coordinate. May change the height, but will never change the bottom edge of the rectangle.</p>
293
335
<p>Equivalent to <a href="qrect.html#setY">setY</a>().</p>
294
336
<p>See also <a href="qrect.html#top">top</a>() and <a href="qrect.html#moveTop">moveTop</a>().</p>
337
<a name="//apple_ref/cpp/instm/QRect/setTopLeft" />
295
338
<h3 class="fn"><a name="setTopLeft"></a>void QRect::setTopLeft ( const <a href="qpoint.html">QPoint</a> & <i>position</i> )</h3>
296
339
<p>Set the top-left corner of the rectangle to the given <i>position</i>. May change the size, but will never change the bottom-right corner of the rectangle.</p>
297
340
<p>See also <a href="qrect.html#topLeft">topLeft</a>() and <a href="qrect.html#moveTopLeft">moveTopLeft</a>().</p>
341
<a name="//apple_ref/cpp/instm/QRect/setTopRight" />
298
342
<h3 class="fn"><a name="setTopRight"></a>void QRect::setTopRight ( const <a href="qpoint.html">QPoint</a> & <i>position</i> )</h3>
299
343
<p>Set the top-right corner of the rectangle to the given <i>position</i>. May change the size, but will never change the bottom-left corner of the rectangle.</p>
300
344
<p>See also <a href="qrect.html#topRight">topRight</a>() and <a href="qrect.html#moveTopRight">moveTopRight</a>().</p>
345
<a name="//apple_ref/cpp/instm/QRect/setWidth" />
301
346
<h3 class="fn"><a name="setWidth"></a>void QRect::setWidth ( int <i>width</i> )</h3>
302
347
<p>Sets the width of the rectangle to the given <i>width</i>. The right edge is changed, but not the left one.</p>
303
348
<p>See also <a href="qrect.html#width">width</a>() and <a href="qrect.html#setSize">setSize</a>().</p>
349
<a name="//apple_ref/cpp/instm/QRect/setX" />
304
350
<h3 class="fn"><a name="setX"></a>void QRect::setX ( int <i>x</i> )</h3>
305
351
<p>Sets the left edge of the rectangle to the given <i>x</i> coordinate. May change the width, but will never change the right edge of the rectangle.</p>
306
352
<p>Equivalent to <a href="qrect.html#setLeft">setLeft</a>().</p>
307
353
<p>See also <a href="qrect.html#x">x</a>(), <a href="qrect.html#setY">setY</a>(), and <a href="qrect.html#setTopLeft">setTopLeft</a>().</p>
354
<a name="//apple_ref/cpp/instm/QRect/setY" />
308
355
<h3 class="fn"><a name="setY"></a>void QRect::setY ( int <i>y</i> )</h3>
309
356
<p>Sets the top edge of the rectangle to the given <i>y</i> coordinate. May change the height, but will never change the bottom edge of the rectangle.</p>
310
357
<p>Equivalent to <a href="qrect.html#setTop">setTop</a>().</p>
311
358
<p>See also <a href="qrect.html#y">y</a>(), <a href="qrect.html#setX">setX</a>(), and <a href="qrect.html#setTopLeft">setTopLeft</a>().</p>
359
<a name="//apple_ref/cpp/instm/QRect/size" />
312
360
<h3 class="fn"><a name="size"></a><a href="qsize.html">QSize</a> QRect::size () const</h3>
313
361
<p>Returns the size of the rectangle.</p>
314
362
<p>See also <a href="qrect.html#setSize">setSize</a>(), <a href="qrect.html#width">width</a>(), and <a href="qrect.html#height">height</a>().</p>
363
<a name="//apple_ref/cpp/instm/QRect/top" />
315
364
<h3 class="fn"><a name="top"></a>int QRect::top () const</h3>
316
365
<p>Returns the y-coordinate of the rectangle's top edge. Equivalent to <a href="qrect.html#y">y</a>().</p>
317
366
<p>See also <a href="qrect.html#setTop">setTop</a>(), <a href="qrect.html#topLeft">topLeft</a>(), and <a href="qrect.html#topRight">topRight</a>().</p>
367
<a name="//apple_ref/cpp/instm/QRect/topLeft" />
318
368
<h3 class="fn"><a name="topLeft"></a><a href="qpoint.html">QPoint</a> QRect::topLeft () const</h3>
319
369
<p>Returns the position of the rectangle's top-left corner.</p>
320
370
<p>See also <a href="qrect.html#setTopLeft">setTopLeft</a>(), <a href="qrect.html#top">top</a>(), and <a href="qrect.html#left">left</a>().</p>
371
<a name="//apple_ref/cpp/instm/QRect/topRight" />
321
372
<h3 class="fn"><a name="topRight"></a><a href="qpoint.html">QPoint</a> QRect::topRight () const</h3>
322
373
<p>Returns the position of the rectangle's top-right corner.</p>
323
374
<p>Note that for historical reasons this function returns <a href="qpoint.html">QPoint</a>(<a href="qrect.html#left">left</a>() + <a href="qrect.html#width">width</a>() -1, <a href="qrect.html#top">top</a>()).</p>
324
375
<p>See also <a href="qrect.html#setTopRight">setTopRight</a>(), <a href="qrect.html#top">top</a>(), and <a href="qrect.html#right">right</a>().</p>
376
<a name="//apple_ref/cpp/instm/QRect/translate" />
325
377
<h3 class="fn"><a name="translate"></a>void QRect::translate ( int <i>dx</i>, int <i>dy</i> )</h3>
326
378
<p>Moves the rectangle <i>dx</i> along the x axis and <i>dy</i> along the y axis, relative to the current position. Positive values move the rectangle to the right and down.</p>
327
379
<p>See also <a href="qrect.html#moveTopLeft">moveTopLeft</a>(), <a href="qrect.html#moveTo">moveTo</a>(), and <a href="qrect.html#translated">translated</a>().</p>
328
380
<h3 class="fn"><a name="translate-2"></a>void QRect::translate ( const <a href="qpoint.html">QPoint</a> & <i>offset</i> )</h3>
329
381
<p>This is an overloaded function.</p>
330
382
<p>Moves the rectangle <i>offset</i>.<a href="qpoint.html#x">x()</a> along the x axis and <i>offset</i>.<a href="qpoint.html#y">y()</a> along the y axis, relative to the current position.</p>
383
<a name="//apple_ref/cpp/instm/QRect/translated" />
331
384
<h3 class="fn"><a name="translated"></a>QRect QRect::translated ( int <i>dx</i>, int <i>dy</i> ) const</h3>
332
385
<p>Returns a copy of the rectangle that is translated <i>dx</i> along the x axis and <i>dy</i> along the y axis, relative to the current position. Positive values move the rectangle to the right and down.</p>
333
386
<p>See also <a href="qrect.html#translate">translate</a>().</p>
334
387
<h3 class="fn"><a name="translated-2"></a>QRect QRect::translated ( const <a href="qpoint.html">QPoint</a> & <i>offset</i> ) const</h3>
335
388
<p>This is an overloaded function.</p>
336
389
<p>Returns a copy of the rectangle that is translated <i>offset</i>.<a href="qpoint.html#x">x()</a> along the x axis and <i>offset</i>.<a href="qpoint.html#y">y()</a> along the y axis, relative to the current position.</p>
390
<a name="//apple_ref/cpp/instm/QRect/united" />
337
391
<h3 class="fn"><a name="united"></a>QRect QRect::united ( const QRect & <i>rectangle</i> ) const</h3>
338
392
<p>Returns the bounding rectangle of this rectangle and the given <i>rectangle</i>.</p>
339
393
<p align="center"><img src="images/qrect-unite.png" /></p><p>This function was introduced in Qt 4.2.</p>
340
394
<p>See also <a href="qrect.html#intersected">intersected</a>().</p>
395
<a name="//apple_ref/cpp/instm/QRect/width" />
341
396
<h3 class="fn"><a name="width"></a>int QRect::width () const</h3>
342
397
<p>Returns the width of the rectangle.</p>
343
398
<p>See also <a href="qrect.html#setWidth">setWidth</a>(), <a href="qrect.html#height">height</a>(), and <a href="qrect.html#size">size</a>().</p>
399
<a name="//apple_ref/cpp/instm/QRect/x" />
344
400
<h3 class="fn"><a name="x"></a>int QRect::x () const</h3>
345
401
<p>Returns the x-coordinate of the rectangle's left edge. Equivalent to <a href="qrect.html#left">left</a>().</p>
346
402
<p>See also <a href="qrect.html#setX">setX</a>(), <a href="qrect.html#y">y</a>(), and <a href="qrect.html#topLeft">topLeft</a>().</p>
403
<a name="//apple_ref/cpp/instm/QRect/y" />
347
404
<h3 class="fn"><a name="y"></a>int QRect::y () const</h3>
348
405
<p>Returns the y-coordinate of the rectangle's top edge. Equivalent to <a href="qrect.html#top">top</a>().</p>
349
406
<p>See also <a href="qrect.html#setY">setY</a>(), <a href="qrect.html#x">x</a>(), and <a href="qrect.html#topLeft">topLeft</a>().</p>
407
<a name="//apple_ref/cpp/instm/QRect/operator&" />
350
408
<h3 class="fn"><a name="operator-and"></a>QRect QRect::operator& ( const QRect & <i>rectangle</i> ) const</h3>
351
409
<p>Returns the intersection of this rectangle and the given <i>rectangle</i>. Returns an empty rectangle if there is no intersection.</p>
352
410
<p>See also <a href="qrect.html#operator-and-eq">operator&=</a>() and <a href="qrect.html#intersected">intersected</a>().</p>
411
<a name="//apple_ref/cpp/instm/QRect/operator&=" />
353
412
<h3 class="fn"><a name="operator-and-eq"></a>QRect & QRect::operator&= ( const QRect & <i>rectangle</i> )</h3>
354
413
<p>Intersects this rectangle with the given <i>rectangle</i>.</p>
355
414
<p>See also <a href="qrect.html#intersected">intersected</a>() and <a href="qrect.html#operator-and">operator&</a>().</p>
415
<a name="//apple_ref/cpp/instm/QRect/operator|" />
356
416
<h3 class="fn"><a name="operator-7c"></a>QRect QRect::operator| ( const QRect & <i>rectangle</i> ) const</h3>
357
417
<p>Returns the bounding rectangle of this rectangle and the given <i>rectangle</i>.</p>
358
418
<p>See also <a href="qrect.html#operator-7c-eq">operator|=</a>() and <a href="qrect.html#united">united</a>().</p>
419
<a name="//apple_ref/cpp/instm/QRect/operator|=" />
359
420
<h3 class="fn"><a name="operator-7c-eq"></a>QRect & QRect::operator|= ( const QRect & <i>rectangle</i> )</h3>
360
421
<p>Unites this rectangle with the given <i>rectangle</i>.</p>
361
422
<p>See also <a href="qrect.html#united">united</a>() and <a href="qrect.html#operator-7c">operator|</a>().</p>
363
424
<h2>Related Non-Members</h2>
364
<h3 class="fn"><a name="operator-not-eq"></a>Q_CORE_EXPORT_INLINE operator!= ( const QRect & <i>r1</i>, const QRect & <i>r2</i> )</h3>
425
<h3 class="fn"><a name="operator-not-eq-27"></a>bool operator!= ( const QRect & <i>r1</i>, const QRect & <i>r2</i> )</h3>
365
426
<p>Returns true if the rectangles <i>r1</i> and <i>r2</i> are different, otherwise returns false.</p>
366
<h3 class="fn"><a name="operator-lt-lt-16"></a><a href="qdatastream.html">QDataStream</a> & operator<< ( <a href="qdatastream.html">QDataStream</a> & <i>stream</i>, const QRect & <i>rectangle</i> )</h3>
427
<h3 class="fn"><a name="operator-lt-lt-118"></a><a href="qdatastream.html">QDataStream</a> & operator<< ( <a href="qdatastream.html">QDataStream</a> & <i>stream</i>, const QRect & <i>rectangle</i> )</h3>
367
428
<p>Writes the given <i>rectangle</i> to the given <i>stream</i>, and returns a reference to the stream.</p>
368
429
<p>See also <a href="datastreamformat.html">Format of the QDataStream Operators</a>.</p>
369
<h3 class="fn"><a name="operator-eq-eq"></a>Q_CORE_EXPORT_INLINE operator== ( const QRect & <i>r1</i>, const QRect & <i>r2</i> )</h3>
430
<h3 class="fn"><a name="operator-eq-eq-36"></a>bool operator== ( const QRect & <i>r1</i>, const QRect & <i>r2</i> )</h3>
370
431
<p>Returns true if the rectangles <i>r1</i> and <i>r2</i> are equal, otherwise returns false.</p>
371
<h3 class="fn"><a name="operator-gt-gt-9"></a><a href="qdatastream.html">QDataStream</a> & operator>> ( <a href="qdatastream.html">QDataStream</a> & <i>stream</i>, QRect & <i>rectangle</i> )</h3>
432
<h3 class="fn"><a name="operator-gt-gt-63"></a><a href="qdatastream.html">QDataStream</a> & operator>> ( <a href="qdatastream.html">QDataStream</a> & <i>stream</i>, QRect & <i>rectangle</i> )</h3>
372
433
<p>Reads a rectangle from the given <i>stream</i> into the given <i>rectangle</i>, and returns a reference to the stream.</p>
373
434
<p>See also <a href="datastreamformat.html">Format of the QDataStream Operators</a>.</p>
374
435
<p /><address><hr /><div align="center">
375
436
<table width="100%" cellspacing="0" border="0"><tr class="address">
376
<td width="30%" align="left">Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
377
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
378
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
379
</tr></table></div></address></body>
437
<td width="40%" align="left">Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
438
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
439
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
440
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>