Qwt User's Guide: qwt_plot_grid.h Source File

- Main Page
- Classes
- Files
- Related Pages

- File List
- File Members

# qwt_plot_grid.h

    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 QPen &p);
    00061
    00062     void setMajPen(const QPen &p);
    00063     const QPen& majPen() const;
    00064
    00065     void setMinPen(const QPen &p);
    00066     const QPen& minPen() const;
    00067
    00068     virtual void draw(QPainter *p,
    00069         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    00070         const QRect &rect) const;
    00071
    00072     virtual void updateScaleDiv(const QwtScaleDiv &xMap,
    00073         const QwtScaleDiv &yMap);
    00074
    00075 private:
    00076     void drawLines(QPainter *painter, const QRect &,
    00077         Qt::Orientation orientation, const QwtScaleMap &,
    00078         const QwtValueList &) const;
    00079
    00080     class PrivateData;
    00081     PrivateData *d_data;
    00082 };
    00083
    00084 #endif