~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): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/widgets/qrubberband.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QRubberBand Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<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="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QRubberBand Class Reference</h1>
 
21
<p>The QRubberBand class provides a rectangle or line that can indicate a selection or a boundary. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QRubberBand&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherits <a href="qwidget.html">QWidget</a>.</p>
 
24
<ul>
 
25
<li><a href="qrubberband-members.html">List of all members, including inherited members</a></li>
 
26
</ul>
 
27
<a name="public-types"></a>
 
28
<h3>Public Types</h3>
 
29
<ul>
 
30
<li><div class="fn"/>enum <b><a href="qrubberband.html#Shape-enum">Shape</a></b> { Line, Rectangle }</li>
 
31
</ul>
 
32
<a name="public-functions"></a>
 
33
<h3>Public Functions</h3>
 
34
<ul>
 
35
<li><div class="fn"/><b><a href="qrubberband.html#QRubberBand">QRubberBand</a></b> ( Shape <i>s</i>, QWidget * <i>p</i> = 0 )</li>
 
36
<li><div class="fn"/><b><a href="qrubberband.html#dtor.QRubberBand">~QRubberBand</a></b> ()</li>
 
37
<li><div class="fn"/>void <b><a href="qrubberband.html#move">move</a></b> ( int <i>x</i>, int <i>y</i> )</li>
 
38
<li><div class="fn"/>void <b><a href="qrubberband.html#move-2">move</a></b> ( const QPoint &amp; <i>p</i> )</li>
 
39
<li><div class="fn"/>void <b><a href="qrubberband.html#resize">resize</a></b> ( int <i>width</i>, int <i>height</i> )</li>
 
40
<li><div class="fn"/>void <b><a href="qrubberband.html#resize-2">resize</a></b> ( const QSize &amp; <i>size</i> )</li>
 
41
<li><div class="fn"/>void <b><a href="qrubberband.html#setGeometry">setGeometry</a></b> ( const QRect &amp; <i>rect</i> )</li>
 
42
<li><div class="fn"/>void <b><a href="qrubberband.html#setGeometry-2">setGeometry</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</li>
 
43
<li><div class="fn"/>Shape <b><a href="qrubberband.html#shape">shape</a></b> () const</li>
 
44
</ul>
 
45
<ul>
 
46
<li><div class="fn"/>183 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
 
47
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
48
<li><div class="fn"/>10 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
49
</ul>
 
50
<h3>Additional Inherited Members</h3>
 
51
<ul>
 
52
<li><div class="fn"/>52 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
 
53
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
54
<li><div class="fn"/>17 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
 
55
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
56
<li><div class="fn"/>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
 
57
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
58
<li><div class="fn"/>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
 
59
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
60
<li><div class="fn"/>39 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
 
61
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
62
</ul>
 
63
<a name="details"></a>
 
64
<hr />
 
65
<h2>Detailed Description</h2>
 
66
<p>The QRubberBand class provides a rectangle or line that can indicate a selection or a boundary.</p>
 
67
<p>A rubber band is often used to show a new bounding area (as in a <a href="qsplitter.html">QSplitter</a> or a <a href="qdockwidget.html">QDockWidget</a> that is undocking). Historically this has been implemented using a <a href="qpainter.html">QPainter</a> and XOR, but this approach doesn't always work properly since rendering can happen in the window below the rubber band, but before the rubber band has been &quot;erased&quot;.</p>
 
68
<p>You can create a QRubberBand whenever you need to render a rubber band around a given area (or to represent a single line), then call <a href="qrubberband.html#setGeometry">setGeometry</a>(), <a href="qrubberband.html#move">move</a>() or <a href="qrubberband.html#resize">resize</a>() to position and size it; hiding (or destroying) the widget will make the rubber band disappear. The rubber band can be a <tt>Rectangle</tt> or a <tt>Line</tt>, depending on the <a href="qrubberband.html#shape">shape</a>() it was given when constructed.</p>
 
69
<hr />
 
