📄 class_qwt_plot_marker.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: QwtPlotMarker 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>QwtPlotMarker Class Reference</h1><!-- doxytag: class="QwtPlotMarker" --><!-- doxytag: inherits="QwtPlotItem" -->Inheritance diagram for QwtPlotMarker:<p><center><img src="class_qwt_plot_marker__inherit__graph.png" border="0" usemap="#_qwt_plot_marker__inherit__map" alt="Inheritance graph"></center><map name="_qwt_plot_marker__inherit__map"><area href="class_qwt_plot_item.html" shape="rect" coords="15,8,108,32" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for QwtPlotMarker:<p><center><img src="class_qwt_plot_marker__coll__graph.png" border="0" usemap="#_qwt_plot_marker__coll__map" alt="Collaboration graph"></center><map name="_qwt_plot_marker__coll__map"><area href="class_qwt_plot_item.html" shape="rect" coords="15,8,108,32" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_qwt_plot_marker-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>A class for drawing markers. <p>A marker can be a horizontal line, a vertical line, a symbol, a label or any combination of them, which can be drawn around a center point inside a bounding rectangle.<p>The <a class="el" href="class_qwt_plot_marker.html#eb0c9bdaeb6dfd7e86ef832fa5f8e3dd">QwtPlotMarker::setSymbol()</a> member assigns a symbol to the marker. The symbol is drawn at the specified point.<p>With <a class="el" href="class_qwt_plot_marker.html#d90adc27ccd6a10a7d6d1bb4464bf7d1">QwtPlotMarker::setLabel()</a>, a label can be assigned to the marker. The <a class="el" href="class_qwt_plot_marker.html#b0c88d103cc68093ac7469ad421105e0">QwtPlotMarker::setLabelAlignment()</a> member specifies where the label is drawn. All the Align*-constants in Qt::AlignmentFlags (see Qt documentation) are valid. The interpretation of the alignment depends on the marker's line style. The alignment refers to the center point of the marker, which means, for example, that the label would be printed left above the center point if the alignment was set to AlignLeft|AlignTop. <p><p>Definition at line <a class="el" href="qwt__plot__marker_8h-source.html#l00045">45</a> of file <a class="el" href="qwt__plot__marker_8h-source.html">qwt_plot_marker.h</a>.<table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Types</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_marker.html#297efa835423bfa5a870bbc8ff1c623b">LineStyle</a> { <br> <b>NoLine</b>, <br> <b>HLine</b>, <br> <b>VLine</b>, <br> <b>Cross</b><br> }</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_marker.html#86eeb61f8f50e879569a439f8d6ab912">QwtPlotMarker</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_marker.html#920d2ddeb2041c03790d7c173e3ad0cf">~QwtPlotMarker</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4e48032adf8bdda1aacba4977280123f"></a><!-- doxytag: member="QwtPlotMarker::rtti" ref="4e48032adf8bdda1aacba4977280123f" args="() const " -->virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_marker.html#4e48032adf8bdda1aacba4977280123f">rtti</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_marker.html#ad43f527f3c0033865fea5a488ef3857">xValue</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_marker.html#30ec999a3e4eba759d4c405fa92f9563">yValue</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">QwtDoublePoint </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_marker.html#de838d7e6da2e84934bb87327afd3c5c">value</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_marker.html#0d53b0e0ed8b48478c02a0ecaf5852b2">setXValue</a> (double)</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_marker.html#47d8e3c0708ad02a9c7cc6aaf985e278">setYValue</a> (double)</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_marker.html#d3a480c64192dabffd02bf5db31f917c">setValue</a> (double, double)</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_marker.html#ef658b7c91945ba1ef7cc38b500abf0d">setValue</a> (const QwtDoublePoint &)</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_marker.html#e4533f9f9f5a7dfbc85729215d4b5932">setLineStyle</a> (<a class="el" href="class_qwt_plot_marker.html#297efa835423bfa5a870bbc8ff1c623b">LineStyle</a> st)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_qwt_plot_marker.html#297efa835423bfa5a870bbc8ff1c623b">LineStyle</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_marker.html#9afac9382c6e482ea0181048b155e287">lineStyle</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_marker.html#c21d413827e42d8a9d5c35a373314195">setLinePen</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_marker.html#744b2aa104fa41d2f09c6658749c2d72">linePen</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_marker.html#eb0c9bdaeb6dfd7e86ef832fa5f8e3dd">setSymbol</a> (const <a class="el" href="class_qwt_symbol.html">QwtSymbol</a> &s)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="class_qwt_symbol.html">QwtSymbol</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_marker.html#b8d26c432d071ac5d118b733f6a25e4f">symbol</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_marker.html#d90adc27ccd6a10a7d6d1bb4464bf7d1">setLabel</a> (const <a class="el" href="class_qwt_text.html">QwtText</a> &)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_qwt_text.html">QwtText</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_marker.html#cf81c4a657fd772cf7c5387a19ab6793">label</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_marker.html#b0c88d103cc68093ac7469ad421105e0">setLabelAlignment</a> (Qt::Alignment)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">Qt::Alignment </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_marker.html#16415f05a235642e2b93df9e4685d68e">labelAlignment</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_marker.html#2958b4b028b822f2b5e08fda061928e7">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 &) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual QwtDoubleRect </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plot_marker.html#5ecbe55bda2502a3fd6410df42e28fb4">boundingRect</a> () const </td></tr></table><hr><h2>Member Enumeration Documentation</h2><a class="anchor" name="297efa835423bfa5a870bbc8ff1c623b"></a><!-- doxytag: member="QwtPlotMarker::LineStyle" ref="297efa835423bfa5a870bbc8ff1c623b" 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">enum <a class="el" href="class_qwt_plot_marker.html#297efa835423bfa5a870bbc8ff1c623b">QwtPlotMarker::LineStyle</a> </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Line styles. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_plot_marker.html#e4533f9f9f5a7dfbc85729215d4b5932">QwtPlotMarker::setLineStyle</a>, <a class="el" href="class_qwt_plot_marker.html#9afac9382c6e482ea0181048b155e287">QwtPlotMarker::lineStyle</a> </dd></dl><p>Definition at line <a class="el" href="qwt__plot__marker_8h-source.html#l00053">53</a> of file <a class="el" href="qwt__plot__marker_8h-source.html">qwt_plot_marker.h</a>. </td> </tr></table><hr><h2>Constructor & Destructor Documentation</h2><a class="anchor" name="86eeb61f8f50e879569a439f8d6ab912"></a><!-- doxytag: member="QwtPlotMarker::QwtPlotMarker" ref="86eeb61f8f50e879569a439f8d6ab912" 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">QwtPlotMarker::QwtPlotMarker </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>Sets alignment to Qt::AlignCenter, and style to NoLine. <p><p>Definition at line <a class="el" href="qwt__plot__marker_8cpp-source.html#l00048">48</a> of file <a class="el" href="qwt__plot__marker_8cpp-source.html">qwt_plot_marker.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="920d2ddeb2041c03790d7c173e3ad0cf"></a><!-- doxytag: member="QwtPlotMarker::~QwtPlotMarker" ref="920d2ddeb2041c03790d7c173e3ad0cf" 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">QwtPlotMarker::~QwtPlotMarker </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__plot__marker_8cpp-source.html#l00056">56</a> of file <a class="el" href="qwt__plot__marker_8cpp-source.html">qwt_plot_marker.cpp</a>. </td> </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="5ecbe55bda2502a3fd6410df42e28fb4"></a><!-- doxytag: member="QwtPlotMarker::boundingRect" ref="5ecbe55bda2502a3fd6410df42e28fb4" 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">QwtDoubleRect QwtPlotMarker::boundingRect </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<code> [virtual]</code></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>An invalid bounding rect: QwtDoubleRect(1.0, 1.0, -2.0, -2.0) </dd></dl><p>Reimplemented from <a class="el" href="class_qwt_plot_item.html#4c2c1c77421229383b3c43cb777e3bfe">QwtPlotItem</a>.<p>Definition at line <a class="el" href="qwt__plot__marker_8cpp-source.html#l00350">350</a> of file <a class="el" href="qwt__plot__marker_8cpp-source.html">qwt_plot_marker.cpp</a>. </td> </tr></table><a class="anchor" name="2958b4b028b822f2b5e08fda061928e7"></a><!-- doxytag: member="QwtPlotMarker::draw" ref="2958b4b028b822f2b5e08fda061928e7" args="(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &) 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 QwtPlotMarker::draw </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">QPainter * </td> <td class="mdname" nowrap> <em>p</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>xMap</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>yMap</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 marker. <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>p</em> </td><td>Painter </td></tr> <tr><td valign="top"></td><td valign="top"><em>xMap</em> </td><td>x Scale Map </td></tr> <tr><td valign="top"></td><td valign="top"><em>yMap</em> </td><td>y Scale Map </td></tr> <tr><td valign="top"></td><td valign="top"><em>r</em> </td><td>Bounding rect, where to paint </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__marker_8cpp-source.html#l00120">120</a> of file <a class="el" href="qwt__plot__marker_8cpp-source.html">qwt_plot_marker.cpp</a>.<p>References <a class="el" href="qwt__painter_8cpp-source.html#l00437">QwtPainter::drawLine()</a>, and <a class="el" href="qwt__scale__map_8h-source.html#l00175">QwtScaleMap::transform()</a>. </td> </tr></table><a class="anchor" name="cf81c4a657fd772cf7c5387a19ab6793"></a><!-- doxytag: member="QwtPlotMarker::label" ref="cf81c4a657fd772cf7c5387a19ab6793" 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"><a class="el" href="class_qwt_text.html">QwtText</a> QwtPlotMarker::label </td> <td class="md" valign="top">( </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -