logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

QwtSeriesData< T > - Abstract interface for iterating over samples.

Author

       Generated automatically by Doxygen for Qwt User's Guide from the source code.

Version 6.1.4                                    Wed Jan 2 2019                            QwtSeriesData<T>(3)

Detailed Description

template<typenameT>
       class QwtSeriesData< T >" Abstract interface for iterating over samples.

       Qwt offers several implementations of the QwtSeriesData API, but in situations, where data of an
       application specific format needs to be displayed, without having to copy it, it is recommended to
       implement an individual data access.

       A subclass of QwtSeriesData<QPointF> must implement:

       • size()
          Should return number of data points.

       • sample()
          Should return values x and y values of the sample at specific position as QPointF object.

       • boundingRect()
          Should  return  the  bounding  rectangle of the data series. It is used for autoscaling and might help
         certain algorithms for displaying the data. You can use qwtBoundingRect()  for  an  implementation  but
         often  it  is  possible to implement a more efficient algorithm depending on the characteristics of the
         series. The member d_boundingRect is intended for caching the calculated rectangle.

Member Function Documentation

template<typenameT>virtualQRectFQwtSeriesData<T>::boundingRect()const[purevirtual]
       Calculate the bounding rect of all samples

       The bounding rect is necessary for autoscaling and can be used for a couple of painting optimizations.

       qwtBoundingRect(...) offers slow implementations iterating  over  the  samples.  For  large  sets  it  is
       recommended to implement something faster f.e. by caching the bounding rectangle.

       Returns:
           Bounding rectangle

       Implemented   in   QwtTradingChartData,  QwtSetSeriesData,  QwtIntervalSeriesData,  QwtPoint3DSeriesData,
       QwtPointSeriesData, QwtSyntheticPointData, QwtCPointerData, and QwtPointArrayData.

   template<typenameT>virtualTQwtSeriesData<T>::sample(size_ti)const[purevirtual]
       Return a sample

       Parameters:i Index

       Returns:
           Sample at position i

       Implemented in QwtArraySeriesData<T>,  QwtArraySeriesData<QwtIntervalSample>,  QwtArraySeriesData<QwtOHLCSample>,  QwtArraySeriesData<QPointF>, QwtArraySeriesData<QwtPoint3D>, QwtArraySeriesData<QwtSetSample>, QwtSyntheticPointData, QwtCPointerData, and QwtPointArrayData.

   template<typenameT>voidQwtSeriesData<T>::setRectOfInterest(constQRectF&rect)[virtual]
       Set a the 'rect of interest'

       QwtPlotSeriesItem  defines  the  current  area  of  the  plot  canvas  as  'rectangle  of   interest'   (
       QwtPlotSeriesItem::updateScaleDiv() ). It can be used to implement different levels of details.

       The default implementation does nothing.

       Parameters:rect Rectangle of interest

       Reimplemented in QwtSyntheticPointData.

   template<typenameT>virtualsize_tQwtSeriesData<T>::size()const[purevirtual]Returns:
           Number of samples

       Implemented  in  QwtArraySeriesData<T>,  QwtArraySeriesData<QwtIntervalSample>, QwtArraySeriesData<QwtOHLCSample>, QwtArraySeriesData<QPointF>,  QwtArraySeriesData<QwtPoint3D>,  QwtArraySeriesData<QwtSetSample>, QwtSyntheticPointData, QwtCPointerData, and QwtPointArrayData.

Name

       QwtSeriesData< T > - Abstract interface for iterating over samples.

Synopsis

       #include <qwt_series_data.h>

       Inherited by QwtArraySeriesData<T>.

   PublicMemberFunctionsQwtSeriesData ()
           Constructor.
       virtual ~QwtSeriesData ()
           Destructor.
       virtual size_t size () const =0
       virtual T sample (size_t i) const =0
       virtual QRectF boundingRect () const =0
       virtual void setRectOfInterest (const QRectF &rect)

   ProtectedAttributes
       QRectF d_boundingRect
           Can be used to cache a calculated bounding rectangle.

return

See Also