1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
<!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: qwt_plot_item.cpp Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.8 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<h1>qwt_plot_item.cpp</h1><pre class="fragment"><div>00001 <span class="comment">/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************</span>
00002 <span class="comment"> * Qwt Widget Library</span>
00003 <span class="comment"> * Copyright (C) 1997 Josef Wilgen</span>
00004 <span class="comment"> * Copyright (C) 2002 Uwe Rathmann</span>
00005 <span class="comment"> * </span>
00006 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
00007 <span class="comment"> * modify it under the terms of the Qwt License, Version 1.0</span>
00008 <span class="comment"> *****************************************************************************/</span>
00009
00010 <span class="preprocessor">#include "qwt_plot.h"</span>
00011 <span class="preprocessor">#include "qwt_plot_item.h"</span>
00012
<a name="l00014"></a><a class="code" href="class_qwt_plot_item.html#a0">00014</a> <a class="code" href="class_qwt_plot_item.html#a0">QwtPlotItem::QwtPlotItem</a>(<a class="code" href="class_qwt_plot.html">QwtPlot</a> *parent, <span class="keywordtype">bool</span> nbl)
00015 {
00016 d_parent = parent;
00017 d_enabled = nbl;
00018 }
00019
<a name="l00021"></a><a class="code" href="class_qwt_plot_item.html#a1">00021</a> <a class="code" href="class_qwt_plot_item.html#a1">QwtPlotItem::~QwtPlotItem</a>()
00022 {
00023 }
00024
<a name="l00026"></a><a class="code" href="class_qwt_plot_item.html#a2">00026</a> <span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_item.html#a2">QwtPlotItem::reparent</a>(<a class="code" href="class_qwt_plot.html">QwtPlot</a> *parent)
00027 {
00028 d_parent = parent;
00029 }
00030
<a name="l00035"></a><a class="code" href="class_qwt_plot_item.html#a5">00035</a> <span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_item.html#a5">QwtPlotItem::setEnabled</a>(<span class="keywordtype">bool</span> tf)
00036 {
00037 <span class="keywordflow">if</span> ( tf != d_enabled )
00038 {
00039 d_enabled = tf;
00040 <a class="code" href="class_qwt_plot_item.html#a7">itemChanged</a>();
00041 }
00042 }
00043
<a name="l00048"></a><a class="code" href="class_qwt_plot_item.html#a6">00048</a> <span class="keywordtype">bool</span> <a class="code" href="class_qwt_plot_item.html#a6">QwtPlotItem::enabled</a>() const
00049 {
00050 <span class="keywordflow">return</span> d_enabled;
00051 }
00052
<a name="l00054"></a><a class="code" href="class_qwt_plot_item.html#a7">00054</a> <span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_item.html#a7">QwtPlotItem::itemChanged</a>()
00055 {
00056 <span class="keywordflow">if</span> ( d_parent )
00057 d_parent-><a class="code" href="class_qwt_plot.html#b0">autoRefresh</a>();
00058 }
00059
00061
<a name="l00062"></a><a class="code" href="class_qwt_plot_mapped_item.html#a0">00062</a> <a class="code" href="class_qwt_plot_mapped_item.html#a0">QwtPlotMappedItem::QwtPlotMappedItem</a>(<a class="code" href="class_qwt_plot.html">QwtPlot</a> *parent, <span class="keywordtype">bool</span> nbl):
00063 <a class="code" href="class_qwt_plot_item.html">QwtPlotItem</a>(parent, nbl)
00064 {
00065 d_xAxis = QwtPlot::xBottom;
00066 d_yAxis = QwtPlot::yLeft;
00067 }
00068
<a name="l00070"></a><a class="code" href="class_qwt_plot_mapped_item.html#a1">00070</a> <span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_mapped_item.html#a1">QwtPlotMappedItem::setAxis</a>(<span class="keywordtype">int</span> xAxis, <span class="keywordtype">int</span> yAxis)
00071 {
00072 <span class="keywordflow">if</span> (xAxis == QwtPlot::xBottom || xAxis == QwtPlot::xTop )
00073 d_xAxis = xAxis;
00074
00075 <span class="keywordflow">if</span> (yAxis == QwtPlot::yLeft || yAxis == QwtPlot::yRight )
00076 d_yAxis = yAxis;
00077
00078 <a class="code" href="class_qwt_plot_item.html#a7">itemChanged</a>();
00079 }
00080
<a name="l00082"></a><a class="code" href="class_qwt_plot_mapped_item.html#a2">00082</a> <span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_mapped_item.html#a2">QwtPlotMappedItem::setXAxis</a>(<span class="keywordtype">int</span> axis)
00083 {
00084 <span class="keywordflow">if</span> (axis == QwtPlot::xBottom || axis == QwtPlot::xTop )
00085 {
00086 d_xAxis = axis;
00087 <a class="code" href="class_qwt_plot_item.html#a7">itemChanged</a>();
00088 }
00089 }
00090
<a name="l00092"></a><a class="code" href="class_qwt_plot_mapped_item.html#a4">00092</a> <span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_mapped_item.html#a4">QwtPlotMappedItem::setYAxis</a>(<span class="keywordtype">int</span> axis)
00093 {
00094 <span class="keywordflow">if</span> (axis == QwtPlot::yLeft || axis == QwtPlot::yRight )
00095 {
00096 d_yAxis = axis;
00097 <a class="code" href="class_qwt_plot_item.html#a7">itemChanged</a>();
00098 }
00099 }
00100
<a name="l00102"></a><a class="code" href="class_qwt_plot_mapped_item.html#a3">00102</a> <span class="keywordtype">int</span> <a class="code" href="class_qwt_plot_mapped_item.html#a3">QwtPlotMappedItem::xAxis</a>()<span class="keyword"> const </span>
00103 <span class="keyword"></span>{
00104 <span class="keywordflow">return</span> d_xAxis;
00105 }
00106
<a name="l00108"></a><a class="code" href="class_qwt_plot_mapped_item.html#a5">00108</a> <span class="keywordtype">int</span> <a class="code" href="class_qwt_plot_mapped_item.html#a5">QwtPlotMappedItem::yAxis</a>()<span class="keyword"> const </span>
00109 <span class="keyword"></span>{
00110 <span class="keywordflow">return</span> d_yAxis;
00111 }
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Tue Nov 16 21:12:20 2004 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.3.8 </small></address>
</body>
</html>
|