321 lines
16 KiB
HTML
321 lines
16 KiB
HTML
<!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"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.11"/>
|
|
<title>Qwt User's Guide: QwtSamplingThread Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(initResizable);
|
|
$(window).load(resizeHeight);
|
|
</script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { init_search(); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Qwt User's Guide
|
|
 <span id="projectnumber">6.1.3</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.11 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){initNavTree('class_qwt_sampling_thread.html','');});
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-slots">Public Slots</a> |
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pro-methods">Protected Member Functions</a> |
|
|
<a href="class_qwt_sampling_thread-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">QwtSamplingThread Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>A thread collecting samples at regular intervals.
|
|
<a href="class_qwt_sampling_thread.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="qwt__sampling__thread_8h_source.html">qwt_sampling_thread.h</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for QwtSamplingThread:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="class_qwt_sampling_thread__inherit__graph.png" border="0" usemap="#_qwt_sampling_thread_inherit__map" alt="Inheritance graph"/></div>
|
|
<map name="_qwt_sampling_thread_inherit__map" id="_qwt_sampling_thread_inherit__map">
|
|
</map>
|
|
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-slots"></a>
|
|
Public Slots</h2></td></tr>
|
|
<tr class="memitem:a36c56404ef0042cf52f1e592edf94f5d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_sampling_thread.html#a36c56404ef0042cf52f1e592edf94f5d">setInterval</a> (double <a class="el" href="class_qwt_sampling_thread.html#a4a2f5038c02c8cad5ebc1fae01480e73">interval</a>)</td></tr>
|
|
<tr class="separator:a36c56404ef0042cf52f1e592edf94f5d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac644ff417342617a39dbd86e50d09132"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_sampling_thread.html#ac644ff417342617a39dbd86e50d09132">stop</a> ()</td></tr>
|
|
<tr class="separator:ac644ff417342617a39dbd86e50d09132"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a7a0b4d5c172f2ded5f6b6483c6ab56e5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7a0b4d5c172f2ded5f6b6483c6ab56e5"></a>
|
|
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_sampling_thread.html#a7a0b4d5c172f2ded5f6b6483c6ab56e5">~QwtSamplingThread</a> ()</td></tr>
|
|
<tr class="memdesc:a7a0b4d5c172f2ded5f6b6483c6ab56e5"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br /></td></tr>
|
|
<tr class="separator:a7a0b4d5c172f2ded5f6b6483c6ab56e5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4a2f5038c02c8cad5ebc1fae01480e73"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_sampling_thread.html#a4a2f5038c02c8cad5ebc1fae01480e73">interval</a> () const </td></tr>
|
|
<tr class="separator:a4a2f5038c02c8cad5ebc1fae01480e73"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a27ebf049b4fc423bdb172d9036eb6683"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_sampling_thread.html#a27ebf049b4fc423bdb172d9036eb6683">elapsed</a> () const </td></tr>
|
|
<tr class="separator:a27ebf049b4fc423bdb172d9036eb6683"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
|
|
Protected Member Functions</h2></td></tr>
|
|
<tr class="memitem:afb02e4696306d5211b4b6470410afbfc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb02e4696306d5211b4b6470410afbfc"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_sampling_thread.html#afb02e4696306d5211b4b6470410afbfc">QwtSamplingThread</a> (QObject *parent=NULL)</td></tr>
|
|
<tr class="memdesc:afb02e4696306d5211b4b6470410afbfc"><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br /></td></tr>
|
|
<tr class="separator:afb02e4696306d5211b4b6470410afbfc"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a247354fcc8e2597e105d87a2cfaa0a96"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_sampling_thread.html#a247354fcc8e2597e105d87a2cfaa0a96">run</a> ()</td></tr>
|
|
<tr class="separator:a247354fcc8e2597e105d87a2cfaa0a96"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a67c4a524736808dc1ba3b81670c0cbd5"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_sampling_thread.html#a67c4a524736808dc1ba3b81670c0cbd5">sample</a> (double <a class="el" href="class_qwt_sampling_thread.html#a27ebf049b4fc423bdb172d9036eb6683">elapsed</a>)=0</td></tr>
|
|
<tr class="separator:a67c4a524736808dc1ba3b81670c0cbd5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>A thread collecting samples at regular intervals. </p>
|
|
<p>Continuous signals are converted into a discrete signal by collecting samples at regular intervals. A discrete signal can be displayed by a <a class="el" href="class_qwt_plot_series_item.html" title="Base class for plot items representing a series of samples. ">QwtPlotSeriesItem</a> on a <a class="el" href="class_qwt_plot.html" title="A 2-D plotting widget. ">QwtPlot</a> widget.</p>
|
|
<p><a class="el" href="class_qwt_sampling_thread.html" title="A thread collecting samples at regular intervals. ">QwtSamplingThread</a> starts a thread calling periodically <a class="el" href="class_qwt_sampling_thread.html#a67c4a524736808dc1ba3b81670c0cbd5">sample()</a>, to collect and store ( or emit ) a single sample.</p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_plot_curve.html" title="A plot item, that represents a series of points. ">QwtPlotCurve</a>, <a class="el" href="class_qwt_plot_series_item.html" title="Base class for plot items representing a series of samples. ">QwtPlotSeriesItem</a> </dd></dl>
|
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
|
<a class="anchor" id="a27ebf049b4fc423bdb172d9036eb6683"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double QwtSamplingThread::elapsed </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>Time (in ms) since the thread was started </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd>QThread::start(), <a class="el" href="class_qwt_sampling_thread.html#a247354fcc8e2597e105d87a2cfaa0a96">run()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4a2f5038c02c8cad5ebc1fae01480e73"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double QwtSamplingThread::interval </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="section return"><dt>Returns</dt><dd>Interval (in ms), between 2 calls of <a class="el" href="class_qwt_sampling_thread.html#a67c4a524736808dc1ba3b81670c0cbd5">sample()</a> </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_sampling_thread.html#a36c56404ef0042cf52f1e592edf94f5d">setInterval()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a247354fcc8e2597e105d87a2cfaa0a96"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void QwtSamplingThread::run </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Loop collecting samples started from QThread::start() </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_sampling_thread.html#ac644ff417342617a39dbd86e50d09132">stop()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a67c4a524736808dc1ba3b81670c0cbd5"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void QwtSamplingThread::sample </td>
|
|
<td>(</td>
|
|
<td class="paramtype">double </td>
|
|
<td class="paramname"><em>elapsed</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Collect a sample</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">elapsed</td><td>Time since the thread was started in milliseconds </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a36c56404ef0042cf52f1e592edf94f5d"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void QwtSamplingThread::setInterval </td>
|
|
<td>(</td>
|
|
<td class="paramtype">double </td>
|
|
<td class="paramname"><em>interval</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">slot</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Change the interval (in ms), when <a class="el" href="class_qwt_sampling_thread.html#a67c4a524736808dc1ba3b81670c0cbd5">sample()</a> is called. The default interval is 1000.0 ( = 1s )</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">interval</td><td>Interval </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_sampling_thread.html#a4a2f5038c02c8cad5ebc1fae01480e73">interval()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac644ff417342617a39dbd86e50d09132"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void QwtSamplingThread::stop </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">slot</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Terminate the collecting thread </p><dl class="section see"><dt>See also</dt><dd>QThread::start(), <a class="el" href="class_qwt_sampling_thread.html#a247354fcc8e2597e105d87a2cfaa0a96">run()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="class_qwt_sampling_thread.html">QwtSamplingThread</a></li>
|
|
<li class="footer">Generated by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|