Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 60f1dc962abad0f3b492991a4fbef9be > files > 1362

vtk-doc-5.4.2-5mdv2010.0.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>VTK: vtkQtChartMouseBox Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="classes.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>vtkQtChartMouseBox Class Reference</h1><!-- doxytag: class="vtkQtChartMouseBox" --><code>#include &lt;<a class="el" href="a04533.html">vtkQtChartMouseBox.h</a>&gt;</code>
<p>

<p>
<a href="a13632.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
The <a class="el" href="a01359.html" title="The vtkQtChartMouseBox class is used to draw a mouse box that can be used for zooming...">vtkQtChartMouseBox</a> class is used to draw a mouse box that can be used for zooming or selection. 
<p>
To use the <a class="el" href="a01359.html" title="The vtkQtChartMouseBox class is used to draw a mouse box that can be used for zooming...">vtkQtChartMouseBox</a>, code needs to be added to several key methods. The drag box interaction starts in the mouse press event. The box grows or shrinks in the mouse move event. In the mouse release event, the box is finalized and used for its intent (zoom, select, etc.).<p>
In the mouse press event, the mouse location needs to be saved. The position should be in the mouse box's parent coordinates. <div class="fragment"><pre class="fragment">  <span class="keywordtype">void</span> SomeClass::mousePressEvent(QMouseEvent *e)
  {
    this-&gt;mouseBox-&gt;setStartingPosition(e-&gt;pos());
    this-&gt;mouseBox-&gt;setVisible(<span class="keyword">true</span>);
  }
</pre></div><p>
In the mouse move event, the drag box needs to be updated. The point set in the mouse press event should remain unchanged until the mouse release event. If your class watches all mouse move events, make sure the box is only updated for drag events. <div class="fragment"><pre class="fragment">  <span class="keywordtype">void</span> SomeClass::mouseMoveEvent(QMouseEvent *e)
  {
    this-&gt;mouseBox-&gt;adjustRectangle(e-&gt;pos());
  }
</pre></div><p>
In the mouse release event, the drag box needs to be updated with the release location before using it. After using the box, it should be hidden. <div class="fragment"><pre class="fragment">  <span class="keywordtype">void</span> SomeClass::mouseReleaseEvent(QMouseEvent *e)
  {
    this-&gt;mouseBox-&gt;adjustRectangle(e-&gt;pos());
    ...
    this-&gt;mouseBox-&gt;setVisible(<span class="keyword">false</span>);
  }
</pre></div> 
<p>Definition at line <a class="el" href="a04533.html#l00082">82</a> of file <a class="el" href="a04533.html">vtkQtChartMouseBox.h</a>.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Signals</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a01359.html#e22b8689467a4239fcbdf9c5e4c102d4">updateNeeded</a> (const QRectF &amp;area)</td></tr>

