Sophie

Sophie

distrib > Mandriva > cooker > i586 > by-pkgid > 76bdad05b5dca2a491582dbec0713d55 > files > 1035

libqwt-devel-6.0.1-2.i586.rpm

<!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&#39;s Guide: qwt_scale_engine.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&#160;<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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>qwt_scale_engine.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: &quot;stroustrup&quot; -*- *****************************</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_SCALE_ENGINE_H</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define QWT_SCALE_ENGINE_H</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;qwt_global.h&quot;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;qwt_scale_div.h&quot;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;qwt_interval.h&quot;</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="keyword">class </span><a class="code" href="class_qwt_scale_transformation.html" title="A transformation between coordinate systems.">QwtScaleTransformation</a>;
<a name="l00018"></a>00018 
<a name="l00022"></a><a class="code" href="class_qwt_scale_arithmetic.html">00022</a> <span class="keyword">class </span>QWT_EXPORT <a class="code" href="class_qwt_scale_arithmetic.html" title="Arithmetic including a tolerance.">QwtScaleArithmetic</a>
<a name="l00023"></a>00023 {
<a name="l00024"></a>00024 <span class="keyword">public</span>:
<a name="l00025"></a>00025     <span class="keyword">static</span> <span class="keywordtype">double</span> ceilEps( <span class="keywordtype">double</span> value, <span class="keywordtype">double</span> intervalSize );
<a name="l00026"></a>00026     <span class="keyword">static</span> <span class="keywordtype">double</span> floorEps( <span class="keywordtype">double</span> value, <span class="keywordtype">double</span> intervalSize );
<a name="l00027"></a>00027 
<a name="l00028"></a>00028     <span class="keyword">static</span> <span class="keywordtype">double</span> divideEps( <span class="keywordtype">double</span> interval, <span class="keywordtype">double</span> steps );
<a name="l00029"></a>00029 
<a name="l00030"></a>00030     <span class="keyword">static</span> <span class="keywordtype">double</span> ceil125( <span class="keywordtype">double</span> x );
<a name="l00031"></a>00031     <span class="keyword">static</span> <span class="keywordtype">double</span> floor125( <span class="keywordtype">double</span> x );
<a name="l00032"></a>00032 };
<a name="l00033"></a>00033 
<a name="l00047"></a><a class="code" href="class_qwt_scale_engine.html">00047</a> <span class="keyword">class </span>QWT_EXPORT <a class="code" href="class_qwt_scale_engine.html" title="Base class for scale engines.">QwtScaleEngine</a>
<a name="l00048"></a>00048 {
<a name="l00049"></a>00049 <span class="keyword">public</span>:
<a name="l00056"></a><a class="code" href="class_qwt_scale_engine.html#a7548418e0896d75eec164bfa2ba3ff5f">00056</a>     <span class="keyword">enum</span> <a class="code" href="class_qwt_scale_engine.html#a7548418e0896d75eec164bfa2ba3ff5f">Attribute</a>
<a name="l00057"></a>00057     {
<a name="l00059"></a><a class="code" href="class_qwt_scale_engine.html#a7548418e0896d75eec164bfa2ba3ff5fa617f0da0b90080be49b79dbaaab191f8">00059</a>         NoAttribute = 0x00,
<a name="l00060"></a>00060 
<a name="l00062"></a><a class="code" href="class_qwt_scale_engine.html#a7548418e0896d75eec164bfa2ba3ff5fad29dea0ac58c4675ac009620b0857984">00062</a>         IncludeReference = 0x01,
<a name="l00063"></a>00063 
<a name="l00065"></a><a class="code" href="class_qwt_scale_engine.html#a7548418e0896d75eec164bfa2ba3ff5fab3931d404b68708d0c6eaf87ae744fc9">00065</a>         Symmetric = 0x02,
<a name="l00066"></a>00066 
<a name="l00074"></a><a class="code" href="class_qwt_scale_engine.html#a7548418e0896d75eec164bfa2ba3ff5fa2158d4b3596e7d4a00375821fc0d20c3">00074</a>         Floating = 0x04,
<a name="l00075"></a>00075 
<a name="l00077"></a><a class="code" href="class_qwt_scale_engine.html#a7548418e0896d75eec164bfa2ba3ff5fa2f3985208684d394319320b8e67ea062">00077</a>         Inverted = 0x08
<a name="l00078"></a>00078     };
<a name="l00079"></a>00079 
<a name="l00081"></a><a class="code" href="class_qwt_scale_engine.html#a798f5f1420019d33baa799d26bca0255">00081</a>     <span class="keyword">typedef</span> QFlags&lt;Attribute&gt; <a class="code" href="class_qwt_scale_engine.html#a798f5f1420019d33baa799d26bca0255" title="Layout attributes.">Attributes</a>;
<a name="l00082"></a>00082 
<a name="l00083"></a>00083     <span class="keyword">explicit</span> <a class="code" href="class_qwt_scale_engine.html" title="Base class for scale engines.">QwtScaleEngine</a>();
<a name="l00084"></a>00084     <span class="keyword">virtual</span> ~<a class="code" href="class_qwt_scale_engine.html" title="Base class for scale engines.">QwtScaleEngine</a>();
<a name="l00085"></a>00085 
<a name="l00086"></a>00086     <span class="keywordtype">void</span> setAttribute( <a class="code" href="class_qwt_scale_engine.html#a7548418e0896d75eec164bfa2ba3ff5f">Attribute</a>, <span class="keywordtype">bool</span> on = <span class="keyword">true</span> );
<a name="l00087"></a>00087     <span class="keywordtype">bool</span> testAttribute( <a class="code" href="class_qwt_scale_engine.html#a7548418e0896d75eec164bfa2ba3ff5f">Attribute</a> ) <span class="keyword">const</span>;
<a name="l00088"></a>00088 
<a name="l00089"></a>00089     <span class="keywordtype">void</span> setAttributes( <a class="code" href="class_qwt_scale_engine.html#a798f5f1420019d33baa799d26bca0255" title="Layout attributes.">Attributes</a> );
<a name="l00090"></a>00090     <a class="code" href="class_qwt_scale_engine.html#a798f5f1420019d33baa799d26bca0255" title="Layout attributes.">Attributes</a> attributes() <span class="keyword">const</span>;
<a name="l00091"></a>00091 
<a name="l00092"></a>00092     <span class="keywordtype">void</span> setReference( <span class="keywordtype">double</span> reference );
<a name="l00093"></a>00093     <span class="keywordtype">double</span> reference() <span class="keyword">const</span>;
<a name="l00094"></a>00094 
<a name="l00095"></a>00095     <span class="keywordtype">void</span> setMargins( <span class="keywordtype">double</span> lower, <span class="keywordtype">double</span> upper );
<a name="l00096"></a>00096     <span class="keywordtype">double</span> lowerMargin() <span class="keyword">const</span>;
<a name="l00097"></a>00097     <span class="keywordtype">double</span> upperMargin() <span class="keyword">const</span>;
<a name="l00098"></a>00098 
<a name="l00107"></a>00107     <span class="keyword">virtual</span> <span class="keywordtype">void</span> autoScale( <span class="keywordtype">int</span> maxNumSteps,
<a name="l00108"></a>00108         <span class="keywordtype">double</span> &amp;x1, <span class="keywordtype">double</span> &amp;x2, <span class="keywordtype">double</span> &amp;stepSize ) <span class="keyword">const</span> = 0;
<a name="l00109"></a>00109 
<a name="l00120"></a>00120     <span class="keyword">virtual</span> <a class="code" href="class_qwt_scale_div.html" title="A class representing a scale division.">QwtScaleDiv</a> divideScale( <span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> x2,
<a name="l00121"></a>00121         <span class="keywordtype">int</span> maxMajSteps, <span class="keywordtype">int</span> maxMinSteps,
<a name="l00122"></a>00122         <span class="keywordtype">double</span> stepSize = 0.0 ) <span class="keyword">const</span> = 0;
<a name="l00123"></a>00123 
<a name="l00125"></a>00125     <span class="keyword">virtual</span> <a class="code" href="class_qwt_scale_transformation.html" title="A transformation between coordinate systems.">QwtScaleTransformation</a> *transformation() <span class="keyword">const</span> = 0;
<a name="l00126"></a>00126 
<a name="l00127"></a>00127 <span class="keyword">protected</span>:
<a name="l00128"></a>00128     <span class="keywordtype">bool</span> contains( <span class="keyword">const</span> <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a> &amp;, <span class="keywordtype">double</span> val ) <span class="keyword">const</span>;
<a name="l00129"></a>00129     QList&lt;double&gt; strip( <span class="keyword">const</span> QList&lt;double&gt;&amp;, <span class="keyword">const</span> <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a> &amp; ) <span class="keyword">const</span>;
<a name="l00130"></a>00130     <span class="keywordtype">double</span> divideInterval( <span class="keywordtype">double</span> interval, <span class="keywordtype">int</span> numSteps ) <span class="keyword">const</span>;
<a name="l00131"></a>00131 
<a name="l00132"></a>00132     <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a> buildInterval( <span class="keywordtype">double</span> v ) <span class="keyword">const</span>;
<a name="l00133"></a>00133 
<a name="l00134"></a>00134 <span class="keyword">private</span>:
<a name="l00135"></a>00135     <span class="keyword">class </span>PrivateData;
<a name="l00136"></a>00136     PrivateData *d_data;
<a name="l00137"></a>00137 };
<a name="l00138"></a>00138 
<a name="l00146"></a><a class="code" href="class_qwt_linear_scale_engine.html">00146</a> <span class="keyword">class </span>QWT_EXPORT <a class="code" href="class_qwt_linear_scale_engine.html" title="A scale engine for linear scales.">QwtLinearScaleEngine</a>: <span class="keyword">public</span> <a class="code" href="class_qwt_scale_engine.html" title="Base class for scale engines.">QwtScaleEngine</a>
<a name="l00147"></a>00147 {
<a name="l00148"></a>00148 <span class="keyword">public</span>:
<a name="l00149"></a>00149     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_qwt_scale_engine.html#aa27323d6d9d5348bd253a61b45e4785b">autoScale</a>( <span class="keywordtype">int</span> maxSteps,
<a name="l00150"></a>00150         <span class="keywordtype">double</span> &amp;x1, <span class="keywordtype">double</span> &amp;x2, <span class="keywordtype">double</span> &amp;stepSize ) <span class="keyword">const</span>;
<a name="l00151"></a>00151 
<a name="l00152"></a>00152     <span class="keyword">virtual</span> <a class="code" href="class_qwt_scale_div.html" title="A class representing a scale division.">QwtScaleDiv</a> <a class="code" href="class_qwt_scale_engine.html#a833fbdad4cce6e3b6448ee2549dc09e1" title="Calculate a scale division.">divideScale</a>( <span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> x2,
<a name="l00153"></a>00153         <span class="keywordtype">int</span> numMajorSteps, <span class="keywordtype">int</span> numMinorSteps,
<a name="l00154"></a>00154                                      <span class="keywordtype">double</span> stepSize = 0.0 ) <span class="keyword">const</span>;
<a name="l00155"></a>00155 
<a name="l00156"></a>00156     <span class="keyword">virtual</span> <a class="code" href="class_qwt_scale_transformation.html" title="A transformation between coordinate systems.">QwtScaleTransformation</a> *<a class="code" href="class_qwt_scale_engine.html#a04a93d0dc39a3483957764e7749989fd">transformation</a>() <span class="keyword">const</span>;
<a name="l00157"></a>00157 
<a name="l00158"></a>00158 <span class="keyword">protected</span>:
<a name="l00159"></a>00159     <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a> align( <span class="keyword">const</span> <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a>&amp;, <span class="keywordtype">double</span> stepSize ) <span class="keyword">const</span>;
<a name="l00160"></a>00160 
<a name="l00161"></a>00161     <span class="keywordtype">void</span> buildTicks(
<a name="l00162"></a>00162         <span class="keyword">const</span> <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a> &amp;, <span class="keywordtype">double</span> stepSize, <span class="keywordtype">int</span> maxMinSteps,
<a name="l00163"></a>00163         QList&lt;double&gt; ticks[<a class="code" href="class_qwt_scale_div.html#af21aedaa886dd5e067cf63505838736ca86796bbf72d5eb7162a924ba27ce6553" title="Number of valid tick types.">QwtScaleDiv::NTickTypes</a>] ) <span class="keyword">const</span>;
<a name="l00164"></a>00164 
<a name="l00165"></a>00165     QList&lt;double&gt; buildMajorTicks(
<a name="l00166"></a>00166         <span class="keyword">const</span> <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a> &amp;interval, <span class="keywordtype">double</span> stepSize ) <span class="keyword">const</span>;
<a name="l00167"></a>00167 
<a name="l00168"></a>00168     <span class="keywordtype">void</span> buildMinorTicks(
<a name="l00169"></a>00169         <span class="keyword">const</span> QList&lt;double&gt;&amp; majorTicks,
<a name="l00170"></a>00170         <span class="keywordtype">int</span> maxMinMark, <span class="keywordtype">double</span> step,
<a name="l00171"></a>00171         QList&lt;double&gt; &amp;, QList&lt;double&gt; &amp; ) <span class="keyword">const</span>;
<a name="l00172"></a>00172 };
<a name="l00173"></a>00173 
<a name="l00185"></a><a class="code" href="class_qwt_log10_scale_engine.html">00185</a> <span class="keyword">class </span>QWT_EXPORT <a class="code" href="class_qwt_log10_scale_engine.html" title="A scale engine for logarithmic (base 10) scales.">QwtLog10ScaleEngine</a>: <span class="keyword">public</span> <a class="code" href="class_qwt_scale_engine.html" title="Base class for scale engines.">QwtScaleEngine</a>
<a name="l00186"></a>00186 {
<a name="l00187"></a>00187 <span class="keyword">public</span>:
<a name="l00188"></a>00188     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_qwt_scale_engine.html#aa27323d6d9d5348bd253a61b45e4785b">autoScale</a>( <span class="keywordtype">int</span> maxSteps,
<a name="l00189"></a>00189         <span class="keywordtype">double</span> &amp;x1, <span class="keywordtype">double</span> &amp;x2, <span class="keywordtype">double</span> &amp;stepSize ) <span class="keyword">const</span>;
<a name="l00190"></a>00190 
<a name="l00191"></a>00191     <span class="keyword">virtual</span> <a class="code" href="class_qwt_scale_div.html" title="A class representing a scale division.">QwtScaleDiv</a> <a class="code" href="class_qwt_scale_engine.html#a833fbdad4cce6e3b6448ee2549dc09e1" title="Calculate a scale division.">divideScale</a>( <span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> x2,
<a name="l00192"></a>00192         <span class="keywordtype">int</span> numMajorSteps, <span class="keywordtype">int</span> numMinorSteps,
<a name="l00193"></a>00193         <span class="keywordtype">double</span> stepSize = 0.0 ) <span class="keyword">const</span>;
<a name="l00194"></a>00194 
<a name="l00195"></a>00195     <span class="keyword">virtual</span> <a class="code" href="class_qwt_scale_transformation.html" title="A transformation between coordinate systems.">QwtScaleTransformation</a> *<a class="code" href="class_qwt_scale_engine.html#a04a93d0dc39a3483957764e7749989fd">transformation</a>() <span class="keyword">const</span>;
<a name="l00196"></a>00196 
<a name="l00197"></a>00197 <span class="keyword">protected</span>:
<a name="l00198"></a>00198     <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a> log10( <span class="keyword">const</span> <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a>&amp; ) <span class="keyword">const</span>;
<a name="l00199"></a>00199     <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a> pow10( <span class="keyword">const</span> <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a>&amp; ) <span class="keyword">const</span>;
<a name="l00200"></a>00200 
<a name="l00201"></a>00201     <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a> align( <span class="keyword">const</span> <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a>&amp;, <span class="keywordtype">double</span> stepSize ) <span class="keyword">const</span>;
<a name="l00202"></a>00202 
<a name="l00203"></a>00203     <span class="keywordtype">void</span> buildTicks(
<a name="l00204"></a>00204         <span class="keyword">const</span> <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a> &amp;, <span class="keywordtype">double</span> stepSize, <span class="keywordtype">int</span> maxMinSteps,
<a name="l00205"></a>00205         QList&lt;double&gt; ticks[<a class="code" href="class_qwt_scale_div.html#af21aedaa886dd5e067cf63505838736ca86796bbf72d5eb7162a924ba27ce6553" title="Number of valid tick types.">QwtScaleDiv::NTickTypes</a>] ) <span class="keyword">const</span>;
<a name="l00206"></a>00206 
<a name="l00207"></a>00207     QList&lt;double&gt; buildMajorTicks(
<a name="l00208"></a>00208         <span class="keyword">const</span> <a class="code" href="class_qwt_interval.html" title="A class representing an interval.">QwtInterval</a> &amp;interval, <span class="keywordtype">double</span> stepSize ) <span class="keyword">const</span>;
<a name="l00209"></a>00209 
<a name="l00210"></a>00210     QList&lt;double&gt; buildMinorTicks(
<a name="l00211"></a>00211         <span class="keyword">const</span> QList&lt;double&gt;&amp; majorTicks,
<a name="l00212"></a>00212         <span class="keywordtype">int</span> maxMinMark, <span class="keywordtype">double</span> step ) <span class="keyword">const</span>;
<a name="l00213"></a>00213 };
<a name="l00214"></a>00214 
<a name="l00215"></a>00215 Q_DECLARE_OPERATORS_FOR_FLAGS( <a class="code" href="class_qwt_scale_engine.html#a798f5f1420019d33baa799d26bca0255" title="Layout attributes.">QwtScaleEngine::Attributes</a> )
<a name="l00216"></a>00216 
<a name="l00217"></a>00217 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>