70
<h2>Member Type Documentation</h2>
 
71
<h3 class="fn"><a name="Shape-enum"></a>enum QRubberBand::Shape</h3>
 
72
<table border="1" cellpadding="2" cellspacing="1" width="40%">
 
73
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
 
74
<tr><td valign="top"><tt>QRubberBand::Line</tt></td><td align="center" valign="top"><tt>0</tt></td></tr>
 
75
<tr><td valign="top"><tt>QRubberBand::Rectangle</tt></td><td align="center" valign="top"><tt>1</tt></td></tr>
 
76
</table>
 
77
<hr />
 
78
<h2>Member Function Documentation</h2>
 
79
<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>
 
80
<p>Constructs a rubber band of shape <i>s</i>, with parent <i>p</i>.</p>
 
81
<p>By default a rectangular <a href="qrubberband.html">QRubberBand</a> (<i>s</i> is <tt>Rectangle</tt>) will be set to auto mask, so that the boundary of the rectangle is all that is visible. Some styles (for example native Mac OS X) will change this and call <a href="qwidget.html#windowOpacity-prop">QWidget::setWindowOpacity</a>() to make the window only partially opaque.</p>
 
82
<h3 class="fn"><a name="dtor.QRubberBand"></a>QRubberBand::~QRubberBand ()</h3>
 
83
<p>Destructor.</p>
 
84
<h3 class="fn"><a name="move"></a>void QRubberBand::move ( int <i>x</i>, int <i>y</i> )</h3>
 
85
<p>Moves the rubberband to point (<i>x</i>, <i>y</i>).</p>
 
86
<p>See also <a href="qrubberband.html#resize">resize</a>().</p>
 
87
<h3 class="fn"><a name="move-2"></a>void QRubberBand::move ( const <a href="qpoint.html">QPoint</a> &amp; <i>p</i> )</h3>
 
88
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
89
<p>Moves the rubberband to point <i>p</i>.</p>
 
90
<p>See also <a href="qrubberband.html#resize">resize</a>().</p>
 
91
<h3 class="fn"><a name="resize"></a>void QRubberBand::resize ( int <i>width</i>, int <i>height</i> )</h3>
 
92
<p>Resizes the rubberband so that its width is <i>width</i>, and its height is <i>height</i>.</p>
 
93
<p>See also <a href="qrubberband.html#move">move</a>().</p>
 
94
<h3 class="fn"><a name="resize-2"></a>void QRubberBand::resize ( const <a href="qsize.html">QSize</a> &amp; <i>size</i> )</h3>
 
95
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
96
<p>Resizes the rubberband so that its new size is <i>size</i>.</p>
 
97
<p>See also <a href="qrubberband.html#move">move</a>().</p>
 
98
<h3 class="fn"><a name="setGeometry"></a>void QRubberBand::setGeometry ( const <a href="qrect.html">QRect</a> &amp; <i>rect</i> )</h3>
 
99
<p>Changes the rubberband's geometry to the geometry of the rectangle <i>rect</i>.</p>
 
100
<p>See also <a href="qrubberband.html#move">move</a>() and <a href="qrubberband.html#resize">resize</a>().</p>
 
101
<h3 class="fn"><a name="setGeometry-2"></a>void QRubberBand::setGeometry ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</h3>
 
102
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
103
<p>Changes the rubberband's geometry to have a top-left corner of (<i>x</i>, <i>y</i>), a width of <i>w</i>, and a height of <i>h</i>.</p>
 
104
<p>See also <a href="qrubberband.html#move">move</a>() and <a href="qrubberband.html#resize">resize</a>().</p>
 
105
<h3 class="fn"><a name="shape"></a><a href="qrubberband.html#Shape-enum">Shape</a> QRubberBand::shape () const</h3>
 
106
<p>Returns the shape of this rubber band. The shape can only be set upon construction.</p>
 
107
<p /><address><hr /><div align="center">
 
108
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
109
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
110
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
111
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
112
</tr></table></div></address></body>
 
113
</html>