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

OmgDataSeries Class Reference
[Library]

#include <omgdataseries.h>

Collaboration diagram for OmgDataSeries:

Collaboration graph
[legend]
List of all members.

Detailed Description

A class for for representing a data series in a graph.

See also:
OmgGraph
Todo:
make this a template class so it can have double / int etc
Author:
Tim Sutton

Definition at line 34 of file omgdataseries.h.

Public Member Functions

 OmgDataSeries ()
virtual ~OmgDataSeries ()
OmgDataSeriesoperator<< (const double &theYValue)
OmgDataSeriesoperator<< (const QPair< double, double > &thePair)
int size () const
double xMin () const
double xMax () const
double yMin () const
double yMax () const
void sortX (Qt::SortOrder theOrder=Qt::DescendingOrder)
void sortY (Qt::SortOrder theOrder=Qt::DescendingOrder)
QList< double > yValuesList () const
void setYValuesList (QList< double > theValues)
 Set the list of Y values in the data series. When using this method, the X values will be autogenerated using range [0,yValuesList.size()-1]. If you wish to use this method without disturbing the X values, use setXYValueLists(QList<double>,QList<double>)
Parameters:
QList<double> theValues - the list of values to assign to the Y axis.

QList< double > xValuesList () const
void setXValuesList (QList< double > theValues)
 Set the list of X values in the data series. When using this method, the X values will be autogenerated using range [0,xValuesList.size()-1]. If you wish to use this method without disturbing the X values, use setXYValueLists(QList<double>,QList<double>)
Parameters:
QList<double> theValues - the list of values to assign to the Y axis.

void setXYValueLists (QList< double > theXValues, QList< double > theYValues)
double xAt (int thePosition)
double yAt (int thePosition)
QString xLabel ()
void setXLabel (QString theLabel)
QString yLabel ()
void setYLabel (QString theLabel)
QString label ()
void setLabel (QString theLabel)
QColor lineColor ()
void setLineColor (QColor theColor)
QColor fillColor ()
void setFillColor (QColor theColor)

Private Attributes

QString mXLabel
QString mYLabel
QString mLabel
QList< double > mYList
QList< double > mXList
QColor mLineColor
QColor mFillColor


Constructor & Destructor Documentation

OmgDataSeries::OmgDataSeries  ) 
 

Constructor .

Definition at line 21 of file omgdataseries.cpp.

References mFillColor, mLineColor, and Omgui::randomColour().

Here is the call graph for this function:

OmgDataSeries::~OmgDataSeries  )  [virtual]
 

Desctructor .

Definition at line 26 of file omgdataseries.cpp.


Member Function Documentation

QColor OmgDataSeries::fillColor  ) 
 

Definition at line 230 of file omgdataseries.cpp.

References mFillColor.

Referenced by OmgGraph::makeLegend(), OmgGraph::render(), OmgExperiment::summaryMapToGraph(), and OmgDataSeriesTest::testBasicFunctions().

QString OmgDataSeries::label  ) 
 

Definition at line 210 of file omgdataseries.cpp.

References mLabel.

Referenced by OmgGraph::calculateLegendHeight(), OmgGraph::makeLegend(), and OmgDataSeriesTest::testBasicFunctions().

QColor OmgDataSeries::lineColor  ) 
 

Definition at line 220 of file omgdataseries.cpp.

References mLineColor.

Referenced by OmgGraph::makeLegend(), OmgGraph::render(), and OmgDataSeriesTest::testBasicFunctions().

OmgDataSeries& OmgDataSeries::operator<< const QPair< double, double > &  thePair  )  [inline]
 

Operator for appending a new value X,Y to the series.

Parameters:
a QPair<double,double> containing the x,y values to be added to the series.

Definition at line 55 of file omgdataseries.h.

OmgDataSeries& OmgDataSeries::operator<< const double &  theYValue  )  [inline]
 

Operator for appending a new value Y to the series, X will be assigned the value of the length of the new Y list after insert

Parameters:
theYValue - the new Y value to be appended to the series

