QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
qwt3d_autoscaler.h
1#ifndef QWT3D_AUTOSCALER_H
2#define QWT3D_AUTOSCALER_H
3
4#include <vector>
5#include "qwt3d_global.h"
6#include "qwt3d_autoptr.h"
7
8
9
13class QWT3D_EXPORT Qwt3DAutoScaler
14{
15 friend class Qwt3DClonePtr< Qwt3DAutoScaler >;
16
17protected:
18 virtual Qwt3DAutoScaler* clone() const = 0;
19 virtual int execute(double& a, double& b, double start, double stop, int ivals) = 0;
20 virtual ~Qwt3DAutoScaler()
21 {
22 }
23
24private:
25 void destroy() const
26 {
27 delete this;
28 }
29};
30
34class QWT3D_EXPORT Qwt3DLinearAutoScaler : public Qwt3DAutoScaler
35{
36 friend class Qwt3DLinearScale;
37
38protected:
39 QWT_DECLARE_PRIVATE(Qwt3DLinearAutoScaler)
40
42 explicit Qwt3DLinearAutoScaler(std::vector< double >& mantisses);
43 ~Qwt3DLinearAutoScaler() override;
44 Qwt3DAutoScaler* clone() const override;
45 int execute(double& a, double& b, double start, double stop, int ivals) override;
46
47 // Copies state from another Qwt3DLinearAutoScaler (used by Qwt3DLinearScale::clone)
48 void copyStateFrom(const Qwt3DLinearAutoScaler& other);
49
50private:
51 void init(double start, double stop, int ivals);
52 double anchorvalue(double start, double mantisse, int exponent);
53 int segments(int& l_intervals, int& r_intervals, double start, double stop, double anchor, double mantissa, int exponent);
54};
55
56
57#endif
Abstract base class for autoscaler.
Definition qwt3d_autoscaler.h:14
Simple auto pointer providing deep copies for raw pointer.
Definition qwt3d_autoptr.h:18
Automatic beautifying of linear scales.
Definition qwt3d_autoscaler.h:35
The standard (1:1) mapping class for axis numbering.
Definition qwt3d_scale.h:66