source: ntrip/trunk/BNC/qwt/qwt_plot_grid.h@ 9471

Last change on this file since 9471 was 9383, checked in by stoecker, 4 years ago

update to qwt verion 6.1.1 to fix build with newer Qt5

File size: 2.4 KB
RevLine 
[4271]1/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
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#include "qwt_scale_div.h"
16
17class QPainter;
18class QPen;
19class QwtScaleMap;
20class QwtScaleDiv;
21
22/*!
23 \brief A class which draws a coordinate grid
24
25 The QwtPlotGrid class can be used to draw a coordinate grid.
26 A coordinate grid consists of major and minor vertical
[8127]27 and horizontal grid lines. The locations of the grid lines
[4271]28 are determined by the X and Y scale divisions which can
29 be assigned with setXDiv() and setYDiv().
30 The draw() member draws the grid within a bounding
31 rectangle.
32*/
33
34class QWT_EXPORT QwtPlotGrid: public QwtPlotItem
35{
36public:
37 explicit QwtPlotGrid();
38 virtual ~QwtPlotGrid();
39
40 virtual int rtti() const;
41
[9383]42 void enableX( bool );
[4271]43 bool xEnabled() const;
44
[9383]45 void enableY( bool );
[4271]46 bool yEnabled() const;
47
[9383]48 void enableXMin( bool );
[4271]49 bool xMinEnabled() const;
50
[9383]51 void enableYMin( bool );
[4271]52 bool yMinEnabled() const;
53
[9383]54 void setXDiv( const QwtScaleDiv & );
[4271]55 const QwtScaleDiv &xScaleDiv() const;
56
[9383]57 void setYDiv( const QwtScaleDiv & );
[4271]58 const QwtScaleDiv &yScaleDiv() const;
59
[8127]60 void setPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
61 void setPen( const QPen & );
[4271]62
[8127]63 void setMajorPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
64 void setMajorPen( const QPen & );
65 const QPen& majorPen() const;
[4271]66
[8127]67 void setMinorPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
[9383]68 void setMinorPen( const QPen & );
[8127]69 const QPen& minorPen() const;
[4271]70
[9383]71 virtual void draw( QPainter *,
[4271]72 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
[9383]73 const QRectF &canvasRect ) const;
[4271]74
[9383]75 virtual void updateScaleDiv(
76 const QwtScaleDiv &xScaleDiv, const QwtScaleDiv &yScaleDiv );
[4271]77
78private:
[9383]79 void drawLines( QPainter *, const QRectF &,
80 Qt::Orientation, const QwtScaleMap &,
[4271]81 const QList<double> & ) const;
82
83 class PrivateData;
84 PrivateData *d_data;
85};
86
87#endif
Note: See TracBrowser for help on using the repository browser.