Definition at line 45 of file omgdataseries.h.

void OmgDataSeries::setFillColor QColor  theColor  ) 
 

Definition at line 235 of file omgdataseries.cpp.

References mFillColor.

Referenced by OmgModel::createRocGraph(), OmgGraphTest::initTestCase(), OmgExperiment::summaryMapToGraph(), OmgDataSeriesTest::testBasicFunctions(), and OmgModel::toHtml().

void OmgDataSeries::setLabel QString  theLabel  ) 
 

Definition at line 215 of file omgdataseries.cpp.

References mLabel.

Referenced by OmgModel::getRocPoints(), OmgGraphTest::initTestCase(), OmgExperiment::summaryMapToGraph(), OmgDataSeriesTest::testBasicFunctions(), and OmgModel::toHtml().

void OmgDataSeries::setLineColor QColor  theColor  ) 
 

Definition at line 225 of file omgdataseries.cpp.

References mLineColor.

Referenced by OmgModel::createRocGraph(), OmgGraphTest::initTestCase(), OmgExperiment::summaryMapToGraph(), OmgDataSeriesTest::testBasicFunctions(), and OmgModel::toHtml().

void OmgDataSeries::setXLabel QString  theLabel  ) 
 

Definition at line 195 of file omgdataseries.cpp.

References mXLabel.

void OmgDataSeries::setXValuesList QList< double >  theValues  ) 
 

Set the list of X values in the data series. When using this method, the X values will be autogenerated using range [0,xValuesList.size()-1]. If you wish to use this method without disturbing the X values, use setXYValueLists(QList<double>,QList<double>)

Parameters:
QList<double> theValues - the list of values to assign to the Y axis.

Definition at line 155 of file omgdataseries.cpp.

References mXList, and mYList.

void OmgDataSeries::setXYValueLists QList< double >  theXValues,
QList< double >  theYValues
 

Set the x and y value lists

Parameters:
QList<double> theXValues - the list of values to assign to the Y axis.
QList<double> theYValues - the list of values to assign to the Y axis.

Definition at line 184 of file omgdataseries.cpp.

References mXList, and mYList.

void OmgDataSeries::setYLabel QString  theLabel  ) 
 

Definition at line 205 of file omgdataseries.cpp.

References mYLabel.

void OmgDataSeries::setYValuesList QList< double >  theValues  ) 
 

Set the list of Y values in the data series. When using this method, the X values will be autogenerated using range [0,yValuesList.size()-1]. If you wish to use this method without disturbing the X values, use setXYValueLists(QList<double>,QList<double>)

Parameters:
QList<double> theValues - the list of values to assign to the Y axis.

Definition at line 172 of file omgdataseries.cpp.

References mXList, and mYList.

Referenced by OmgGraphTest::initTestCase(), and OmgExperiment::summaryMapToGraph().

int OmgDataSeries::size  )  const
 

The number of items in the series

Returns:
an integer with the number of data items in the data series.

Definition at line 30 of file omgdataseries.cpp.

References mYList.

Referenced by OmgGraph::render(), and OmgDataSeriesTest::testBasicFunctions().

void OmgDataSeries::sortX Qt::SortOrder  theOrder = Qt::DescendingOrder  ) 
 

Sort the data in the series X value list

Parameters:
Qt::SortOrder (Qt::AscendingOrder or Qt::DescendingOrder) the order in which the data should be sorted. Default is to do a descending sort.
Note:
The X value list will no longer be syncronised with the Y value list after performing the sort!

Definition at line 126 of file omgdataseries.cpp.

References mXList.

void OmgDataSeries::sortY Qt::SortOrder  theOrder = Qt::DescendingOrder  ) 
 

Sort the data in teh series Y value list

Parameters:
Qt::SortOrder (Qt::AscendingOrder or Qt::DescendingOrder) the order in which the data should be sorted. Default is to do a descending sort.
Note:
The Y value list will no longer be syncronised with the X value list after performing the sort!

Definition at line 138 of file omgdataseries.cpp.

References mYList.

Referenced by OmgDataSeriesTest::testBasicFunctions().

