QwtData Class Reference

Inheritance diagram for QwtData:

Inheritance graph
[legend]
List of all members.

Detailed Description

QwtData defines an interface to any type of curve data.

Classes, derived from QwtData may:

Definition at line 47 of file qwt_data.h.

Public Member Functions

 QwtData ()
virtual ~QwtData ()
virtual QwtDatacopy () const =0
virtual size_t size () const =0
virtual double x (size_t i) const =0
virtual double y (size_t i) const =0
virtual QwtDoubleRect boundingRect () const

Protected Member Functions

QwtDataoperator= (const QwtData &)


Constructor & Destructor Documentation

QwtData::QwtData  ) 
 

Constructor.

Definition at line 14 of file qwt_data.cpp.

QwtData::~QwtData  )  [virtual]
 

Destructor.

Definition at line 19 of file qwt_data.cpp.


Member Function Documentation

QwtDoubleRect QwtData::boundingRect  )  const [virtual]
 

Returns the bounding rectangle of the data. If there is no bounding rect, like for empty data the rectangle is invalid: QwtDoubleRect::isValid() == false

Warning:
This is an slow implementation iterating over all points. It is intended to be overloaded by derived classes. In case of auto scaling boundingRect() is called for every replot, so it might be worth to implement a cache, or use x(0), x(size() - 1) for ordered data ...

Reimplemented in QwtArrayData, and QwtCPointerData.

Definition at line 34 of file qwt_data.cpp.

References size(), x(), and y().

Referenced by QwtPlotCurve::boundingRect().

virtual QwtData* QwtData::copy  )  const [pure virtual]
 

Returns:
Pointer to a copy (virtual copy constructor)

Implemented in QwtPolygonFData, QwtArrayData, and QwtCPointerData.

Referenced by QwtPlotCurve::setData().

QwtData& QwtData::operator= const QwtData  )  [protected]
 

Assignment operator (virtualized)

virtual size_t QwtData::size  )  const [pure virtual]
 

Returns:
Size of the data set

Implemented in QwtPolygonFData, QwtArrayData, and QwtCPointerData.

Referenced by boundingRect(), and QwtPlotCurve::dataSize().

virtual double QwtData::x size_t  i  )  const [pure virtual]
 

Return the x value of data point i

Parameters:
i Index
Returns:
x X value of data point i

Implemented in QwtPolygonFData, QwtArrayData, and QwtCPointerData.

Referenced by boundingRect(), and QwtPlotCurve::x().

virtual double QwtData::y size_t  i  )  const [pure virtual]
 

Return the y value of data point i

Parameters:
i Index
Returns:
y Y value of data point i

Implemented in QwtPolygonFData, QwtArrayData, and QwtCPointerData.

Referenced by boundingRect(), and QwtPlotCurve::y().


Generated on Mon Feb 26 21:23:33 2007 for Qwt User's Guide by  doxygen 1.4.6