qwt_abstract_scale.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_ABSTRACT_SCALE_H
11 #define QWT_ABSTRACT_SCALE_H
12 
13 #include "qwt_global.h"
14 #include <qwidget.h>
15 
16 class QwtScaleEngine;
18 class QwtScaleDiv;
19 class QwtScaleMap;
20 class QwtInterval;
21 
36 class QWT_EXPORT QwtAbstractScale : public QWidget
37 {
38  Q_OBJECT
39 
40  Q_PROPERTY( double lowerBound READ lowerBound WRITE setLowerBound )
41  Q_PROPERTY( double upperBound READ upperBound WRITE setUpperBound )
42 
43  Q_PROPERTY( int scaleMaxMajor READ scaleMaxMajor WRITE setScaleMaxMajor )
44  Q_PROPERTY( int scaleMaxMinor READ scaleMaxMinor WRITE setScaleMaxMinor )
45 
46  Q_PROPERTY( double scaleStepSize READ scaleStepSize WRITE setScaleStepSize )
47 
48  public:
49  explicit QwtAbstractScale( QWidget* parent = NULL );
50  virtual ~QwtAbstractScale();
51 
52  void setScale( double lowerBound, double upperBound );
53  void setScale( const QwtInterval& );
54  void setScale( const QwtScaleDiv& );
55 
56  const QwtScaleDiv& scaleDiv() const;
57 
58  void setLowerBound( double value );
59  double lowerBound() const;
60 
61  void setUpperBound( double value );
62  double upperBound() const;
63 
64  void setScaleStepSize( double stepSize );
65  double scaleStepSize() const;
66 
67  void setScaleMaxMajor( int ticks );
68  int scaleMaxMinor() const;
69 
70  void setScaleMaxMinor( int ticks );
71  int scaleMaxMajor() const;
72 
73  void setScaleEngine( QwtScaleEngine* );
74  const QwtScaleEngine* scaleEngine() const;
75  QwtScaleEngine* scaleEngine();
76 
77  int transform( double ) const;
78  double invTransform( int ) const;
79 
80  bool isInverted() const;
81 
82  double minimum() const;
83  double maximum() const;
84 
85  const QwtScaleMap& scaleMap() const;
86 
87  protected:
88  virtual void changeEvent( QEvent* ) QWT_OVERRIDE;
89 
90  void rescale( double lowerBound,
91  double upperBound, double stepSize );
92 
93  void setAbstractScaleDraw( QwtAbstractScaleDraw* );
94 
95  const QwtAbstractScaleDraw* abstractScaleDraw() const;
96  QwtAbstractScaleDraw* abstractScaleDraw();
97 
98  void updateScaleDraw();
99  virtual void scaleChange();
100 
101  private:
102  class PrivateData;
103  PrivateData* m_data;
104 };
105 
106 #endif
qwt_global.h
QwtAbstractScale
An abstract base class for widgets having a scale.
Definition: qwt_abstract_scale.h:36
QwtInterval
A class representing an interval.
Definition: qwt_interval.h:22
QwtAbstractScaleDraw
A abstract base class for drawing scales.
Definition: qwt_abstract_scale_draw.h:31
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:26
QwtScaleEngine
Base class for scale engines.
Definition: qwt_scale_engine.h:45
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition: qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition: qwt_global.h:38
QwtScaleDiv
A class representing a scale division.
Definition: qwt_scale_div.h:33
QwtAbstractScale::PrivateData
Definition: qwt_abstract_scale.cpp:19


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