Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

qwt_plot_grid.cpp

00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  * 
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 // vim: expandtab
00011 
00012 #include "qwt_plot.h"
00013 #include "qwt_math.h"
00014 
00016 QwtPlotGrid &QwtPlot::grid()
00017 {
00018     return *d_grid;
00019 }
00020 
00022 const QwtPlotGrid &QwtPlot::grid() const
00023 {
00024     return *d_grid;
00025 }
00026 
00032 void QwtPlot::enableGridX(bool tf)
00033 {
00034     d_grid->enableX(tf);
00035 }
00036 
00042 void QwtPlot::enableGridY(bool tf)
00043 {
00044     d_grid->enableY(tf);
00045 }
00046 
00051 void QwtPlot::enableGridXMin(bool tf)
00052 {
00053     d_grid->enableXMin(tf);
00054 }
00055 
00060 void QwtPlot::enableGridYMin(bool tf)
00061 {
00062     d_grid->enableYMin(tf);
00063 }
00064 
00068 bool QwtPlot::gridXEnabled() const
00069 {
00070     return d_grid->xEnabled();
00071 }
00072 
00076 bool QwtPlot::gridXMinEnabled() const
00077 {
00078     return d_grid->xMinEnabled();
00079 }
00080 
00084 bool QwtPlot::gridYEnabled() const
00085 {
00086     return d_grid->yEnabled();
00087 }
00088 
00092 bool QwtPlot::gridYMinEnabled() const
00093 {
00094     return d_grid->yMinEnabled();
00095 }
00096 
00101 void QwtPlot::setGridXAxis(int axis)
00102 {
00103     if ((axis==xBottom)||(axis==xTop))
00104     {
00105         d_grid->setXAxis(axis);
00106         d_grid->setXDiv(d_as[axis].scaleDiv());
00107     }
00108 }
00109 
00114 int QwtPlot::gridXAxis() const
00115 {
00116     return d_grid->xAxis();
00117 }
00118 
00123 void QwtPlot::setGridYAxis(int axis)
00124 {
00125     if ((axis==yLeft) || (axis == yRight))
00126     {
00127         d_grid->setYAxis(axis);
00128         d_grid->setYDiv(d_as[axis].scaleDiv());
00129     }
00130 }
00131 
00136 int QwtPlot::gridYAxis() const
00137 {
00138     return d_grid->yAxis();
00139 }
00140 
00145 void QwtPlot::setGridPen(const QPen &p)
00146 {
00147     d_grid->setPen(p);
00148 }
00149 
00154 void QwtPlot::setGridMinPen(const QPen &p)
00155 {
00156     d_grid->setMinPen(p);
00157 }
00158 
00163 const QPen& QwtPlot::gridMinPen() const
00164 {
00165     return d_grid->minPen();
00166 }
00167 
00172 void QwtPlot::setGridMajPen(const QPen &p)
00173 {
00174     d_grid->setMajPen(p);
00175 }
00176 
00181 const QPen& QwtPlot::gridMajPen() const
00182 {
00183     return d_grid->majPen();
00184 }
00185 
00186 // Local Variables:
00187 // mode: C++
00188 // c-file-style: "stroustrup"
00189 // indent-tabs-mode: nil
00190 // End:

Generated on Sun Nov 21 11:12:43 2004 for Qwt User's Guide by doxygen 1.3.5