~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qrubberband.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/src/gui/widgets/qrubberband.cpp -->
 
5
<!-- qrubberband.cpp -->
6
6
<head>
7
 
  <title>Qt 4.5: QRubberBand Class Reference</title>
 
7
  <title>Qt 4.6: QRubberBand Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl//QRubberBand" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QRubberBand Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
 
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
15
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">QRubberBand Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
16
17
</h1>
17
18
<p>The QRubberBand class provides a rectangle or line that can indicate a selection or a boundary. <a href="#details">More...</a></p>
18
19
<pre> #include &lt;QRubberBand&gt;</pre><p>Inherits <a href="qwidget.html">QWidget</a>.</p>
19
20
<ul>
20
21
<li><a href="qrubberband-members.html">List of all members, including inherited members</a></li>
21
22
</ul>
 
23
<hr />
22
24
<a name="public-types"></a>
23
 
<h3>Public Types</h3>
24
 
<ul>
25
 
<li><div class="fn"></div>enum <b><a href="qrubberband.html#Shape-enum">Shape</a></b> { Line, Rectangle }</li>
26
 
</ul>
 
25
<h2>Public Types</h2>
 
26
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
27
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#Shape-enum">Shape</a></b> { Line, Rectangle }</td></tr>
 
28
</table>
 
29
<hr />
27
30
<a name="public-functions"></a>
28
 
<h3>Public Functions</h3>
29
 
<ul>
30
 
<li><div class="fn"></div><b><a href="qrubberband.html#QRubberBand">QRubberBand</a></b> ( Shape <i>s</i>, QWidget * <i>p</i> = 0 )</li>
31
 
<li><div class="fn"></div><b><a href="qrubberband.html#dtor.QRubberBand">~QRubberBand</a></b> ()</li>
32
 
<li><div class="fn"></div>void <b><a href="qrubberband.html#move">move</a></b> ( int <i>x</i>, int <i>y</i> )</li>
33
 
<li><div class="fn"></div>void <b><a href="qrubberband.html#move-2">move</a></b> ( const QPoint &amp; <i>p</i> )</li>
34
 
<li><div class="fn"></div>void <b><a href="qrubberband.html#resize">resize</a></b> ( int <i>width</i>, int <i>height</i> )</li>
35
 
<li><div class="fn"></div>void <b><a href="qrubberband.html#resize-2">resize</a></b> ( const QSize &amp; <i>size</i> )</li>
36
 
<li><div class="fn"></div>void <b><a href="qrubberband.html#setGeometry">setGeometry</a></b> ( const QRect &amp; <i>rect</i> )</li>
37
 
<li><div class="fn"></div>void <b><a href="qrubberband.html#setGeometry-2">setGeometry</a></b> ( int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i> )</li>
38
 
<li><div class="fn"></div>Shape <b><a href="qrubberband.html#shape">shape</a></b> () const</li>
39
 
</ul>
40
 
<ul>
41
 
<li><div class="fn"></div>207 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
42
 
<li><div class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
43
 
<li><div class="fn"></div>12 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
44
 
</ul>
 
31
<h2>Public Functions</h2>
 
32
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
33
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#QRubberBand">QRubberBand</a></b> ( Shape <i>s</i>, QWidget * <i>p</i> = 0 )</td></tr>
 
34
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#dtor.QRubberBand">~QRubberBand</a></b> ()</td></tr>
 
35
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#move">move</a></b> ( int <i>x</i>, int <i>y</i> )</td></tr>
 
36
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#move-2">move</a></b> ( const QPoint &amp; <i>p</i> )</td></tr>
 
37
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#resize">resize</a></b> ( int <i>width</i>, int <i>height</i> )</td></tr>
 
38
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#resize-2">resize</a></b> ( const QSize &amp; <i>size</i> )</td></tr>
 
39
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#setGeometry">setGeometry</a></b> ( const QRect &amp; <i>rect</i> )</td></tr>
 
40
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#setGeometry-2">setGeometry</a></b> ( int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i> )</td></tr>
 
41
<tr><td class="memItemLeft" align="right" valign="top">Shape </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#shape">shape</a></b> () const</td></tr>
 
42
</table>
 
43
<ul>
 
44
<li><div bar="2" class="fn"></div>215 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
 
45
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
46
<li><div bar="2" class="fn"></div>12 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
47
</ul>
 
48
<hr />
45
49
<a name="protected-functions"></a>
46
 
<h3>Protected Functions</h3>
47
 
<ul>
48
 
<li><div class="fn"></div>void <b><a href="qrubberband.html#initStyleOption">initStyleOption</a></b> ( QStyleOptionRubberBand * <i>option</i> ) const</li>
49
 
</ul>
50
 
<ul>
51
 
<li><div class="fn"></div>37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
52
 
<li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
53
 
<li><div class="fn"></div>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
 
50
<h2>Protected Functions</h2>
 
