Qwt User's Guide 6.1.2

- Main Page
- Related Pages
- Classes

All Classes Functions Variables Typedefs Enumerations Enumerator Pages
qwt_plot_scaleitem.h
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_SCALE_ITEM_H
11 #define QWT_PLOT_SCALE_ITEM_H
12
13 #include "qwt_global.h"
14 #include "qwt_plot_item.h"
15 #include "qwt_scale_draw.h"
16
17 class QPalette;
18
47 class QWT_EXPORT QwtPlotScaleItem: public QwtPlotItem
48 {
49 public:
50 explicit QwtPlotScaleItem(
51 QwtScaleDraw::Alignment = QwtScaleDraw::BottomScale,
52 const double pos = 0.0 );
53
54 virtual ~QwtPlotScaleItem();
55
56 virtual int rtti() const;
57
58 void setScaleDiv( const QwtScaleDiv& );
59 const QwtScaleDiv& scaleDiv() const;
60
61 void setScaleDivFromAxis( bool on );
62 bool isScaleDivFromAxis() const;
63
64 void setPalette( const QPalette & );
65 QPalette palette() const;
66
67 void setFont( const QFont& );
68 QFont font() const;
69
70 void setScaleDraw( QwtScaleDraw * );
71
72 const QwtScaleDraw *scaleDraw() const;
73 QwtScaleDraw *scaleDraw();
74
75 void setPosition( double pos );
76 double position() const;
77
78 void setBorderDistance( int numPixels );
79 int borderDistance() const;
80
81 void setAlignment( QwtScaleDraw::Alignment );
82
83 virtual void draw( QPainter *p,
84 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
85 const QRectF &rect ) const;
86
87 virtual void updateScaleDiv( const QwtScaleDiv &, const QwtScaleDiv & );
88
89 private:
90 class PrivateData;
91 PrivateData *d_data;
92 };
93
94 #endif
QwtScaleDraw::Alignment
Alignment
Definition: qwt_scale_draw.h:38
QwtScaleDraw
A class for drawing scales.
Definition: qwt_scale_draw.h:31
QwtPlotItem::draw
virtual void draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const =0
Draw the item.
QwtPlotItem
Base class for items on the plot canvas.
Definition: qwt_plot_item.h:64
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:30
QwtPlotScaleItem
A class which draws a scale inside the plot canvas.
Definition: qwt_plot_scaleitem.h:47
QwtPlotItem::rtti
virtual int rtti() const
Definition: qwt_plot_item.cpp:120
QwtScaleDraw::BottomScale
The scale is below.
Definition: qwt_scale_draw.h:41
QwtScaleDiv
A class representing a scale division.
Definition: qwt_scale_div.h:36
QwtPlotItem::updateScaleDiv
virtual void updateScaleDiv(const QwtScaleDiv &, const QwtScaleDiv &)
Update the item to changes of the axes scale division.
Definition: qwt_plot_item.cpp:636