📄 class_qwt_plot_grid.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: QwtPlotGrid 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>QwtPlotGrid Class Reference</h1><!-- doxytag: class="QwtPlotGrid" --><!-- doxytag: inherits="QwtPlotItem" -->Inheritance diagram for QwtPlotGrid:<p><center><img src="class_qwt_plot_grid__inherit__graph.png" border="0" usemap="#_qwt_plot_grid__inherit__map" alt="Inheritance graph"></center><map name="_qwt_plot_grid__inherit__map"><area href="class_qwt_plot_item.html" shape="rect" coords="7,8,100,32" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for QwtPlotGrid:<p><center><img src="class_qwt_plot_grid__coll__graph.png" border="0" usemap="#_qwt_plot_grid__coll__map" alt="Collaboration graph"></center><map name="_qwt_plot_grid__coll__map"><area href="class_qwt_plot_item.html" shape="rect" coords="7,8,100,32" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_qwt_plot_grid-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>A class which draws a coordinate grid. <p>The <a class="el" href="class_qwt_plot_grid.html">QwtPlotGrid</a> class can be used to draw a coordinate grid. A coordinate grid consists of major and minor vertical and horizontal gridlines. The locations of the gridlines are determined by the X and Y scale divisions which can be assigned with <a class="el" href="class_qwt_plot_grid.html#eeb88397c2aaf5e763d57c898a2fcd13">QwtPlotGrid::setXDiv</a> and <a class="el" href="class_qwt_plot_grid.html#9eb130275560bdaa65551e2f69232b72">QwtPlotGrid::setYDiv()</a> The <a class="el" href="class_qwt_plot_grid.html#a04412481976807628047ba376fb1a59">draw()</a> member draws the grid within a bounding rectangle. <p><p>Definition at line <a class="el" href="qwt__plot__grid_8h-source.html#l00034">34</a> of file <a class="el" href="qwt__plot__grid_8h-source.html">qwt_plot_grid.h</a>.<table border="0" cellpadding="0" cellspacing="0"><tr><td></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_plot_grid.html#43001238f3024c15baa8ae61b29ae170">QwtPlotGrid</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_grid.html#f39443cd91b8a96a797af1d6b78bfab3">~QwtPlotGrid</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ae0d0b5afbc670dd257302b13601ea99"></a><!-- doxytag: member="QwtPlotGrid::rtti" ref="ae0d0b5afbc670dd257302b13601ea99" args="() const " -->virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_grid.html#ae0d0b5afbc670dd257302b13601ea99">rtti</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_plot_grid.html#ba4de91f74f86e172e080fa62765bba8">enableX</a> (bool tf)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_grid.html#46d19c58295d538518586374efadd34c">xEnabled</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_plot_grid.html#0172d8af861495a94aa856af26ad786d">enableY</a> (bool tf)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_grid.html#d0f38876f49c5197e929ab80e389dbb5">yEnabled</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_plot_grid.html#4106c58c9d463bd4ccd94e215cc246bb">enableXMin</a> (bool tf)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_grid.html#2eeb5b2118f35409cb1450c2a032e8ff">xMinEnabled</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_plot_grid.html#21b26d5b6b0745ecdec12d6bdeb8ecb4">enableYMin</a> (bool tf)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_grid.html#f677551f6121de684888af6e2b77333f">yMinEnabled</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_plot_grid.html#eeb88397c2aaf5e763d57c898a2fcd13">setXDiv</a> (const <a class="el" href="class_qwt_scale_div.html">QwtScaleDiv</a> &sx)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="class_qwt_scale_div.html">QwtScaleDiv</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_grid.html#4de2f1d11d5b24c0790db1e3dd0b3436">xScaleDiv</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_plot_grid.html#9eb130275560bdaa65551e2f69232b72">setYDiv</a> (const <a class="el" href="class_qwt_scale_div.html">QwtScaleDiv</a> &sy)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="class_qwt_scale_div.html">QwtScaleDiv</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_grid.html#0da37b84786570c1ecff37ac18c6684c">yScaleDiv</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_plot_grid.html#d84a6b1110d593af76e5e777ae1e8bfe">setPen</a> (const QPen &p)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_grid.html#c749a9ba8c2d05f4da83c6f6f2f8a0ec">setMajPen</a> (const QPen &p)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const QPen & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_grid.html#00cad53a757c6e724a68cc90eb1881bf">majPen</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_plot_grid.html#012823a76b8a1a586b0f4326164e8c14">setMinPen</a> (const QPen &p)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const QPen & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_grid.html#dbbaea0c1ba977aa40403f8ca6b13d8d">minPen</a> () const </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_plot_grid.html#a04412481976807628047ba376fb1a59">draw</a> (QPainter *p, const <a class="el" href="class_qwt_scale_map.html">QwtScaleMap</a> &xMap, const <a class="el" href="class_qwt_scale_map.html">QwtScaleMap</a> &yMap, const QRect &rect) const </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_plot_grid.html#0da4034643afc53e2c4a11c70c35319e">updateScaleDiv</a> (const <a class="el" href="class_qwt_scale_div.html">QwtScaleDiv</a> &, const <a class="el" href="class_qwt_scale_div.html">QwtScaleDiv</a> &)</td></tr></table><hr><h2>Constructor & Destructor Documentation</h2><a class="anchor" name="43001238f3024c15baa8ae61b29ae170"></a><!-- doxytag: member="QwtPlotGrid::QwtPlotGrid" ref="43001238f3024c15baa8ae61b29ae170" 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">QwtPlotGrid::QwtPlotGrid </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> [explicit]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Enables major grid, disables minor grid. <p><p>Definition at line <a class="el" href="qwt__plot__grid_8cpp-source.html#l00042">42</a> of file <a class="el" href="qwt__plot__grid_8cpp-source.html">qwt_plot_grid.cpp</a>.<p>References <a class="el" href="qwt__plot__item_8cpp-source.html#l00126">QwtPlotItem::setZ()</a>. </td> </tr></table><a class="anchor" name="f39443cd91b8a96a797af1d6b78bfab3"></a><!-- doxytag: member="QwtPlotGrid::~QwtPlotGrid" ref="f39443cd91b8a96a797af1d6b78bfab3" 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">QwtPlotGrid::~QwtPlotGrid </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>dtor <p><p>Definition at line <a class="el" href="qwt__plot__grid_8cpp-source.html#l00050">50</a> of file <a class="el" href="qwt__plot__grid_8cpp-source.html">qwt_plot_grid.cpp</a>. </td> </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="a04412481976807628047ba376fb1a59"></a><!-- doxytag: member="QwtPlotGrid::draw" ref="a04412481976807628047ba376fb1a59" args="(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &rect) 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 QwtPlotGrid::draw </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">QPainter * </td> <td class="mdname" nowrap> <em>painter</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const <a class="el" href="class_qwt_scale_map.html">QwtScaleMap</a> & </td> <td class="mdname" nowrap> <em>mx</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const <a class="el" href="class_qwt_scale_map.html">QwtScaleMap</a> & </td> <td class="mdname" nowrap> <em>my</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const QRect & </td> <td class="mdname" nowrap> <em>r</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"> const<code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Draw the grid. <p>The grid is drawn into the bounding rectangle such that gridlines begin and end at the rectangle's borders. The X and Y maps are used to map the scale divisions into the drawing region screen. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>painter</em> </td><td>Painter </td></tr> <tr><td valign="top"></td><td valign="top"><em>mx</em> </td><td>X axis map </td></tr> <tr><td valign="top"></td><td valign="top"><em>my</em> </td><td>Y axis </td></tr> <tr><td valign="top"></td><td valign="top"><em>r</em> </td><td>Contents rect of the plot canvas </td></tr> </table></dl><p>Implements <a class="el" href="class_qwt_plot_item.html#5483623e4fd1ae85b06b93523784358b">QwtPlotItem</a>.<p>Definition at line <a class="el" href="qwt__plot__grid_8cpp-source.html#l00202">202</a> of file <a class="el" href="qwt__plot__grid_8cpp-source.html">qwt_plot_grid.cpp</a>. </td> </tr></table><a class="anchor" name="ba4de91f74f86e172e080fa62765bba8"></a><!-- doxytag: member="QwtPlotGrid::enableX" ref="ba4de91f74f86e172e080fa62765bba8" args="(bool tf)" --><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 QwtPlotGrid::enableX </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">bool </td> <td class="mdname1" valign="top" nowrap> <em>tf</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>Enable or disable vertical gridlines. <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>tf</em> </td><td>Enable (true) or disable</td></tr> </table></dl><dl compact><dt><b>See also:</b></dt><dd>Minor gridlines can be enabled or disabled with <a class="el" href="class_qwt_plot_grid.html#4106c58c9d463bd4ccd94e215cc246bb">enableXMin()</a> </dd></dl><p>Definition at line <a class="el" href="qwt__plot__grid_8cpp-source.html#l00067">67</a> of file <a class="el" href="qwt__plot__grid_8cpp-source.html">qwt_plot_grid.cpp</a>.<p>References <a class="el" href="qwt__plot__item_8cpp-source.html#l00286">QwtPlotItem::itemChanged()</a>. </td> </tr></table><a class="anchor" name="4106c58c9d463bd4ccd94e215cc246bb"></a><!-- doxytag: member="QwtPlotGrid::enableXMin" ref="4106c58c9d463bd4ccd94e215cc246bb" args="(bool tf)" --><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 QwtPlotGrid::enableXMin </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">bool </td> <td class="mdname1" valign="top" nowrap> <em>tf</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>Enable or disable minor vertical gridlines. <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>tf</em> </td><td>Enable (true) or disable </td></tr> </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_plot_grid.html#ba4de91f74f86e172e080fa62765bba8">enableX()</a> </dd></dl><p>Definition at line <a class="el" href="qwt__plot__grid_8cpp-source.html#l00095">95</a> of file <a class="el" href="qwt__plot__grid_8cpp-source.html">qwt_plot_grid.cpp</a>.<p>References <a class="el" href="qwt__plot__item_8cpp-source.html#l00286">QwtPlotItem::itemChanged()</a>. </td> </tr></table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -