📄 class_qwt_legend_item.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: QwtLegendItem 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>QwtLegendItem Class Reference</h1><!-- doxytag: class="QwtLegendItem" --><!-- doxytag: inherits="QwtTextLabel" -->Inheritance diagram for QwtLegendItem:<p><center><img src="class_qwt_legend_item__inherit__graph.png" border="0" usemap="#_qwt_legend_item__inherit__map" alt="Inheritance graph"></center><map name="_qwt_legend_item__inherit__map"><area href="class_qwt_text_label.html" shape="rect" coords="13,8,115,32" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for QwtLegendItem:<p><center><img src="class_qwt_legend_item__coll__graph.png" border="0" usemap="#_qwt_legend_item__coll__map" alt="Collaboration graph"></center><map name="_qwt_legend_item__coll__map"><area href="class_qwt_text_label.html" shape="rect" coords="13,8,115,32" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_qwt_legend_item-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>A legend label. <p><a class="el" href="class_qwt_legend_item.html">QwtLegendItem</a> represents a curve on a legend. It displays an curve identifier with an explaining text. The identifier might be a combination of curve symbol and line. In readonly mode it behaves like a label, otherwise like an unstylish push button.<p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_legend.html">QwtLegend</a>, <a class="el" href="class_qwt_plot_curve.html">QwtPlotCurve</a> </dd></dl><p><p>Definition at line <a class="el" href="qwt__legend__item_8h-source.html#l00035">35</a> of file <a class="el" href="qwt__legend__item_8h-source.html">qwt_legend_item.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_legend_item.html#9f84379e79c1856a6bd4970a719d97bd">IdentifierMode</a> { <br> <b>NoIdentifier</b> = 0, <br> <b>ShowLine</b> = 1, <br> <b>ShowSymbol</b> = 2, <br> <b>ShowText</b> = 4<br> }</td></tr><tr><td colspan="2"><br><h2>Public Slots</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f7a194ea464d2c405479dd8be1bd1e1b"></a><!-- doxytag: member="QwtLegendItem::setChecked" ref="f7a194ea464d2c405479dd8be1bd1e1b" args="(bool on)" -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#f7a194ea464d2c405479dd8be1bd1e1b">setChecked</a> (bool on)</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_legend_item.html#28c4837ec402725c87ecee6de558c956">clicked</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_legend_item.html#7cc6a0390cc0aaea2feb8a324139410c">pressed</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_legend_item.html#7286b8900294659d0850ac588aafaa97">released</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_legend_item.html#95fe5b1ec7fcfaa86fd9ec49a3bf23aa">checked</a> (bool)</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_legend_item.html#46f61a0eaaf24a3a78d498db3fc8c457">QwtLegendItem</a> (QWidget *parent=0)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#e806668ed7ddd57ea4ce88fc6ea960aa">QwtLegendItem</a> (const <a class="el" href="class_qwt_symbol.html">QwtSymbol</a> &, const QPen &, const <a class="el" href="class_qwt_text.html">QwtText</a> &, QWidget *parent=0)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#8c98d47b26d4ad3af98bffc7107f6fc9">~QwtLegendItem</a> ()</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_legend_item.html#8420c4d8cd73945a25697109df5c2f0e">setText</a> (const <a class="el" href="class_qwt_text.html">QwtText</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_legend_item.html#e6487dbe8f2c72512887df8bcb648d53">setItemMode</a> (<a class="el" href="class_qwt_legend.html#b216dd2dba9ebf6cb0ed2dd621a652e0">QwtLegend::LegendItemMode</a>)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_qwt_legend.html#b216dd2dba9ebf6cb0ed2dd621a652e0">QwtLegend::LegendItemMode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#2574e634e54eb7afff34ca24752c3f9b">itemMode</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_legend_item.html#cbd7bb723c868b26bc91cfbc54ade719">setIdentifierMode</a> (int)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#53cd8956bab00b09be587da0bb7ca42b">identifierMode</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_legend_item.html#c435a0541a9c2a5938a879f44a4fc8f5">setIdentfierWidth</a> (int width)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#3326305e42b8904e55bf0c358b69267a">identifierWidth</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_legend_item.html#4ff8a83f130d56bf5932c6a35384d85f">setSpacing</a> (int spacing)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#dc59d1683f3bb11a795098776e76c0bc">spacing</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_legend_item.html#12029c7394b76b7431593630ce6ee386">setSymbol</a> (const <a class="el" href="class_qwt_symbol.html">QwtSymbol</a> &)</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_legend_item.html#18ea9b789197ce0d6eedae02d27f5a55">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_legend_item.html#97803f16937bf1a392b7675fd7c9b503">setCurvePen</a> (const QPen &)</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_legend_item.html#3ca8da18f186d02388b99d9de79f40b5">curvePen</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_legend_item.html#9cd64e5c5c04621e4684c3d75d3eadff">drawIdentifier</a> (QPainter *, const QRect &) 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_legend_item.html#817a72727cfb906e25005962c369126a">drawItem</a> (QPainter *p, const QRect &) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#6248ff72fbbdf1997a590fb0a2d7088f">sizeHint</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="89c9b96ad3dc37f31ec92779a3899d23"></a><!-- doxytag: member="QwtLegendItem::isChecked" ref="89c9b96ad3dc37f31ec92779a3899d23" args="() const " -->bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#89c9b96ad3dc37f31ec92779a3899d23">isChecked</a> () const </td></tr><tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1c871e735a96cc86f95b4dffe2339f85"></a><!-- doxytag: member="QwtLegendItem::setDown" ref="1c871e735a96cc86f95b4dffe2339f85" args="(bool)" -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#1c871e735a96cc86f95b4dffe2339f85">setDown</a> (bool)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d88e70289e552d67f881d0435fae1098"></a><!-- doxytag: member="QwtLegendItem::isDown" ref="d88e70289e552d67f881d0435fae1098" args="() const " -->bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#d88e70289e552d67f881d0435fae1098">isDown</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_legend_item.html#c154aa6b045d78f8134bbfab19a9729b">paintEvent</a> (QPaintEvent *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af54f5473fc174aac5cb5cdcfdcc7292"></a><!-- doxytag: member="QwtLegendItem::mousePressEvent" ref="af54f5473fc174aac5cb5cdcfdcc7292" args="(QMouseEvent *)" -->virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#af54f5473fc174aac5cb5cdcfdcc7292">mousePressEvent</a> (QMouseEvent *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="37950b4dd9de4dfe74c05eee572c16a2"></a><!-- doxytag: member="QwtLegendItem::mouseReleaseEvent" ref="37950b4dd9de4dfe74c05eee572c16a2" args="(QMouseEvent *)" -->virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#37950b4dd9de4dfe74c05eee572c16a2">mouseReleaseEvent</a> (QMouseEvent *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9b6a6527d2b867a912a21ef3358eb63f"></a><!-- doxytag: member="QwtLegendItem::keyPressEvent" ref="9b6a6527d2b867a912a21ef3358eb63f" args="(QKeyEvent *)" -->virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#9b6a6527d2b867a912a21ef3358eb63f">keyPressEvent</a> (QKeyEvent *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0b31f4435914a8cd0491ea8aab45041f"></a><!-- doxytag: member="QwtLegendItem::keyReleaseEvent" ref="0b31f4435914a8cd0491ea8aab45041f" args="(QKeyEvent *)" -->virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend_item.html#0b31f4435914a8cd0491ea8aab45041f">keyReleaseEvent</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_legend_item.html#fa466fbb3689353107872c6e133b5ddf">drawText</a> (QPainter *, const QRect &)</td></tr></table><hr><h2>Member Enumeration Documentation</h2><a class="anchor" name="9f84379e79c1856a6bd4970a719d97bd"></a><!-- doxytag: member="QwtLegendItem::IdentifierMode" ref="9f84379e79c1856a6bd4970a719d97bd" 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_legend_item.html#9f84379e79c1856a6bd4970a719d97bd">QwtLegendItem::IdentifierMode</a> </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Identifier mode. <p>Default is ShowLine | ShowText <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_legend_item.html#53cd8956bab00b09be587da0bb7ca42b">QwtLegendItem::identifierMode</a>, <a class="el" href="class_qwt_legend_item.html#cbd7bb723c868b26bc91cfbc54ade719">QwtLegendItem::setIdentifierMode</a> </dd></dl><p>Definition at line <a class="el" href="qwt__legend__item_8h-source.html#l00047">47</a> of file <a class="el" href="qwt__legend__item_8h-source.html">qwt_legend_item.h</a>. </td> </tr></table><hr><h2>Constructor & Destructor Documentation</h2><a class="anchor" name="46f61a0eaaf24a3a78d498db3fc8c457"></a><!-- doxytag: member="QwtLegendItem::QwtLegendItem" ref="46f61a0eaaf24a3a78d498db3fc8c457" args="(QWidget *parent=0)" --><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">QwtLegendItem::QwtLegendItem </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">QWidget * </td> <td class="mdname1" valign="top" nowrap> <em>parent</em> = <code>0</code> </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><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 </td></tr> </table></dl><p>Definition at line <a class="el" href="qwt__legend__item_8cpp-source.html#l00074">74</a> of file <a class="el" href="qwt__legend__item_8cpp-source.html">qwt_legend_item.cpp</a>. </td> </tr></table><a class="anchor" name="e806668ed7ddd57ea4ce88fc6ea960aa"></a><!-- doxytag: member="QwtLegendItem::QwtLegendItem" ref="e806668ed7ddd57ea4ce88fc6ea960aa" args="(const QwtSymbol &, const QPen &, const QwtText &, QWidget *parent=0)" --><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">QwtLegendItem::QwtLegendItem </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="class_qwt_symbol.html">QwtSymbol</a> & </td> <td class="mdname" nowrap> <em>symbol</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const QPen & </td> <td class="mdname" nowrap> <em>curvePen</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_text.html">QwtText</a> & </td> <td class="mdname" nowrap> <em>text</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>QWidget * </td> <td class="mdname" nowrap> <em>parent</em> = <code>0</code></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [explicit]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><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>symbol</em> </td><td>Curve symbol </td></tr> <tr><td valign="top"></td><td valign="top"><em>curvePen</em> </td><td>Curve pen </td></tr> <tr><td valign="top"></td><td valign="top"><em>text</em> </td><td>Label text </td></tr> <tr><td valign="top"></td><td valign="top"><em>parent</em> </td><td>Parent widget </td></tr> </table></dl><p>Definition at line <a class="el" href="qwt__legend__item_8cpp-source.html#l00087">87</a> of file <a class="el" href="qwt__legend__item_8cpp-source.html">qwt_legend_item.cpp</a>.<p>References <a class="el" href="qwt__legend__item_8cpp-source.html#l00263">symbol()</a>, and <a class="el" href="qwt__text__label_8cpp-source.html#l00107">QwtTextLabel::text()</a>. </td> </tr></table><a class="anchor" name="8c98d47b26d4ad3af98bffc7107f6fc9"></a><!-- doxytag: member="QwtLegendItem::~QwtLegendItem" ref="8c98d47b26d4ad3af98bffc7107f6fc9" 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">QwtLegendItem::~QwtLegendItem </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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -