qwt_plot_grid.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_PLOT_GRID_H
11 #define QWT_PLOT_GRID_H
12 
13 #include "qwt_global.h"
14 #include "qwt_plot_item.h"
15 
16 class QPainter;
17 class QPen;
18 class QwtScaleMap;
19 class QwtScaleDiv;
20 
34 {
35  public:
36  explicit QwtPlotGrid();
37  virtual ~QwtPlotGrid();
38 
39  virtual int rtti() const QWT_OVERRIDE;
40 
41  void enableX( bool );
42  bool xEnabled() const;
43 
44  void enableY( bool );
45  bool yEnabled() const;
46 
47  void enableXMin( bool );
48  bool xMinEnabled() const;
49 
50  void enableYMin( bool );
51  bool yMinEnabled() const;
52 
53  void setXDiv( const QwtScaleDiv& );
54  const QwtScaleDiv& xScaleDiv() const;
55 
56  void setYDiv( const QwtScaleDiv& );
57  const QwtScaleDiv& yScaleDiv() const;
58 
59  void setPen( const QColor&,
60  qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
61 
62  void setPen( const QPen& );
63 
64  void setMajorPen( const QColor&,
65  qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
66 
67  void setMajorPen( const QPen& );
68  const QPen& majorPen() const;
69 
70  void setMinorPen( const QColor&, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
71  void setMinorPen( const QPen& );
72  const QPen& minorPen() const;
73 
74  virtual void draw( QPainter*,
75  const QwtScaleMap& xMap, const QwtScaleMap& yMap,
76  const QRectF& canvasRect ) const QWT_OVERRIDE;
77 
78  virtual void updateScaleDiv(
79  const QwtScaleDiv& xScaleDiv, const QwtScaleDiv& yScaleDiv ) QWT_OVERRIDE;
80 
81  private:
82  void drawLines( QPainter*, const QRectF&,
83  Qt::Orientation, const QwtScaleMap&,
84  const QList< double >& ) const;
85 
86  class PrivateData;
88 };
89 
90 #endif
QwtPlotItem::draw
virtual void draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const =0
Draw the item.
QwtPlotGrid
A class which draws a coordinate grid.
Definition: qwt_plot_grid.h:33
qwt_global.h
QList< double >
QwtPlotItem
Base class for items on the plot canvas.
Definition: qwt_plot_item.h:66
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:26
QwtPlotItem::updateScaleDiv
virtual void updateScaleDiv(const QwtScaleDiv &, const QwtScaleDiv &)
Update the item to changes of the axes scale division.
Definition: qwt_plot_item.cpp:665
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition: qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition: qwt_global.h:38
qwt_plot_item.h
QwtPlotGrid::PrivateData
Definition: qwt_plot_grid.cpp:24
QwtScaleDiv
A class representing a scale division.
Definition: qwt_scale_div.h:33
QwtPlotItem::rtti
virtual int rtti() const
Definition: qwt_plot_item.cpp:136
QwtPlotGrid::m_data
PrivateData * m_data
Definition: qwt_plot_grid.h:86


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45