colormapdatapart.h
55 lines
| 2.4 KiB
| text/x-c
|
CLexer
|
r7 | /*------------------------------------------------------------------------------ | ||
-- 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 | ||||
----------------------------------------------------------------------------*/ | ||||
|
r0 | #ifndef COLORMAPDATAPART_H | ||
#define COLORMAPDATAPART_H | ||||
#include <QtCharts/QChartGlobal> | ||||
#include <QtCore> | ||||
QT_CHARTS_BEGIN_NAMESPACE | ||||
class QT_CHARTS_EXPORT ColorMapDataPart | ||||
{ | ||||
public: | ||||
explicit ColorMapDataPart(); | ||||
ColorMapDataPart(ColorMapDataPart* dataPart); | ||||
explicit ColorMapDataPart(QVector<double> *timeSeries, QVector<double> *ySeries, QVector<double> *dataSeries); | ||||
~ColorMapDataPart(); | ||||
inline const QVector<double>& timesSeries(){return *this->m_timeSeries;} | ||||
inline const QVector<double>& ySeries(){return *this->m_ySeries;} | ||||
inline const QVector<double>& dataSeries(){return *this->m_dataSeries;} | ||||
inline void setTimeSeries(QVector<double> *timeSeries){this->m_timeSeries =timeSeries;} | ||||
inline void setYSeries(QVector<double> *ySeries){this->m_ySeries =ySeries;} | ||||
inline void setDataSeries(QVector<double> *dataSeries){this->m_dataSeries =dataSeries;} | ||||
QPair<int,int> getRange(const QVector<double> &vect, double start, double stop); | ||||
protected: | ||||
QVector<double> *m_timeSeries; | ||||
QVector<double> *m_ySeries; | ||||
QVector<double> *m_dataSeries; | ||||
private: | ||||
int find(double val, const QVector<double> &vect, bool more); | ||||
}; | ||||
QT_CHARTS_END_NAMESPACE | ||||
#endif // COLORMAPDATAPART_H | ||||