<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a01359.html#b3aa99ca2b42a20d4709fcb3d5a7ebd4">vtkQtChartMouseBox</a> (QGraphicsView *view)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a01359.html#9abf75c173f98e4226cb2c26d57eab0b">~vtkQtChartMouseBox</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a01359.html#2d2b366ff48a1f47d077a1fef2337cf3">isVisible</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets whether or not the mouse box is visible.  <a href="#2d2b366ff48a1f47d077a1fef2337cf3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a01359.html#2aebbb253d02df4c4f7568b80d3d3e32">setVisible</a> (bool visible)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets whether or not the mouse box is visible.  <a href="#2aebbb253d02df4c4f7568b80d3d3e32"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const QPointF &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a01359.html#ca20d3c94b383d04430fa7f230209908">getStartingPosition</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the mouse box starting position.  <a href="#ca20d3c94b383d04430fa7f230209908"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a01359.html#f4fa729ad9a47be0e821cd1e61580518">setStartingPosition</a> (const QPoint &amp;start)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the mouse box starting position.  <a href="#f4fa729ad9a47be0e821cd1e61580518"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a01359.html#515763de47aee57e8bf31ba126e993a1">adjustRectangle</a> (const QPoint &amp;current)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adjusts the boundary of the mouse box.  <a href="#515763de47aee57e8bf31ba126e993a1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const QRectF &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a01359.html#8224655b79f15701ce3018f6be65a7e7">getRectangle</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the current mouse box.  <a href="#8224655b79f15701ce3018f6be65a7e7"></a><br></td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="b3aa99ca2b42a20d4709fcb3d5a7ebd4"></a><!-- doxytag: member="vtkQtChartMouseBox::vtkQtChartMouseBox" ref="b3aa99ca2b42a20d4709fcb3d5a7ebd4" args="(QGraphicsView *view)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vtkQtChartMouseBox::vtkQtChartMouseBox           </td>
          <td>(</td>
          <td class="paramtype">QGraphicsView *&nbsp;</td>
          <td class="paramname"> <em>view</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="9abf75c173f98e4226cb2c26d57eab0b"></a><!-- doxytag: member="vtkQtChartMouseBox::~vtkQtChartMouseBox" ref="9abf75c173f98e4226cb2c26d57eab0b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vtkQtChartMouseBox::~vtkQtChartMouseBox           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="2d2b366ff48a1f47d077a1fef2337cf3"></a><!-- doxytag: member="vtkQtChartMouseBox::isVisible" ref="2d2b366ff48a1f47d077a1fef2337cf3" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool vtkQtChartMouseBox::isVisible           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets whether or not the mouse box is visible. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the mouse box should be painted. </dd></dl>

<p>Definition at line <a class="el" href="a04533.html#l00094">94</a> of file <a class="el" href="a04533.html">vtkQtChartMouseBox.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="2aebbb253d02df4c4f7568b80d3d3e32"></a><!-- doxytag: member="vtkQtChartMouseBox::setVisible" ref="2aebbb253d02df4c4f7568b80d3d3e32" args="(bool visible)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vtkQtChartMouseBox::setVisible           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>visible</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets whether or not the mouse box is visible. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>visible</em>&nbsp;</td><td>True if the mouse box should be painted. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="ca20d3c94b383d04430fa7f230209908"></a><!-- doxytag: member="vtkQtChartMouseBox::getStartingPosition" ref="ca20d3c94b383d04430fa7f230209908" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const QPointF&amp; vtkQtChartMouseBox::getStartingPosition           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets the mouse box starting position. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A reference to the mouse box starting position. </dd></dl>

</div>
</div><p>
<a class="anchor" name="f4fa729ad9a47be0e821cd1e61580518"></a><!-- doxytag: member="vtkQtChartMouseBox::setStartingPosition" ref="f4fa729ad9a47be0e821cd1e61580518" args="(const QPoint &amp;start)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vtkQtChartMouseBox::setStartingPosition           </td>
          <td>(</td>
          <td class="paramtype">const QPoint &amp;&nbsp;</td>
          <td class="paramname"> <em>start</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the mouse box starting position. 
<p>
The starting position should be set before calling <code>adjustRectangle</code>. The starting position and adjustment positions should be in view coordinates.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>The original mouse press location in view coordinates. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd>vtkQtChartMouseBox::adjustRectangle(const QPointF &amp;) </dd></dl>

</div>
</div><p>
<a class="anchor" name="515763de47aee57e8bf31ba126e993a1"></a><!-- doxytag: member="vtkQtChartMouseBox::adjustRectangle" ref="515763de47aee57e8bf31ba126e993a1" args="(const QPoint &amp;current)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vtkQtChartMouseBox::adjustRectangle           </td>
          <td>(</td>
          <td class="paramtype">const QPoint &amp;&nbsp;</td>
          <td class="paramname"> <em>current</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Adjusts the boundary of the mouse box. 
<p>
The selection or zoom box should contain the original mouse down location and the current mouse location. This method is used to adjust the box based on the current mouse location.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>current</em>&nbsp;</td><td>The current position of the mouse in view coordinates. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="8224655b79f15701ce3018f6be65a7e7"></a><!-- doxytag: member="vtkQtChartMouseBox::getRectangle" ref="8224655b79f15701ce3018f6be65a7e7" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const QRectF&amp; vtkQtChartMouseBox::getRectangle           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets the current mouse box. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A reference to the mouse box. </dd></dl>

</div>
</div><p>
<a class="anchor" name="e22b8689467a4239fcbdf9c5e4c102d4"></a><!-- doxytag: member="vtkQtChartMouseBox::updateNeeded" ref="e22b8689467a4239fcbdf9c5e4c102d4" args="(const QRectF &amp;area)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vtkQtChartMouseBox::updateNeeded           </td>
          <td>(</td>
          <td class="paramtype">const QRectF &amp;&nbsp;</td>
          <td class="paramname"> <em>area</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>dox/GUISupport/Qt/Chart/<a class="el" href="a04533.html">vtkQtChartMouseBox.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 19:28:20 2009 for VTK by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>