51
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
52
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#initStyleOption">initStyleOption</a></b> ( QStyleOptionRubberBand * <i>option</i> ) const</td></tr>
 
53
</table>
 
54
<hr />
 
55
<a name="reimplemented-protected-functions"></a>
 
56
<h2>Reimplemented Protected Functions</h2>
 
57
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
58
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#changeEvent">changeEvent</a></b> ( QEvent * <i>e</i> )</td></tr>
 
59
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#event">event</a></b> ( QEvent * <i>e</i> )</td></tr>
 
60
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#moveEvent">moveEvent</a></b> ( QMoveEvent * )</td></tr>
 
61
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#paintEvent">paintEvent</a></b> ( QPaintEvent * )</td></tr>
 
62
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * )</td></tr>
 
63
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qrubberband.html#showEvent">showEvent</a></b> ( QShowEvent * <i>e</i> )</td></tr>
 
64
</table>
 
65
<ul>
 
66
<li><div bar="2" class="fn"></div>37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
 
67
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
68
<li><div bar="2" class="fn"></div>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
54
69
</ul>
55
70
<h3>Additional Inherited Members</h3>
56
71
<ul>
57
 
<li><div class="fn"></div>57 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
 
72
<li><div class="fn"></div>58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
58
73
<li><div class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
59
74
<li><div class="fn"></div>19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
60
75
<li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
94
109
<p>Call <a href="qwidget.html#show">show</a>() to make the rubber band visible; also when the rubber band is not a top-level. Hiding or destroying the widget will make the rubber band disappear. The rubber band can be a <a href="qrubberband.html#Shape-enum">Rectangle</a> or a <a href="qrubberband.html#Shape-enum">Line</a> (vertical or horizontal), depending on the <a href="qrubberband.html#shape">shape</a>() it was given when constructed.</p>
95
110
<hr />
96
111
<h2>Member Type Documentation</h2>
 
112
<a name="//apple_ref/cpp/tag/QRubberBand/Shape" />
 
113
<a name="//apple_ref/cpp/econst/QRubberBand/Line" />
 
114
<a name="//apple_ref/cpp/econst/QRubberBand/Rectangle" />
97
115
<h3 class="fn"><a name="Shape-enum"></a>enum QRubberBand::Shape</h3>
98
116
<p>This enum specifies what shape a <a href="qrubberband.html">QRubberBand</a> should have. This is a drawing hint that is passed down to the style system, and can be interpreted by each <a href="qstyle.html">QStyle</a>.</p>
99
 
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
 
117
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
100
118
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
101
119
<tr><td valign="top"><tt>QRubberBand::Line</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">A <a href="qrubberband.html">QRubberBand</a> can represent a vertical or horizontal line. Geometry is still given in <a href="qwidget.html#rect-prop">rect</a>() and the line will fill the given geometry on most styles.</td></tr>
102
120
<tr><td valign="top"><tt>QRubberBand::Rectangle</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">A <a href="qrubberband.html">QRubberBand</a> can represent a rectangle. Some styles will interpret this as a filled (often semi-transparent) rectangle, or a rectangular outline.</td></tr>
103
121
</table></p>
104
122
<hr />
105
123
<h2>Member Function Documentation</h2>
 
