File: q3canvasrectangle.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 (178 lines) | stat: -rw-r--r-- 13,891 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
<?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" />
<!-- q3canvas.cpp -->
  <title>Qt 4.8: Q3CanvasRectangle Class Reference</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 -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qt3support.html">Qt3Support</a></li>
<li>Q3CanvasRectangle</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3CanvasRectangle Class Reference</h1>
<!-- $$$Q3CanvasRectangle-brief -->
<p>The Q3CanvasRectangle class provides a rectangle on a <a href="q3canvas.html">Q3Canvas</a>. <a href="#details">More...</a></p>
<!-- @@@Q3CanvasRectangle -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3CanvasRectangle&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="q3canvaspolygonalitem.html">Q3CanvasPolygonalItem</a>.</p>
<ul>
<li><a href="q3canvasrectangle-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#Q3CanvasRectangle">Q3CanvasRectangle</a></b> ( Q3Canvas * <i>canvas</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#Q3CanvasRectangle-2">Q3CanvasRectangle</a></b> ( const QRect &amp; <i>r</i>, Q3Canvas * <i>canvas</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#Q3CanvasRectangle-3">Q3CanvasRectangle</a></b> ( int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, Q3Canvas * <i>canvas</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#dtor.Q3CanvasRectangle">~Q3CanvasRectangle</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#height">height</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#rect">rect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#setSize">setSize</a></b> ( int <i>width</i>, int <i>height</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#size">size</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#width">width</a></b> () const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual Q3PointArray </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#areaPoints">areaPoints</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#collidesWith">collidesWith</a></b> ( const Q3CanvasItem * <i>i</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#rtti">rtti</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">9 public functions inherited from <a href="q3canvaspolygonalitem.html#public-functions">Q3CanvasPolygonalItem</a></li>
<li class="fn">34 public functions inherited from <a href="q3canvasitem.html#public-functions">Q3CanvasItem</a></li>
</ul>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual Q3PointArray </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#chunks">chunks</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3canvasrectangle.html#drawShape">drawShape</a></b> ( QPainter &amp; <i>p</i> )</td></tr>
</table>
<ul>
<li class="fn">6 protected functions inherited from <a href="q3canvaspolygonalitem.html#protected-functions">Q3CanvasPolygonalItem</a></li>
<li class="fn">1 protected function inherited from <a href="q3canvasitem.html#protected-functions">Q3CanvasItem</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3CanvasRectangle-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3CanvasRectangle class provides a rectangle on a <a href="q3canvas.html">Q3Canvas</a>.</p>
<p>This item paints a single rectangle which may have any <a href="q3canvaspolygonalitem.html#pen">pen</a>() and <a href="q3canvaspolygonalitem.html#brush">brush</a>(), but may not be tilted/rotated. For rotated rectangles, use <a href="q3canvaspolygon.html">Q3CanvasPolygon</a>.</p>
<p>The rectangle's size and initial position can be set in the constructor. The size can be set or changed later using <a href="q3canvasrectangle.html#setSize">setSize</a>(). Use <a href="q3canvasrectangle.html#height">height</a>() and <a href="q3canvasrectangle.html#width">width</a>() to retrieve the rectangle's dimensions.</p>
<p>The rectangle can be drawn on a painter with <a href="q3canvasrectangle.html#drawShape">drawShape</a>().</p>
<p>Like any other canvas item rectangles can be moved with <a href="q3canvasitem.html#move">Q3CanvasItem::move</a>() and <a href="q3canvasitem.html#moveBy">Q3CanvasItem::moveBy</a>(), or by setting coordinates with <a href="q3canvasitem.html#setX">Q3CanvasItem::setX</a>(), <a href="q3canvasitem.html#setY">Q3CanvasItem::setY</a>() and <a href="q3canvasitem.html#setZ">Q3CanvasItem::setZ</a>().</p>
</div>
<p><b>See also </b><a href="http://doc.qt.nokia.com/qtcanvas">QtCanvas</a> and <a href="graphicsview-porting.html">Porting to Graphics View</a>.</p>
<!-- @@@Q3CanvasRectangle -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3CanvasRectangle[overload1]$$$Q3CanvasRectangleQ3Canvas* -->
<h3 class="fn"><a name="Q3CanvasRectangle"></a>Q3CanvasRectangle::<span class="name">Q3CanvasRectangle</span> ( <span class="type"><a href="q3canvas.html">Q3Canvas</a></span> * <i>canvas</i> )</h3>
<p>Constructs a rectangle at position (0,0) with both width and height set to 32 pixels on <i>canvas</i>.</p>
<!-- @@@Q3CanvasRectangle -->
<!-- $$$Q3CanvasRectangle$$$Q3CanvasRectangleconstQRect&Q3Canvas* -->
<h3 class="fn"><a name="Q3CanvasRectangle-2"></a>Q3CanvasRectangle::<span class="name">Q3CanvasRectangle</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>r</i>, <span class="type"><a href="q3canvas.html">Q3Canvas</a></span> * <i>canvas</i> )</h3>
<p>Constructs a rectangle positioned and sized by <i>r</i> on <i>canvas</i>.</p>
<!-- @@@Q3CanvasRectangle -->
<!-- $$$Q3CanvasRectangle$$$Q3CanvasRectangleintintintintQ3Canvas* -->
<h3 class="fn"><a name="Q3CanvasRectangle-3"></a>Q3CanvasRectangle::<span class="name">Q3CanvasRectangle</span> ( <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>, <span class="type"><a href="q3canvas.html">Q3Canvas</a></span> * <i>canvas</i> )</h3>
<p>Constructs a rectangle at position (<i>x</i>, <i>y</i>) and size <i>width</i> by <i>height</i>, on <i>canvas</i>.</p>
<!-- @@@Q3CanvasRectangle -->
<!-- $$$~Q3CanvasRectangle[overload1]$$$~Q3CanvasRectangle -->
<h3 class="fn"><a name="dtor.Q3CanvasRectangle"></a>Q3CanvasRectangle::<span class="name">~Q3CanvasRectangle</span> ()</h3>
<p>Destroys the rectangle.</p>
<!-- @@@~Q3CanvasRectangle -->
<!-- $$$areaPoints[overload1]$$$areaPoints -->
<h3 class="fn"><a name="areaPoints"></a><span class="type"><a href="q3pointarray.html">Q3PointArray</a></span> Q3CanvasRectangle::<span class="name">areaPoints</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3canvaspolygonalitem.html#areaPoints">Q3CanvasPolygonalItem::areaPoints</a>().</p>
<!-- @@@areaPoints -->
<!-- $$$chunks[overload1]$$$chunks -->
<h3 class="fn"><a name="chunks"></a><span class="type"><a href="q3pointarray.html">Q3PointArray</a></span> Q3CanvasRectangle::<span class="name">chunks</span> () const<tt> [virtual protected]</tt></h3>
<p>Simply calls Q3CanvasItem::chunks().</p>
<!-- @@@chunks -->
<!-- $$$collidesWith[overload1]$$$collidesWithconstQ3CanvasItem* -->
<h3 class="fn"><a name="collidesWith"></a><span class="type">bool</span> Q3CanvasRectangle::<span class="name">collidesWith</span> ( const <span class="type"><a href="q3canvasitem.html">Q3CanvasItem</a></span> * <i>i</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3canvasitem.html#collidesWith">Q3CanvasItem::collidesWith</a>().</p>
<!-- @@@collidesWith -->
<!-- $$$drawShape[overload1]$$$drawShapeQPainter& -->
<h3 class="fn"><a name="drawShape"></a><span class="type">void</span> Q3CanvasRectangle::<span class="name">drawShape</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> &amp; <i>p</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3canvaspolygonalitem.html#drawShape">Q3CanvasPolygonalItem::drawShape</a>().</p>
<p>Draws the rectangle on painter <i>p</i>.</p>
<!-- @@@drawShape -->
<!-- $$$height[overload1]$$$height -->
<h3 class="fn"><a name="height"></a><span class="type">int</span> Q3CanvasRectangle::<span class="name">height</span> () const</h3>
<p>Returns the height of the rectangle.</p>
<!-- @@@height -->
<!-- $$$rect[overload1]$$$rect -->
<h3 class="fn"><a name="rect"></a><span class="type"><a href="qrect.html">QRect</a></span> Q3CanvasRectangle::<span class="name">rect</span> () const</h3>
<p>Returns the integer-converted <a href="q3canvasitem.html#x">x</a>(), <a href="q3canvasitem.html#y">y</a>() position and <a href="q3canvasrectangle.html#size">size</a>() of the rectangle as a <a href="qrect.html">QRect</a>.</p>
<!-- @@@rect -->
<!-- $$$rtti[overload1]$$$rtti -->
<h3 class="fn"><a name="rtti"></a><span class="type">int</span> Q3CanvasRectangle::<span class="name">rtti</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3canvasitem.html#rtti">Q3CanvasItem::rtti</a>().</p>
<p>Returns 5 (<a href="q3canvasitem.html#RttiValues-enum">Q3CanvasItem::Rtti_Rectangle</a>).</p>
<p><b>See also </b><a href="q3canvasitem.html#rtti">Q3CanvasItem::rtti</a>().</p>
<!-- @@@rtti -->
<!-- $$$setSize[overload1]$$$setSizeintint -->
<h3 class="fn"><a name="setSize"></a><span class="type">void</span> Q3CanvasRectangle::<span class="name">setSize</span> ( <span class="type">int</span> <i>width</i>, <span class="type">int</span> <i>height</i> )</h3>
<p>Sets the <i>width</i> and <i>height</i> of the rectangle.</p>
<p><b>See also </b><a href="q3canvasrectangle.html#size">size</a>().</p>
<!-- @@@setSize -->
<!-- $$$size[overload1]$$$size -->
<h3 class="fn"><a name="size"></a><span class="type"><a href="qsize.html">QSize</a></span> Q3CanvasRectangle::<span class="name">size</span> () const</h3>
<p>Returns the <a href="q3canvasrectangle.html#width">width</a>() and <a href="q3canvasrectangle.html#height">height</a>() of the rectangle.</p>
<p><b>See also </b><a href="q3canvasrectangle.html#rect">rect</a>() and <a href="q3canvasrectangle.html#setSize">setSize</a>().</p>
<!-- @@@size -->
<!-- $$$width[overload1]$$$width -->
<h3 class="fn"><a name="width"></a><span class="type">int</span> Q3CanvasRectangle::<span class="name">width</span> () const</h3>
<p>Returns the width of the rectangle.</p>
<!-- @@@width -->
</div>
  <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>