<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Qwt User's Guide: qwt_plot_item.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Qwt User's Guide <span id="projectnumber">6.0.1</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <h1>qwt_plot_item.h</h1> </div> </div> <div class="contents"> <div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************</span> <a name="l00002"></a>00002 <span class="comment"> * Qwt Widget Library</span> <a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1997 Josef Wilgen</span> <a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002 Uwe Rathmann</span> <a name="l00005"></a>00005 <span class="comment"> *</span> <a name="l00006"></a>00006 <span class="comment"> * This library is free software; you can redistribute it and/or</span> <a name="l00007"></a>00007 <span class="comment"> * modify it under the terms of the Qwt License, Version 1.0</span> <a name="l00008"></a>00008 <span class="comment"> *****************************************************************************/</span> <a name="l00009"></a>00009 <a name="l00010"></a>00010 <span class="preprocessor">#ifndef QWT_PLOT_ITEM_H</span> <a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define QWT_PLOT_ITEM_H</span> <a name="l00012"></a>00012 <span class="preprocessor"></span> <a name="l00013"></a>00013 <span class="preprocessor">#include "qwt_global.h"</span> <a name="l00014"></a>00014 <span class="preprocessor">#include "qwt_legend_itemmanager.h"</span> <a name="l00015"></a>00015 <span class="preprocessor">#include "qwt_text.h"</span> <a name="l00016"></a>00016 <span class="preprocessor">#include <qrect.h></span> <a name="l00017"></a>00017 <a name="l00018"></a>00018 <span class="keyword">class </span>QString; <a name="l00019"></a>00019 <span class="keyword">class </span>QPainter; <a name="l00020"></a>00020 <span class="keyword">class </span>QWidget; <a name="l00021"></a>00021 <span class="keyword">class </span><a class="code" href="class_qwt_plot.html" title="A 2-D plotting widget.">QwtPlot</a>; <a name="l00022"></a>00022 <span class="keyword">class </span><a class="code" href="class_qwt_legend.html" title="The legend widget.">QwtLegend</a>; <a name="l00023"></a>00023 <span class="keyword">class </span><a class="code" href="class_qwt_scale_map.html" title="A scale map.">QwtScaleMap</a>; <a name="l00024"></a>00024 <span class="keyword">class </span><a class="code" href="class_qwt_scale_div.html" title="A class representing a scale division.">QwtScaleDiv</a>; <a name="l00025"></a>00025 <a name="l00064"></a><a class="code" href="class_qwt_plot_item.html">00064</a> <span class="keyword">class </span>QWT_EXPORT <a class="code" href="class_qwt_plot_item.html" title="Base class for items on the plot canvas.">QwtPlotItem</a>: <span class="keyword">public</span> <a class="code" href="class_qwt_legend_item_manager.html" title="Abstract API to bind plot items to the legend.">QwtLegendItemManager</a> <a name="l00065"></a>00065 { <a name="l00066"></a>00066 <span class="keyword">public</span>: <a name="l00073"></a><a class="code" href="class_qwt_plot_item.html#ab149ac85e233ce9cedf2f2f2af871bf3">00073</a> <span class="keyword">enum</span> <a class="code" href="class_qwt_plot_item.html#ab149ac85e233ce9cedf2f2f2af871bf3" title="Runtime type information.">RttiValues</a> <a name="l00074"></a>00074 { <a name="l00075"></a>00075 Rtti_PlotItem = 0, <a name="l00076"></a>00076 <a name="l00077"></a>00077 Rtti_PlotGrid, <a name="l00078"></a>00078 Rtti_PlotScale, <a name="l00079"></a>00079 Rtti_PlotMarker, <a name="l00080"></a>00080 Rtti_PlotCurve, <a name="l00081"></a>00081 Rtti_PlotSpectroCurve, <a name="l00082"></a>00082 Rtti_PlotIntervalCurve, <a name="l00083"></a>00083 Rtti_PlotHistogram, <a name="l00084"></a>00084 Rtti_PlotSpectrogram, <a name="l00085"></a>00085 Rtti_PlotSVG, <a name="l00086"></a>00086 <a name="l00087"></a>00087 Rtti_PlotUserItem = 1000 <a name="l00088"></a>00088 }; <a name="l00089"></a>00089 <a name="l00094"></a><a class="code" href="class_qwt_plot_item.html#ae0fabcdd35f4818ce5bbe019b0eed062">00094</a> <span class="keyword">enum</span> <a class="code" href="class_qwt_plot_item.html#ae0fabcdd35f4818ce5bbe019b0eed062">ItemAttribute</a> <a name="l00095"></a>00095 { <a name="l00097"></a><a class="code" href="class_qwt_plot_item.html#ae0fabcdd35f4818ce5bbe019b0eed062a4e377b54bd879c60a95162b6a9e9e176">00097</a> Legend = 0x01, <a name="l00098"></a>00098 <a name="l00103"></a><a class="code" href="class_qwt_plot_item.html#ae0fabcdd35f4818ce5bbe019b0eed062a9de83e2ad8a88796a36a11ef8b033a48">00103</a> AutoScale = 0x02 <a name="l00104"></a>00104 }; <a name="l00105"></a>00105 <a name="l00107"></a><a class="code" href="class_qwt_plot_item.html#af356dc13c7838c7437334e199a356764">00107</a> <span class="keyword">typedef</span> QFlags<ItemAttribute> <a class="code" href="class_qwt_plot_item.html#af356dc13c7838c7437334e199a356764" title="Plot Item Attributes.">ItemAttributes</a>; <a name="l00108"></a>00108 <a name="l00110"></a><a class="code" href="class_qwt_plot_item.html#abe0e8a39aceef9a600b73e02550a9704">00110</a> <span class="keyword">enum</span> <a class="code" href="class_qwt_plot_item.html#abe0e8a39aceef9a600b73e02550a9704" title="Render hints.">RenderHint</a> <a name="l00111"></a>00111 { <a name="l00113"></a><a class="code" href="class_qwt_plot_item.html#abe0e8a39aceef9a600b73e02550a9704ae0c9811915d496eaacbd749724647f13">00113</a> RenderAntialiased = 1 <a name="l00114"></a>00114 }; <a name="l00115"></a>00115 <a name="l00117"></a><a class="code" href="class_qwt_plot_item.html#a40cf900701d3a68948b00316689616d1">00117</a> <span class="keyword">typedef</span> QFlags<RenderHint> <a class="code" href="class_qwt_plot_item.html#a40cf900701d3a68948b00316689616d1" title="Render hints.">RenderHints</a>; <a name="l00118"></a>00118 <a name="l00119"></a>00119 <span class="keyword">explicit</span> <a class="code" href="class_qwt_plot_item.html" title="Base class for items on the plot canvas.">QwtPlotItem</a>( <span class="keyword">const</span> <a class="code" href="class_qwt_text.html" title="A class representing a text.">QwtText</a> &title = <a class="code" href="class_qwt_text.html" title="A class representing a text.">QwtText</a>() ); <a name="l00120"></a>00120 <span class="keyword">virtual</span> ~<a class="code" href="class_qwt_plot_item.html" title="Base class for items on the plot canvas.">QwtPlotItem</a>(); <a name="l00121"></a>00121 <a name="l00122"></a>00122 <span class="keywordtype">void</span> attach( <a class="code" href="class_qwt_plot.html" title="A 2-D plotting widget.">QwtPlot</a> *plot ); <a name="l00123"></a>00123 <span class="keywordtype">void</span> detach(); <a name="l00124"></a>00124 <a name="l00125"></a>00125 <a class="code" href="class_qwt_plot.html" title="A 2-D plotting widget.">QwtPlot</a> *plot() <span class="keyword">const</span>; <a name="l00126"></a>00126 <a name="l00127"></a>00127 <span class="keywordtype">void</span> setTitle( <span class="keyword">const</span> QString &title ); <a name="l00128"></a>00128 <span class="keywordtype">void</span> setTitle( <span class="keyword">const</span> <a class="code" href="class_qwt_text.html" title="A class representing a text.">QwtText</a> &title ); <a name="l00129"></a>00129 <span class="keyword">const</span> <a class="code" href="class_qwt_text.html" title="A class representing a text.">QwtText</a> &title() <span class="keyword">const</span>; <a name="l00130"></a>00130 <a name="l00131"></a>00131 <span class="keyword">virtual</span> <span class="keywordtype">int</span> rtti() <span class="keyword">const</span>; <a name="l00132"></a>00132 <a name="l00133"></a>00133 <span class="keywordtype">void</span> setItemAttribute( <a class="code" href="class_qwt_plot_item.html#ae0fabcdd35f4818ce5bbe019b0eed062">ItemAttribute</a>, <span class="keywordtype">bool</span> on = <span class="keyword">true</span> ); <a name="l00134"></a>00134 <span class="keywordtype">bool</span> testItemAttribute( <a class="code" href="class_qwt_plot_item.html#ae0fabcdd35f4818ce5bbe019b0eed062">ItemAttribute</a> ) <span class="keyword">const</span>; <a name="l00135"></a>00135 <a name="l00136"></a>00136 <span class="keywordtype">void</span> setRenderHint( <a class="code" href="class_qwt_plot_item.html#abe0e8a39aceef9a600b73e02550a9704" title="Render hints.">RenderHint</a>, <span class="keywordtype">bool</span> on = <span class="keyword">true</span> ); <a name="l00137"></a>00137 <span class="keywordtype">bool</span> testRenderHint( <a class="code" href="class_qwt_plot_item.html#abe0e8a39aceef9a600b73e02550a9704" title="Render hints.">RenderHint</a> ) <span class="keyword">const</span>; <a name="l00138"></a>00138 <a name="l00139"></a>00139 <span class="keywordtype">double</span> z() <span class="keyword">const</span>; <a name="l00140"></a>00140 <span class="keywordtype">void</span> setZ( <span class="keywordtype">double</span> z ); <a name="l00141"></a>00141 <a name="l00142"></a>00142 <span class="keywordtype">void</span> show(); <a name="l00143"></a>00143 <span class="keywordtype">void</span> hide(); <a name="l00144"></a>00144 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setVisible( <span class="keywordtype">bool</span> ); <a name="l00145"></a>00145 <span class="keywordtype">bool</span> isVisible () <span class="keyword">const</span>; <a name="l00146"></a>00146 <a name="l00147"></a>00147 <span class="keywordtype">void</span> setAxes( <span class="keywordtype">int</span> xAxis, <span class="keywordtype">int</span> yAxis ); <a name="l00148"></a>00148 <a name="l00149"></a>00149 <span class="keywordtype">void</span> setXAxis( <span class="keywordtype">int</span> axis ); <a name="l00150"></a>00150 <span class="keywordtype">int</span> xAxis() <span class="keyword">const</span>; <a name="l00151"></a>00151 <a name="l00152"></a>00152 <span class="keywordtype">void</span> setYAxis( <span class="keywordtype">int</span> axis ); <a name="l00153"></a>00153 <span class="keywordtype">int</span> yAxis() <span class="keyword">const</span>; <a name="l00154"></a>00154 <a name="l00155"></a>00155 <span class="keyword">virtual</span> <span class="keywordtype">void</span> itemChanged(); <a name="l00156"></a>00156 <a name="l00165"></a>00165 <span class="keyword">virtual</span> <span class="keywordtype">void</span> draw( QPainter *painter, <a name="l00166"></a>00166 <span class="keyword">const</span> <a class="code" href="class_qwt_scale_map.html" title="A scale map.">QwtScaleMap</a> &xMap, <span class="keyword">const</span> <a class="code" href="class_qwt_scale_map.html" title="A scale map.">QwtScaleMap</a> &yMap, <a name="l00167"></a>00167 <span class="keyword">const</span> QRectF &canvasRect ) <span class="keyword">const</span> = 0; <a name="l00168"></a>00168 <a name="l00169"></a>00169 <span class="keyword">virtual</span> QRectF boundingRect() <span class="keyword">const</span>; <a name="l00170"></a>00170 <a name="l00171"></a>00171 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_qwt_legend_item_manager.html#ad3bd052ea242ef8595c7d6008b9cc6f4">updateLegend</a>( <a class="code" href="class_qwt_legend.html" title="The legend widget.">QwtLegend</a> * ) <span class="keyword">const</span>; <a name="l00172"></a>00172 <span class="keyword">virtual</span> <span class="keywordtype">void</span> updateScaleDiv( <a name="l00173"></a>00173 <span class="keyword">const</span> <a class="code" href="class_qwt_scale_div.html" title="A class representing a scale division.">QwtScaleDiv</a>&, <span class="keyword">const</span> <a class="code" href="class_qwt_scale_div.html" title="A class representing a scale division.">QwtScaleDiv</a>& ); <a name="l00174"></a>00174 <a name="l00175"></a>00175 <span class="keyword">virtual</span> QWidget *<a class="code" href="class_qwt_legend_item_manager.html#ac019b92797940db3cec2246a080598e0">legendItem</a>() <span class="keyword">const</span>; <a name="l00176"></a>00176 <a name="l00177"></a>00177 QRectF scaleRect( <span class="keyword">const</span> <a class="code" href="class_qwt_scale_map.html" title="A scale map.">QwtScaleMap</a> &, <span class="keyword">const</span> <a class="code" href="class_qwt_scale_map.html" title="A scale map.">QwtScaleMap</a> & ) <span class="keyword">const</span>; <a name="l00178"></a>00178 QRectF paintRect( <span class="keyword">const</span> <a class="code" href="class_qwt_scale_map.html" title="A scale map.">QwtScaleMap</a> &, <span class="keyword">const</span> <a class="code" href="class_qwt_scale_map.html" title="A scale map.">QwtScaleMap</a> & ) <span class="keyword">const</span>; <a name="l00179"></a>00179 <a name="l00180"></a>00180 <span class="keyword">private</span>: <a name="l00181"></a>00181 <span class="comment">// Disabled copy constructor and operator=</span> <a name="l00182"></a>00182 <a class="code" href="class_qwt_plot_item.html" title="Base class for items on the plot canvas.">QwtPlotItem</a>( <span class="keyword">const</span> <a class="code" href="class_qwt_plot_item.html" title="Base class for items on the plot canvas.">QwtPlotItem</a> & ); <a name="l00183"></a>00183 <a class="code" href="class_qwt_plot_item.html" title="Base class for items on the plot canvas.">QwtPlotItem</a> &operator=( <span class="keyword">const</span> <a class="code" href="class_qwt_plot_item.html" title="Base class for items on the plot canvas.">QwtPlotItem</a> & ); <a name="l00184"></a>00184 <a name="l00185"></a>00185 <span class="keyword">class </span>PrivateData; <a name="l00186"></a>00186 PrivateData *d_data; <a name="l00187"></a>00187 }; <a name="l00188"></a>00188 <a name="l00189"></a>00189 Q_DECLARE_OPERATORS_FOR_FLAGS( <a class="code" href="class_qwt_plot_item.html#af356dc13c7838c7437334e199a356764" title="Plot Item Attributes.">QwtPlotItem::ItemAttributes</a> ) <a name="l00190"></a>00190 Q_DECLARE_OPERATORS_FOR_FLAGS( <a class="code" href="class_qwt_plot_item.html" title="Base class for items on the plot canvas.">QwtPlotItem</a>::RenderHints ) <a name="l00191"></a>00191 <a name="l00192"></a>00192 <span class="preprocessor">#endif</span> </pre></div></div> </div> <hr class="footer"/><address class="footer"><small>Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address> </body> </html>