00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef OMGDATASERIES_H
00019 #define OMGDATASERIES_H
00020
00021 #include <QString>
00022 #include <QPainter>
00023 #include <QLinearGradient>
00024 #include <QList>
00025 #include <QColor>
00026 #include <QPair>
00034 class OMG_LIB_EXPORT OmgDataSeries
00035 {
00036 public:
00038 OmgDataSeries();
00040 virtual ~OmgDataSeries();
00045 inline OmgDataSeries &operator<<( const double &theYValue )
00046 {
00047 mYList << theYValue;
00048 mXList << mYList.size()-1;
00049 return *this;
00050 };
00055 inline OmgDataSeries &operator<<( const QPair<double,double> &thePair )
00056 {
00057 mXList << thePair.first;
00058 mYList << thePair.second;
00059 return *this;
00060 };
00065 int size() const;
00069 double xMin() const;
00073 double xMax() const;
00077 double yMin() const;
00081 double yMax() const;
00089 void sortX(Qt::SortOrder theOrder=Qt::DescendingOrder);
00097 void sortY(Qt::SortOrder theOrder=Qt::DescendingOrder);
00098
00099
00100 QList<double> yValuesList() const;
00109 void setYValuesList(QList<double> theValues);
00110 QList<double> xValuesList() const;
00119 void setXValuesList(QList<double> theValues);
00126 void setXYValueLists(QList<double> theXValues,QList<double> theYValues);
00130 double xAt(int thePosition);
00134 double yAt(int thePosition);
00135 QString xLabel();
00136 void setXLabel(QString theLabel);
00137 QString yLabel();
00138 void setYLabel(QString theLabel);
00139 QString label();
00140 void setLabel(QString theLabel);
00141 QColor lineColor();
00142 void setLineColor(QColor theColor);
00143 QColor fillColor();
00144 void setFillColor(QColor theColor);
00145 private:
00146
00147
00148
00149
00150 QString mXLabel;
00151 QString mYLabel;
00152 QString mLabel;
00153 QList <double> mYList;
00154 QList <double> mXList;
00155 QColor mLineColor;
00156 QColor mFillColor;
00157 };
00158
00159 #endif //OMGDATASERIES_H
00160