qwt_plot_grid.h
Go to the documentation of this file.
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 #ifndef QWT_PLOT_GRID_H
00011 #define QWT_PLOT_GRID_H
00012 
00013 #include "qwt_global.h"
00014 #include "qwt_plot_item.h"
00015 #include "qwt_scale_div.h"
00016 
00017 class QPainter;
00018 class QPen;
00019 class QwtScaleMap;
00020 class QwtScaleDiv;
00021 
00034 class QWT_EXPORT QwtPlotGrid: public QwtPlotItem
00035 {
00036 public:
00037     explicit QwtPlotGrid();
00038     virtual ~QwtPlotGrid();
00039 
00040     virtual int rtti() const;
00041 
00042     void enableX( bool tf );
00043     bool xEnabled() const;
00044 
00045     void enableY( bool tf );
00046     bool yEnabled() const;
00047 
00048     void enableXMin( bool tf );
00049     bool xMinEnabled() const;
00050 
00051     void enableYMin( bool tf );
00052     bool yMinEnabled() const;
00053 
00054     void setXDiv( const QwtScaleDiv &sx );
00055     const QwtScaleDiv &xScaleDiv() const;
00056 
00057     void setYDiv( const QwtScaleDiv &sy );
00058     const QwtScaleDiv &yScaleDiv() const;
00059 
00060     void setPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
00061     void setPen( const QPen & );
00062 
00063     void setMajorPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
00064     void setMajorPen( const QPen & );
00065     const QPen& majorPen() const;
00066 
00067     void setMinorPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
00068     void setMinorPen( const QPen &p );
00069     const QPen& minorPen() const;
00070 
00071     virtual void draw( QPainter *p,
00072         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00073         const QRectF &rect ) const;
00074 
00075     virtual void updateScaleDiv( 
00076         const QwtScaleDiv &xMap, const QwtScaleDiv &yMap );
00077 
00078 private:
00079     void drawLines( QPainter *painter, const QRectF &,
00080         Qt::Orientation orientation, const QwtScaleMap &,
00081         const QList<double> & ) const;
00082 
00083     class PrivateData;
00084     PrivateData *d_data;
00085 };
00086 
00087 #endif


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:56