Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

omgdataseries.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           omgguid.h  -  description
00003                              -------------------
00004     begin                : April 2007
00005     copyright            : (C) 2007 by Tim Sutton
00006     email                : tim@linfiniti.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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     // accessors and mutators
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     // data members
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 

Generated on Mon Apr 28 15:08:20 2008 for openModellerDesktop by  doxygen 1.4.1-20050210