25 using namespace Qwt3D;
30 return execute(a, b, start, stop, ivals);
36 return autoscaler_p2.execute2(a, b, start, stop, ivals);
47 double interval = mstop_p - mstart_p;
54 if (mstart_p < start_p || mstop_p > stop_p)
57 majors_p.push_back(mstart_p);
60 for (i = 1; i <= majorintervals_p; ++i)
62 double t = double(i) / majorintervals_p;
63 runningval = mstart_p + t * interval;
65 if (runningval > stop_p)
68 if (isPracticallyZero(mstart_p, -t*interval))
71 majors_p.push_back(runningval);
74 majorintervals_p = (int) majors_p.size();
80 if (!majorintervals_p || !minorintervals_p)
89 double step = (majors_p[1] - majors_p[0]) / minorintervals_p;
91 if (isPracticallyZero(step))
94 runningval = mstart_p - step;
96 while (runningval > start_p)
98 minors_p.push_back(runningval);
105 for (i = 0; i != majorintervals_p; ++i)
107 runningval = majors_p[i] + step;
109 for (j = 0; j != minorintervals_p; ++j)
111 minors_p.push_back(runningval);
119 runningval = mstop_p + step;
121 while (runningval < stop_p)
123 minors_p.push_back(runningval);
130 if (idx < majors_p.size())
132 return QString::number(majors_p[idx]);
148 if ((
mpRowsDes->size() - 1) < idx)
return QString(
"");
150 if (
showRow == (
unsigned int) - 1)
153 a = (*mpRowsDes)[idx];
154 return (QString(a.c_str()));
161 a = (*mpRowsDes)[idx];
162 return (QString(a.c_str()));
174 showColumn(showColumn)
181 if ((
mpColumnsDes->size() - 1) < idx)
return QString(
"");
186 a = (*mpColumnsDes)[idx];
187 return (QString(a.c_str()));
194 a = (*mpColumnsDes)[idx];
195 return (QString(a.c_str()));
ColumnScale(const std::vector< std::string > *vos, int showColumn=-1)
int execute2(double &a, double &b, double start, double stop, int ivals)
void calculate()
Creates the major and minor vector for the scale.
virtual QString ticLabel(unsigned int idx) const
The standard (1:1) mapping class for axis numbering.
QString ticLabel(unsigned int idx) const
int autoscale(double &a, double &b, double start, double stop, int ivals)
Applies LinearAutoScaler::execute()
RowScale(const std::vector< std::string > *vos, int showRow=-1)
const std::vector< std::string > * mpRowsDes
const std::vector< std::string > * mpColumnsDes
QString ticLabel(unsigned int idx) const