COPASI API  4.16.103
qwt3dScale.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 // Copyright (C) 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 #ifndef SCALE_H
16 #define SCALE_H
17 
18 #include <QtCore/QString>
19 
20 #include <qwt3d_scale.h>
21 #include <qwt3d_types.h>
22 #include <qwt3d_autoptr.h>
23 #include <qwt3d_axis.h>
24 
25 //! Automatic beautifying of linear scales
26 class LinearAutoScaler2 : public Qwt3D::LinearAutoScaler
27 {
28 public:
29  int execute2(double& a, double& b, double start, double stop, int ivals);
30 };
31 
32 //! The standard (1:1) mapping class for axis numbering
33 class ValueScale : public Qwt3D::Scale
34 {
35  friend class Qwt3D::Axis;
36  friend class Qwt3D::qwt3d_ptr<Qwt3D::Scale>;
37 protected:
38  int autoscale(double& a, double& b, double start, double stop, int ivals);
39  //! Returns a new heap based object utilized from qwt3d_ptr
40  Qwt3D::Scale* clone() const {return new ValueScale(*this);}
41  void calculate();
43 public:
44  QString ticLabel(unsigned int idx) const;
45 };
46 
47 class ColumnScale : public ValueScale
48 {
49  friend class Qwt3D::Axis;
50  friend class Qwt3D::qwt3d_ptr<Scale>;
51 protected:
52  Qwt3D::Scale* clone() const {return new ColumnScale(*this);}
53 public:
54  ColumnScale(const std::vector<std::string> * vos, int showColumn = -1);
55  virtual QString ticLabel(unsigned int idx) const;
56  const std::vector<std::string> *mpColumnsDes;
57  unsigned int showColumn;
58 };
59 
60 class RowScale : public ValueScale
61 {
62  friend class Qwt3D::Axis;
63  friend class Qwt3D::qwt3d_ptr<Scale>;
64 protected:
65  Qwt3D::Scale* clone() const {return new RowScale(*this);}
66 public:
67  RowScale(const std::vector<std::string> * vos, int showRow = -1);
68  QString ticLabel(unsigned int idx) const;
69  const std::vector<std::string> *mpRowsDes;
70  unsigned int showRow;
71 };
72 #endif // SCALE_H
ColumnScale(const std::vector< std::string > *vos, int showColumn=-1)
Definition: qwt3dScale.cpp:171
int execute2(double &a, double &b, double start, double stop, int ivals)
Definition: qwt3dScale.cpp:27
unsigned int showColumn
Definition: qwt3dScale.h:57
void calculate()
Creates the major and minor vector for the scale.
Definition: qwt3dScale.cpp:40
Qwt3D::Scale * clone() const
Definition: qwt3dScale.h:52
Qwt3D::Scale * clone() const
Returns a new heap based object utilized from qwt3d_ptr.
Definition: qwt3dScale.h:40
virtual QString ticLabel(unsigned int idx) const
Definition: qwt3dScale.cpp:177
The standard (1:1) mapping class for axis numbering.
Definition: qwt3dScale.h:33
QString ticLabel(unsigned int idx) const
Definition: qwt3dScale.cpp:144
int autoscale(double &a, double &b, double start, double stop, int ivals)
Applies LinearAutoScaler::execute()
Definition: qwt3dScale.cpp:34
friend class Qwt3D::Axis
Definition: qwt3dScale.h:62
RowScale(const std::vector< std::string > *vos, int showRow=-1)
Definition: qwt3dScale.cpp:138
const std::vector< std::string > * mpRowsDes
Definition: qwt3dScale.h:69
const std::vector< std::string > * mpColumnsDes
Definition: qwt3dScale.h:56
unsigned int showRow
Definition: qwt3dScale.h:70
QString ticLabel(unsigned int idx) const
Definition: qwt3dScale.cpp:128
Qwt3D::Scale * clone() const
Definition: qwt3dScale.h:65
Automatic beautifying of linear scales.
Definition: qwt3dScale.h:26
LinearAutoScaler2 autoscaler_p2
Definition: qwt3dScale.h:42
friend class Qwt3D::Axis
Definition: qwt3dScale.h:49
friend class Qwt3D::Axis
Definition: qwt3dScale.h:35