qwt_plot_scaleitem.h
Go to the documentation of this file.
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 
48 {
49 public:
50  explicit QwtPlotScaleItem(
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;
92 };
93 
94 #endif
virtual void draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const =0
Draw the item.
virtual int rtti() const
#define QWT_EXPORT
Definition: qwt_global.h:38
A class representing a scale division.
Definition: qwt_scale_div.h:36
PrivateData * d_data
A scale map.
Definition: qwt_scale_map.h:30
virtual void updateScaleDiv(const QwtScaleDiv &, const QwtScaleDiv &)
Update the item to changes of the axes scale division.
A class which draws a scale inside the plot canvas.
A class for drawing scales.
Base class for items on the plot canvas.
Definition: qwt_plot_item.h:64
The scale is below.


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:17