9 #include <QtCore/QDebug>
23 d_boundingRect =
QRectF(1.0, 1.0, -2.0, -2.0);
41 const qreal xMin(d_boundingRect.left());
42 const qreal xWidth(d_boundingRect.width());
43 const qreal
x(xMin + i*xWidth/(
size()-1));
51 QRectF rect(d_boundingRect);
67 d_boundingRect.setLeft(xaxis.low);
68 d_boundingRect.setRight(xaxis.up);
73 d_boundingRect.setTop(1e30);
74 d_boundingRect.setBottom(-1e30);
77 for (
size_t i(0); i <
size(); ++i)
83 if (!std::isfinite(x) || !std::isfinite(y))
87 if (d_boundingRect.bottom() <
y)
88 d_boundingRect.setBottom(y);
91 if (y < d_boundingRect.top())
92 d_boundingRect.setTop(y);
bool _xLog
flag to tell whether x scale will be drawn in log
virtual QRectF boundingRect() const
return the bounding rectangle
virtual QPointF sample(size_t i) const
return the x value for data point
std::tr1::shared_ptr< self_type > shared_pointer
a shared pointer of this class
QPointF _logMinPos
the minimum positions in x and y for log scales
an axis of a more than 0 dimensional container
virtual ~OneDViewerData()
destructor
OneDViewerData()
default constructor
void setResult(result_t::shared_pointer result)
set the cass data to be wrapped by this
virtual size_t size() const
return the size of the data
result_t::shared_pointer _result
pointer to the cass data
void setYRangeForLog(bool log)
set up the bounding rect for when y should be log scale
Data::result_t::shared_pointer result()
retrieve pointer to the cass data
void setXRangeForLog(bool log)
set up the bounding rect for when x should be log scale
bool _yLog
flag to tell whether y scale will be drawn in log
contains the wrapper of the data for the 1d viewer