/*------------------------------------------------------------------------------ -- This file is a part of the ColorMapChart API -- Copyright (C) 2016, Plasma Physics Laboratory - CNRS -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -------------------------------------------------------------------------------*/ /*-- Author : Hugo Winter -- Mail : hugo.winter@lpp.polytechnique.fr ----------------------------------------------------------------------------*/ #ifndef COLORMAPDATAPART_H #define COLORMAPDATAPART_H #include #include QT_CHARTS_BEGIN_NAMESPACE class QT_CHARTS_EXPORT ColorMapDataPart { public: explicit ColorMapDataPart(); ColorMapDataPart(ColorMapDataPart* dataPart); explicit ColorMapDataPart(QVector *timeSeries, QVector *ySeries, QVector *dataSeries); ~ColorMapDataPart(); inline const QVector& timesSeries(){return *this->m_timeSeries;} inline const QVector& ySeries(){return *this->m_ySeries;} inline const QVector& dataSeries(){return *this->m_dataSeries;} inline void setTimeSeries(QVector *timeSeries){this->m_timeSeries =timeSeries;} inline void setYSeries(QVector *ySeries){this->m_ySeries =ySeries;} inline void setDataSeries(QVector *dataSeries){this->m_dataSeries =dataSeries;} QPair getRange(const QVector &vect, double start, double stop); protected: QVector *m_timeSeries; QVector *m_ySeries; QVector *m_dataSeries; private: int find(double val, const QVector &vect, bool more); }; QT_CHARTS_END_NAMESPACE #endif // COLORMAPDATAPART_H