124
<a name="//apple_ref/cpp/instm/QRubberBand/QRubberBand" />
106
125
<h3 class="fn"><a name="QRubberBand"></a>QRubberBand::QRubberBand ( <a href="qrubberband.html#Shape-enum">Shape</a> <i>s</i>, <a href="qwidget.html">QWidget</a> * <i>p</i> = 0 )</h3>
107
126
<p>Constructs a rubber band of shape <i>s</i>, with parent <i>p</i>.</p>
108
127
<p>By default a rectangular rubber band (<i>s</i> is <tt>Rectangle</tt>) will use a mask, so that a small border of the rectangle is all that is visible. Some styles (e.g&#x2e;, native Mac OS X) will change this and call <a href="qwidget.html#windowOpacity-prop">QWidget::setWindowOpacity</a>() to make a semi-transparent filled selection rectangle.</p>
 
128
<a name="//apple_ref/cpp/instm/QRubberBand/~QRubberBand" />
109
129
<h3 class="fn"><a name="dtor.QRubberBand"></a>QRubberBand::~QRubberBand ()</h3>
110
130
<p>Destructor.</p>
 
131
<a name="//apple_ref/cpp/instm/QRubberBand/changeEvent" />
 
132
<h3 class="fn"><a name="changeEvent"></a>void QRubberBand::changeEvent ( <a href="qevent.html">QEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
133
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
 
134
<a name="//apple_ref/cpp/instm/QRubberBand/event" />
 
135
<h3 class="fn"><a name="event"></a>bool QRubberBand::event ( <a href="qevent.html">QEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
136
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
 
137
<a name="//apple_ref/cpp/instm/QRubberBand/initStyleOption" />
111
138
<h3 class="fn"><a name="initStyleOption"></a>void QRubberBand::initStyleOption ( <a href="qstyleoptionrubberband.html">QStyleOptionRubberBand</a> * <i>option</i> ) const&nbsp;&nbsp;<tt> [protected]</tt></h3>
112
139
<p>Initialize <i>option</i> with the values from this <a href="qrubberband.html">QRubberBand</a>. This method is useful for subclasses when they need a <a href="qstyleoptionrubberband.html">QStyleOptionRubberBand</a>, but don't want to fill in all the information themselves.</p>
113
140
<p>See also <a href="qstyleoption.html#initFrom">QStyleOption::initFrom</a>().</p>
 
141
<a name="//apple_ref/cpp/instm/QRubberBand/move" />
114
142
<h3 class="fn"><a name="move"></a>void QRubberBand::move ( int <i>x</i>, int <i>y</i> )</h3>
115
143
<p>Moves the rubberband to point (<i>x</i>, <i>y</i>).</p>
116
144
<p>See also <a href="qrubberband.html#resize">resize</a>().</p>
118
146
<p>This is an overloaded function.</p>
119
147
<p>Moves the rubberband to point <i>p</i>.</p>
120
148
<p>See also <a href="qrubberband.html#resize">resize</a>().</p>
 
149
<a name="//apple_ref/cpp/instm/QRubberBand/moveEvent" />
 
150
<h3 class="fn"><a name="moveEvent"></a>void QRubberBand::moveEvent ( <a href="qmoveevent.html">QMoveEvent</a> * )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
151
<p>Reimplemented from <a href="qwidget.html#moveEvent">QWidget::moveEvent</a>().</p>
 
152
<a name="//apple_ref/cpp/instm/QRubberBand/paintEvent" />
 
153
<h3 class="fn"><a name="paintEvent"></a>void QRubberBand::paintEvent ( <a href="qpaintevent.html">QPaintEvent</a> * )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
154
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
 
155
<a name="//apple_ref/cpp/instm/QRubberBand/resize" />
121
156
<h3 class="fn"><a name="resize"></a>void QRubberBand::resize ( int <i>width</i>, int <i>height</i> )</h3>
122
157
<p>Resizes the rubberband so that its width is <i>width</i>, and its height is <i>height</i>.</p>
123
158
<p>See also <a href="qrubberband.html#move">move</a>().</p>
125
160
<p>This is an overloaded function.</p>
126
161
<p>Resizes the rubberband so that its new size is <i>size</i>.</p>
127
162
<p>See also <a href="qrubberband.html#move">move</a>().</p>
 
163
<a name="//apple_ref/cpp/instm/QRubberBand/resizeEvent" />
 
164
<h3 class="fn"><a name="resizeEvent"></a>void QRubberBand::resizeEvent ( <a href="qresizeevent.html">QResizeEvent</a> * )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
165
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
 
166
<a name="//apple_ref/cpp/instm/QRubberBand/setGeometry" />
128
167
<h3 class="fn"><a name="setGeometry"></a>void QRubberBand::setGeometry ( const <a href="qrect.html">QRect</a> &amp; <i>rect</i> )</h3>
129
168
<p>Sets the geometry of the rubber band to <i>rect</i>, specified in the coordinate system of its parent widget.</p>
130
169
<p>See also <a href="qwidget.html#geometry-prop">QWidget::geometry</a>.</p>
131
170
<h3 class="fn"><a name="setGeometry-2"></a>void QRubberBand::setGeometry ( int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i> )</h3>
132
171
<p>This is an overloaded function.</p>
133
172
<p>Sets the geometry of the rubberband to the rectangle whose top-left corner lies at the point (<i>x</i>, <i>y</i>), and with dimensions specified by <i>width</i> and <i>height</i>. The geometry is specified in the parent widget's coordinate system.</p>
 
173
<a name="//apple_ref/cpp/instm/QRubberBand/shape" />
134
174
<h3 class="fn"><a name="shape"></a><a href="qrubberband.html#Shape-enum">Shape</a> QRubberBand::shape () const</h3>
135
175
<p>Returns the shape of this rubber band. The shape can only be set upon construction.</p>
 
176
<a name="//apple_ref/cpp/instm/QRubberBand/showEvent" />
 
177
<h3 class="fn"><a name="showEvent"></a>void QRubberBand::showEvent ( <a href="qshowevent.html">QShowEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
178
<p>Reimplemented from <a href="qwidget.html#showEvent">QWidget::showEvent</a>().</p>
136
179
<p /><address><hr /><div align="center">
137
180
<table width="100%" cellspacing="0" border="0"><tr class="address">
138
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
139
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
140
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
141
 
</tr></table></div></address></body>
 
181
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
182
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
183
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
184
<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>
142
185
</html>