class_qwt_legend.html
来自「QWT5.01用于Qt开发的二维图形库程序」· HTML 代码 · 共 816 行 · 第 1/3 页
HTML
816 行
<!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: QwtLegend 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>QwtLegend Class Reference</h1><!-- doxytag: class="QwtLegend" --><a href="class_qwt_legend-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>The legend widget. <p>The <a class="el" href="class_qwt_legend.html">QwtLegend</a> widget is a tabular arrangement of legend items. Legend items might be any type of widget, but in general they will be a <a class="el" href="class_qwt_legend_item.html">QwtLegendItem</a>.<p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_legend_item.html">QwtLegendItem</a>, <a class="el" href="class_qwt_plot.html">QwtPlot</a> </dd></dl><p><p>Definition at line <a class="el" href="qwt__legend_8h-source.html#l00036">36</a> of file <a class="el" href="qwt__legend_8h-source.html">qwt_legend.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.html#898db0483371da91c694c34502f09ecd">LegendDisplayPolicy</a> { <br> <b>NoIdentifier</b> = 0, <br> <b>FixedIdentifier</b> = 1, <br> <b>AutoIdentifier</b> = 2<br> }</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.html#b216dd2dba9ebf6cb0ed2dd621a652e0">LegendItemMode</a> { <br> <b>ReadOnlyItem</b>, <br> <b>ClickableItem</b>, <br> <b>CheckableItem</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_legend.html#df5a64070a546eaac36fc9afac56b7fb">QwtLegend</a> (QWidget *parent=NULL)</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.html#2dd3bc628652909b74e7ddb5db021ea5">~QwtLegend</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.html#37846930eba18ab0d9490a7425ef08d8">setDisplayPolicy</a> (<a class="el" href="class_qwt_legend.html#898db0483371da91c694c34502f09ecd">LegendDisplayPolicy</a> policy, int mode)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_qwt_legend.html#898db0483371da91c694c34502f09ecd">LegendDisplayPolicy</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#a74ccc6083345a1517ffbb86356f7ba0">displayPolicy</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="edd86919e56a407bcdd2ae867a672dd1"></a><!-- doxytag: member="QwtLegend::setItemMode" ref="edd86919e56a407bcdd2ae867a672dd1" args="(LegendItemMode)" -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#edd86919e56a407bcdd2ae867a672dd1">setItemMode</a> (<a class="el" href="class_qwt_legend.html#b216dd2dba9ebf6cb0ed2dd621a652e0">LegendItemMode</a>)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="463c5542c6547c04050c912a5e500155"></a><!-- doxytag: member="QwtLegend::itemMode" ref="463c5542c6547c04050c912a5e500155" args="() const " --><a class="el" href="class_qwt_legend.html#b216dd2dba9ebf6cb0ed2dd621a652e0">LegendItemMode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#463c5542c6547c04050c912a5e500155">itemMode</a> () const </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.html#a0d1126ccd9f65b0926ce7c802f74e6a">identifierMode</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#a52edeceb553ae703516c984f34d7ab7">contentsWidget</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const QWidget * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#cd680c0f17f4184e10a3d3136b9836f5">contentsWidget</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.html#54456bf97e80da5bfb4cca91367b8e15">insert</a> (const <a class="el" href="class_qwt_plot_item.html">QwtPlotItem</a> *, QWidget *)</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.html#330345b54cbe7be630d55ee9ad31b3b4">remove</a> (const <a class="el" href="class_qwt_plot_item.html">QwtPlotItem</a> *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#ae136e8199d5a3caf86a7767c1de186c">find</a> (const <a class="el" href="class_qwt_plot_item.html">QwtPlotItem</a> *) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_qwt_plot_item.html">QwtPlotItem</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#c370a54c9fd76338c5bfc31f0ae07736">find</a> (const QWidget *) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b0eb76b6c4f50257ba0219e57332045e"></a><!-- doxytag: member="QwtLegend::legendItems" ref="b0eb76b6c4f50257ba0219e57332045e" args="() const " -->virtual QList< QWidget * > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#b0eb76b6c4f50257ba0219e57332045e">legendItems</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.html#084177665b32798903176de57d962c6e">clear</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#6ff50cb1e388a7da2a59709eef83be20">isEmpty</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">uint </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#c8d57d90bb41aa2d69c7411a20febdda">itemCount</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="de86e158b8254fe76d42e85f9808c827"></a><!-- doxytag: member="QwtLegend::eventFilter" ref="de86e158b8254fe76d42e85f9808c827" args="(QObject *, QEvent *)" -->virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#de86e158b8254fe76d42e85f9808c827">eventFilter</a> (QObject *, QEvent *)</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.html#2517a7d9d78ab7a3892125ecf755f33f">sizeHint</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#273ec258209c42f57b154ff4da61e1d0">heightForWidth</a> (int w) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="40dab44d47921da18a925e8fcc8d6870"></a><!-- doxytag: member="QwtLegend::horizontalScrollBar" ref="40dab44d47921da18a925e8fcc8d6870" args="() const " -->QScrollBar * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#40dab44d47921da18a925e8fcc8d6870">horizontalScrollBar</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="494758e3d7ab688c59989da52e7e97cf"></a><!-- doxytag: member="QwtLegend::verticalScrollBar" ref="494758e3d7ab688c59989da52e7e97cf" args="() const " -->QScrollBar * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#494758e3d7ab688c59989da52e7e97cf">verticalScrollBar</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">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_legend.html#17c7054748f953e6e315068d7f6b39be">resizeEvent</a> (QResizeEvent *)</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.html#c44118481db62143950a7c74bc2832ab">layoutContents</a> ()</td></tr></table><hr><h2>Member Enumeration Documentation</h2><a class="anchor" name="898db0483371da91c694c34502f09ecd"></a><!-- doxytag: member="QwtLegend::LegendDisplayPolicy" ref="898db0483371da91c694c34502f09ecd" 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.html#898db0483371da91c694c34502f09ecd">QwtLegend::LegendDisplayPolicy</a> </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Display policy. <p><ul><li>NoIdentifier<br> The client code is responsible how to display of each legend item. The Qwt library will not interfere.</li></ul><p><ul><li>FixedIdentifier<br> All legend items are displayed with the <a class="el" href="class_qwt_legend_item.html#9f84379e79c1856a6bd4970a719d97bd">QwtLegendItem::IdentifierMode</a> to be passed in 'mode'.</li></ul><p><ul><li>AutoIdentifier<br> Each legend item is displayed with a mode that is a bitwise or of<ul><li>QwtLegendItem::ShowLine (if its curve is drawn with a line) and</li><li>QwtLegendItem::ShowSymbol (if its curve is drawn with symbols) and</li><li>QwtLegendItem::ShowText (if the has a title).</li></ul></li></ul><p>Default is AutoIdentifier. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_legend.html#37846930eba18ab0d9490a7425ef08d8">setDisplayPolicy()</a>, <a class="el" href="class_qwt_legend.html#a74ccc6083345a1517ffbb86356f7ba0">displayPolicy()</a>, <a class="el" href="class_qwt_legend_item.html#9f84379e79c1856a6bd4970a719d97bd">QwtLegendItem::IdentifierMode</a> </dd></dl><p>Definition at line <a class="el" href="qwt__legend_8h-source.html#l00062">62</a> of file <a class="el" href="qwt__legend_8h-source.html">qwt_legend.h</a>. </td> </tr></table><a class="anchor" name="b216dd2dba9ebf6cb0ed2dd621a652e0"></a><!-- doxytag: member="QwtLegend::LegendItemMode" ref="b216dd2dba9ebf6cb0ed2dd621a652e0" 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.html#b216dd2dba9ebf6cb0ed2dd621a652e0">QwtLegend::LegendItemMode</a> </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Interaction mode for the legend items. <p><p>Definition at line <a class="el" href="qwt__legend_8h-source.html#l00070">70</a> of file <a class="el" href="qwt__legend_8h-source.html">qwt_legend.h</a>. </td> </tr></table><hr><h2>Constructor & Destructor Documentation</h2><a class="anchor" name="df5a64070a546eaac36fc9afac56b7fb"></a><!-- doxytag: member="QwtLegend::QwtLegend" ref="df5a64070a546eaac36fc9afac56b7fb" args="(QWidget *parent=NULL)" --><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">QwtLegend::QwtLegend </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>NULL</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_8cpp-source.html#l00258">258</a> of file <a class="el" href="qwt__legend_8cpp-source.html">qwt_legend.cpp</a>. </td> </tr></table><a class="anchor" name="2dd3bc628652909b74e7ddb5db021ea5"></a><!-- doxytag: member="QwtLegend::~QwtLegend" ref="2dd3bc628652909b74e7ddb5db021ea5" 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">QwtLegend::~QwtLegend </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__legend_8cpp-source.html#l00283">283</a> of file <a class="el" href="qwt__legend_8cpp-source.html">qwt_legend.cpp</a>. </td> </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="084177665b32798903176de57d962c6e"></a><!-- doxytag: member="QwtLegend::clear" ref="084177665b32798903176de57d962c6e" 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">void QwtLegend::clear </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </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>Remove all items. <p>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?