qwt_plot_scaleitem.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_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 {
48  public:
49  explicit QwtPlotScaleItem(
51  const double pos = 0.0 );
52 
53  virtual ~QwtPlotScaleItem();
54 
55  virtual int rtti() const QWT_OVERRIDE;
56 
57  void setScaleDiv( const QwtScaleDiv& );
58  const QwtScaleDiv& scaleDiv() const;
59 
60  void setScaleDivFromAxis( bool on );
61  bool isScaleDivFromAxis() const;
62 
63  void setPalette( const QPalette& );
64  QPalette palette() const;
65 
66  void setFont( const QFont& );
67  QFont font() const;
68 
69  void setScaleDraw( QwtScaleDraw* );
70 
71  const QwtScaleDraw* scaleDraw() const;
72  QwtScaleDraw* scaleDraw();
73 
74  void setPosition( double pos );
75  double position() const;
76 
77  void setBorderDistance( int );
78  int borderDistance() const;
79 
80  void setAlignment( QwtScaleDraw::Alignment );
81 
82  virtual void draw( QPainter*,
83  const QwtScaleMap& xMap, const QwtScaleMap& yMap,
84  const QRectF& canvasRect ) const QWT_OVERRIDE;
85 
86  virtual void updateScaleDiv(
87  const QwtScaleDiv&, const QwtScaleDiv& ) QWT_OVERRIDE;
88 
89  private:
90  class PrivateData;
92 };
93 
94 #endif
QwtScaleDraw
A class for drawing scales.
Definition: qwt_scale_draw.h:35
QwtPlotItem::draw
virtual void draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const =0
Draw the item.
QwtPlotScaleItem
A class which draws a scale inside the plot canvas.
Definition: qwt_plot_scaleitem.h:46
qwt_global.h
qwt_scale_draw.h
QwtPlotItem
Base class for items on the plot canvas.
Definition: qwt_plot_item.h:66
QwtScaleDraw::Alignment
Alignment
Definition: qwt_scale_draw.h:42
QwtPlotScaleItem::PrivateData
Definition: qwt_plot_scaleitem.cpp:19
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:26
QwtScaleDraw::BottomScale
@ BottomScale
The scale is below.
Definition: qwt_scale_draw.h:45
QwtPlotScaleItem::m_data
PrivateData * m_data
Definition: qwt_plot_scaleitem.h:90
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
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


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