📄 class_qwt_panner.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Qwt User's Guide: QwtPanner 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.4.6 --><div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li id="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul></div><div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul></div><h1>QwtPanner Class Reference</h1><!-- doxytag: class="QwtPanner" -->Inheritance diagram for QwtPanner:<p><center><img src="class_qwt_panner__inherit__graph.png" border="0" usemap="#_qwt_panner__inherit__map" alt="Inheritance graph"></center><map name="_qwt_panner__inherit__map"><area href="class_qwt_plot_panner.html" shape="rect" coords="7,83,119,107" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_qwt_panner-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2><a class="el" href="class_qwt_panner.html">QwtPanner</a> provides panning of a widget. <p><a class="el" href="class_qwt_panner.html">QwtPanner</a> grabs the contents of a widget, that can be dragged in all directions. The offset between the start and the end position is emitted by the panned signal.<p><a class="el" href="class_qwt_panner.html">QwtPanner</a> grabs the content of the widget into a pixmap and moves the pixmap around, without initiating any repaint events for the widget. Areas, that are not part of content are not painted while panning in in process. This makes panning fast enough for widgets, where repaints are too slow for mouse movements.<p>For widgets, where repaints are very fast it might be better to implement panning manually by mapping mouse events into paint events. <p><p>Definition at line <a class="el" href="qwt__panner_8h-source.html#l00035">35</a> of file <a class="el" href="qwt__panner_8h-source.html">qwt_panner.h</a>.<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 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#e9ce78e6f9ae73317af29b2dc5df7372">panned</a> (int dx, int dy)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#a45ae2f4d6d20a83783898dd86d0b595">moved</a> (int dx, int dy)</td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#f5482be26d69a64c3880653265240736">QwtPanner</a> (QWidget *parent)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#19c9b9a08da05649f6d2ef5bf6fb391c">~QwtPanner</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#43e06c262c945fc7faeb729539bbde58">setEnabled</a> (bool)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#7b0bae829d1ee12208ab8722d52d15a1">isEnabled</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#a2b37fa4cb48abf82ae0308b3e5992c5">setMouseButton</a> (int button, int buttonState=Qt::NoButton)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#a73f227e3337b0ff66da78ca42968d85">getMouseButton</a> (int &button, int &buttonState) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#4545ea538c2a6946b1027f95cfb51c9f">setAbortKey</a> (int key, int state=Qt::NoButton)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#c91ce9e6162515c710875e639f242119">getAbortKey</a> (int &key, int &state) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#c8b0625fe155fff0132df85727f54a3e">setCursor</a> (const QCursor &)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const QCursor </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#05a9ded33442da7f18c30bd06d45b55b">cursor</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#06b8eea86d4dcbe361c4af41a263f2cb">eventFilter</a> (QObject *, QEvent *)</td></tr><tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#e002958978dcc751f9edda24e5858dd9">widgetMousePressEvent</a> (QMouseEvent *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#b2da1e24b1456b223eaa826d8e0a3a81">widgetMouseReleaseEvent</a> (QMouseEvent *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#6545bc6e25018253c59fc27a48eb948f">widgetMouseMoveEvent</a> (QMouseEvent *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#7ed4e89f6c52b841e20ad497af4b4ebc">widgetKeyPressEvent</a> (QKeyEvent *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#8bd447df4a30299bbc8e6b6d3e2e2f9f">widgetKeyReleaseEvent</a> (QKeyEvent *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_panner.html#cd76ea518bd9267a45115d2c6ce19353">paintEvent</a> (QPaintEvent *)</td></tr></table><hr><h2>Constructor & Destructor Documentation</h2><a class="anchor" name="f5482be26d69a64c3880653265240736"></a><!-- doxytag: member="QwtPanner::QwtPanner" ref="f5482be26d69a64c3880653265240736" args="(QWidget *parent)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">QwtPanner::QwtPanner </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">QWidget * </td> <td class="mdname1" valign="top" nowrap> <em>parent</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Creates an panner that is enabled for the left mouse button.<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>parent</em> </td><td>Parent widget to be panned </td></tr> </table></dl><p>Definition at line <a class="el" href="qwt__panner_8cpp-source.html#l00064">64</a> of file <a class="el" href="qwt__panner_8cpp-source.html">qwt_panner.cpp</a>.<p>References <a class="el" href="qwt__panner_8cpp-source.html#l00166">setEnabled()</a>. </td> </tr></table><a class="anchor" name="19c9b9a08da05649f6d2ef5bf6fb391c"></a><!-- doxytag: member="QwtPanner::~QwtPanner" ref="19c9b9a08da05649f6d2ef5bf6fb391c" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">QwtPanner::~QwtPanner </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Destructor. <p><p>Definition at line <a class="el" href="qwt__panner_8cpp-source.html#l00086">86</a> of file <a class="el" href="qwt__panner_8cpp-source.html">qwt_panner.cpp</a>. </td> </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="05a9ded33442da7f18c30bd06d45b55b"></a><!-- doxytag: member="QwtPanner::cursor" ref="05a9ded33442da7f18c30bd06d45b55b" args="() const " --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">const QCursor QwtPanner::cursor </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><dl compact><dt><b>Returns:</b></dt><dd>Cursor that is active while panning </dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_panner.html#c8b0625fe155fff0132df85727f54a3e">setCursor()</a> </dd></dl><p>Definition at line <a class="el" href="qwt__panner_8cpp-source.html#l00145">145</a> of file <a class="el" href="qwt__panner_8cpp-source.html">qwt_panner.cpp</a>. </td> </tr></table><a class="anchor" name="06b8eea86d4dcbe361c4af41a263f2cb"></a><!-- doxytag: member="QwtPanner::eventFilter" ref="06b8eea86d4dcbe361c4af41a263f2cb" args="(QObject *, QEvent *)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">bool QwtPanner::eventFilter </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">QObject * </td> <td class="mdname" nowrap> <em>o</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>QEvent * </td> <td class="mdname" nowrap> <em>e</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Event filter. <p>When <a class="el" href="class_qwt_panner.html#7b0bae829d1ee12208ab8722d52d15a1">isEnabled()</a> the mouse events of the observed widget are filtered.<p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_panner.html#e002958978dcc751f9edda24e5858dd9">widgetMousePressEvent()</a>, <a class="el" href="class_qwt_panner.html#b2da1e24b1456b223eaa826d8e0a3a81">widgetMouseReleaseEvent()</a>, <a class="el" href="class_qwt_panner.html#6545bc6e25018253c59fc27a48eb948f">widgetMouseMoveEvent()</a> </dd></dl><p>Definition at line <a class="el" href="qwt__panner_8cpp-source.html#l00246">246</a> of file <a class="el" href="qwt__panner_8cpp-source.html">qwt_panner.cpp</a>.<p>References <a class="el" href="qwt__panner_8cpp-source.html#l00291">widgetMousePressEvent()</a>. </td> </tr></table><a class="anchor" name="c91ce9e6162515c710875e639f242119"></a><!-- doxytag: member="QwtPanner::getAbortKey" ref="c91ce9e6162515c710875e639f242119" args="(int &key, int &state) const " --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void QwtPanner::getAbortKey </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int & </td> <td class="mdname" nowrap> <em>key</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int & </td> <td class="mdname" nowrap> <em>state</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"> const</td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Get the abort key. <p><p>Definition at line <a class="el" href="qwt__panner_8cpp-source.html#l00119">119</a> of file <a class="el" href="qwt__panner_8cpp-source.html">qwt_panner.cpp</a>. </td> </tr></table><a class="anchor" name="a73f227e3337b0ff66da78ca42968d85"></a><!-- doxytag: member="QwtPanner::getMouseButton" ref="a73f227e3337b0ff66da78ca42968d85" args="(int &button, int &buttonState) const " --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -