<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;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.5.8 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <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 class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> </ul> </div> <h1>qwt_plot_item.h</h1><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 "qwt_double_rect.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>QRect; <a name="l00020"></a>00020 <span class="keyword">class </span>QPainter; <a name="l00021"></a>00021 <span class="keyword">class </span>QWidget; <a name="l00022"></a>00022 <span class="keyword">class </span><a class="code" href="class_qwt_plot.html" title="A 2-D plotting widget.">QwtPlot</a>; <a name="l00023"></a>00023 <span class="keyword">class </span><a class="code" href="class_qwt_legend.html" title="The legend widget.">QwtLegend</a>; <a name="l00024"></a>00024 <span class="keyword">class </span><a class="code" href="class_qwt_scale_map.html" title="A scale map.">QwtScaleMap</a>; <a name="l00025"></a>00025 <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="l00026"></a>00026 <a name="l00065"></a><a class="code" href="class_qwt_plot_item.html">00065</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="l00066"></a>00066 { <a name="l00067"></a>00067 <span class="keyword">public</span>: <a name="l00074"></a><a class="code" href="class_qwt_plot_item.html#b149ac85e233ce9cedf2f2f2af871bf3">00074</a> <span class="keyword">enum</span> <a class="code" href="class_qwt_plot_item.html#b149ac85e233ce9cedf2f2f2af871bf3" title="Runtime type information.">RttiValues</a> <a name="l00075"></a>00075 { <a name="l00076"></a>00076 Rtti_PlotItem = 0, <a name="l00077"></a>00077 <a name="l00078"></a>00078 Rtti_PlotGrid, <a name="l00079"></a>00079 Rtti_PlotScale, <a name="l00080"></a>00080 Rtti_PlotMarker, <a name="l00081"></a>00081 Rtti_PlotCurve, <a name="l00082"></a>00082 Rtti_PlotHistogram, <a name="l00083"></a>00083 Rtti_PlotSpectrogram, <a name="l00084"></a>00084 Rtti_PlotSVG, <a name="l00085"></a>00085 <a name="l00086"></a>00086 Rtti_PlotUserItem = 1000 <a name="l00087"></a>00087 }; <a name="l00088"></a>00088 <a name="l00100"></a><a class="code" href="class_qwt_plot_item.html#e0fabcdd35f4818ce5bbe019b0eed062">00100</a> <span class="keyword">enum</span> <a class="code" href="class_qwt_plot_item.html#e0fabcdd35f4818ce5bbe019b0eed062">ItemAttribute</a> <a name="l00101"></a>00101 { <a name="l00102"></a>00102 Legend = 1, <a name="l00103"></a>00103 AutoScale = 2 <a name="l00104"></a>00104 }; <a name="l00105"></a>00105 <a name="l00106"></a>00106 <span class="preprocessor">#if QT_VERSION >= 0x040000</span> <a name="l00108"></a><a class="code" href="class_qwt_plot_item.html#be0e8a39aceef9a600b73e02550a9704">00108</a> <span class="preprocessor"> enum RenderHint</span> <a name="l00109"></a>00109 <span class="preprocessor"></span> { <a name="l00110"></a>00110 RenderAntialiased = 1 <a name="l00111"></a>00111 }; <a name="l00112"></a>00112 <span class="preprocessor">#endif</span> <a name="l00113"></a>00113 <span class="preprocessor"></span> <a name="l00114"></a>00114 <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="l00115"></a>00115 <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="l00116"></a>00116 <a name="l00117"></a>00117 <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="l00118"></a>00118 <a name="l00126"></a><a class="code" href="class_qwt_plot_item.html#b2bbee6dbe36a5f1d0ce853ac66716a6">00126</a> <span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_item.html#b2bbee6dbe36a5f1d0ce853ac66716a6" title="This method detaches a QwtPlotItem from any QwtPlot it has been associated with.">detach</a>() { attach(NULL); } <a name="l00127"></a>00127 <a name="l00128"></a>00128 <a class="code" href="class_qwt_plot.html" title="A 2-D plotting widget.">QwtPlot</a> *plot() <span class="keyword">const</span>; <a name="l00129"></a>00129 <a name="l00130"></a>00130 <span class="keywordtype">void</span> setTitle(<span class="keyword">const</span> QString &title); <a name="l00131"></a>00131 <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="l00132"></a>00132 <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="l00133"></a>00133 <a name="l00134"></a>00134 <span class="keyword">virtual</span> <span class="keywordtype">int</span> rtti() <span class="keyword">const</span>; <a name="l00135"></a>00135 <a name="l00136"></a>00136 <span class="keywordtype">void</span> setItemAttribute(ItemAttribute, <span class="keywordtype">bool</span> on = <span class="keyword">true</span>); <a name="l00137"></a>00137 <span class="keywordtype">bool</span> testItemAttribute(ItemAttribute) <span class="keyword">const</span>; <a name="l00138"></a>00138 <a name="l00139"></a>00139 <span class="preprocessor">#if QT_VERSION >= 0x040000</span> <a name="l00140"></a>00140 <span class="preprocessor"></span> <span class="keywordtype">void</span> setRenderHint(RenderHint, <span class="keywordtype">bool</span> on = <span class="keyword">true</span>); <a name="l00141"></a>00141 <span class="keywordtype">bool</span> testRenderHint(RenderHint) <span class="keyword">const</span>; <a name="l00142"></a>00142 <span class="preprocessor">#endif</span> <a name="l00143"></a>00143 <span class="preprocessor"></span> <a name="l00144"></a>00144 <span class="keywordtype">double</span> z() <span class="keyword">const</span>; <a name="l00145"></a>00145 <span class="keywordtype">void</span> setZ(<span class="keywordtype">double</span> z); <a name="l00146"></a>00146 <a name="l00147"></a>00147 <span class="keywordtype">void</span> show(); <a name="l00148"></a>00148 <span class="keywordtype">void</span> hide(); <a name="l00149"></a>00149 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setVisible(<span class="keywordtype">bool</span>); <a name="l00150"></a>00150 <span class="keywordtype">bool</span> isVisible () <span class="keyword">const</span>; <a name="l00151"></a>00151 <a name="l00152"></a>00152 <span class="keywordtype">void</span> setAxis(<span class="keywordtype">int</span> xAxis, <span class="keywordtype">int</span> yAxis); <a name="l00153"></a>00153 <a name="l00154"></a>00154 <span class="keywordtype">void</span> setXAxis(<span class="keywordtype">int</span> axis); <a name="l00155"></a>00155 <span class="keywordtype">int</span> xAxis() <span class="keyword">const</span>; <a name="l00156"></a>00156 <a name="l00157"></a>00157 <span class="keywordtype">void</span> setYAxis(<span class="keywordtype">int</span> axis); <a name="l00158"></a>00158 <span class="keywordtype">int</span> yAxis() <span class="keyword">const</span>; <a name="l00159"></a>00159 <a name="l00160"></a>00160 <span class="keyword">virtual</span> <span class="keywordtype">void</span> itemChanged(); <a name="l00161"></a>00161 <a name="l00170"></a>00170 <span class="keyword">virtual</span> <span class="keywordtype">void</span> draw(QPainter *painter, <a name="l00171"></a>00171 <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="l00172"></a>00172 <span class="keyword">const</span> QRect &canvasRect) <span class="keyword">const</span> = 0; <a name="l00173"></a>00173 <a name="l00174"></a>00174 <span class="keyword">virtual</span> QwtDoubleRect boundingRect() <span class="keyword">const</span>; <a name="l00175"></a>00175 <a name="l00176"></a>00176 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_qwt_legend_item_manager.html#d3bd052ea242ef8595c7d6008b9cc6f4">updateLegend</a>(<a class="code" href="class_qwt_legend.html" title="The legend widget.">QwtLegend</a> *) <span class="keyword">const</span>; <a name="l00177"></a>00177 <span class="keyword">virtual</span> <span class="keywordtype">void</span> updateScaleDiv(<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="l00178"></a>00178 <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="l00179"></a>00179 <a name="l00180"></a>00180 <span class="keyword">virtual</span> QWidget *<a class="code" href="class_qwt_legend_item_manager.html#c019b92797940db3cec2246a080598e0">legendItem</a>() <span class="keyword">const</span>; <a name="l00181"></a>00181 <a name="l00182"></a>00182 QwtDoubleRect 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="l00183"></a>00183 QRect 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="l00184"></a>00184 <a name="l00185"></a>00185 QRect transform(<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> &, <a name="l00186"></a>00186 <span class="keyword">const</span> QwtDoubleRect&) <span class="keyword">const</span>; <a name="l00187"></a>00187 QwtDoubleRect invTransform(<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> &, <a name="l00188"></a>00188 <span class="keyword">const</span> QRect&) <span class="keyword">const</span>; <a name="l00189"></a>00189 <a name="l00190"></a>00190 <span class="keyword">private</span>: <a name="l00191"></a>00191 <span class="comment">// Disabled copy constructor and operator=</span> <a name="l00192"></a>00192 <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="l00193"></a>00193 <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="l00194"></a>00194 <a name="l00195"></a>00195 <span class="keyword">class </span>PrivateData; <a name="l00196"></a>00196 PrivateData *d_data; <a name="l00197"></a>00197 }; <a name="l00198"></a>00198 <a name="l00199"></a>00199 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Sun Mar 22 16:41:17 2009 for Qwt User's Guide by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> </body> </html>