double OmgDataSeries::xAt int  thePosition  ) 
 

The value of the x axis at the given position.

Parameters:
thePos - the item no in the x axisy to return.

Definition at line 34 of file omgdataseries.cpp.

References mXList.

Referenced by OmgGraphTest::initTestCase(), OmgGraph::render(), and OmgDataSeriesTest::testBasicFunctions().

QString OmgDataSeries::xLabel  ) 
 

Definition at line 190 of file omgdataseries.cpp.

References mXLabel.

double OmgDataSeries::xMax  )  const
 

Get the maximum value in the data series X axis

Returns:
a double representing the largetst value in the series.

Definition at line 92 of file omgdataseries.cpp.

References mXList.

Referenced by OmgGraph::render(), and OmgDataSeriesTest::testBasicFunctions().

double OmgDataSeries::xMin  )  const
 

Get the minimum value in the data series X axis

Returns:
a double representing the smallest value in the series.

Definition at line 58 of file omgdataseries.cpp.

References mXList.

Referenced by OmgGraph::render(), and OmgDataSeriesTest::testBasicFunctions().

QList< double > OmgDataSeries::xValuesList  )  const
 

Definition at line 150 of file omgdataseries.cpp.

References mXList.

double OmgDataSeries::yAt int  thePosition  ) 
 

The value of the y axis at the given position.

Parameters:
thePos - the item no in the y axis to return.

Definition at line 46 of file omgdataseries.cpp.

References mYList.

Referenced by OmgGraph::render(), and OmgDataSeriesTest::testBasicFunctions().

QString OmgDataSeries::yLabel  ) 
 

Definition at line 200 of file omgdataseries.cpp.

References mYLabel.

double OmgDataSeries::yMax  )  const
 

Get the maximum value in the data series Y axis

Returns:
a double representing the largetst value in the series.

Definition at line 109 of file omgdataseries.cpp.

References mYList.

Referenced by OmgGraph::render(), and OmgDataSeriesTest::testBasicFunctions().

double OmgDataSeries::yMin  )  const
 

Get the minimum value in the data series Y axis

Returns:
a double representing the smallest value in the series.

Definition at line 75 of file omgdataseries.cpp.

References mYList.

Referenced by OmgGraph::render(), and OmgDataSeriesTest::testBasicFunctions().

QList< double > OmgDataSeries::yValuesList  )  const
 

Definition at line 167 of file omgdataseries.cpp.

References mYList.

Referenced by OmgDataSeriesTest::testBasicFunctions().


Member Data Documentation

QColor OmgDataSeries::mFillColor [private]
 

Definition at line 156 of file omgdataseries.h.

Referenced by fillColor(), OmgDataSeries(), and setFillColor().

QString OmgDataSeries::mLabel [private]
 

Definition at line 152 of file omgdataseries.h.

Referenced by label(), and setLabel().

QColor OmgDataSeries::mLineColor [private]
 

Definition at line 155 of file omgdataseries.h.

Referenced by lineColor(), OmgDataSeries(), and setLineColor().

QString OmgDataSeries::mXLabel [private]
 

Definition at line 150 of file omgdataseries.h.

Referenced by setXLabel(), and xLabel().

QList<double> OmgDataSeries::mXList [private]
 

Definition at line 154 of file omgdataseries.h.

Referenced by setXValuesList(), setXYValueLists(), setYValuesList(), sortX(), xAt(), xMax(), xMin(), and xValuesList().

QString OmgDataSeries::mYLabel [private]
 

Definition at line 151 of file omgdataseries.h.

Referenced by setYLabel(), and yLabel().

QList<double> OmgDataSeries::mYList [private]
 

Definition at line 153 of file omgdataseries.h.

Referenced by setXValuesList(), setXYValueLists(), setYValuesList(), size(), sortY(), yAt(), yMax(), yMin(), and yValuesList().


The documentation for this class was generated from the following files:
Generated on Mon Apr 28 15:12:48 2008 for openModellerDesktop by  doxygen 1.4.1-20050210