.Simulation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
DataVisualizerGUI::PlotData Class Reference

Structure for storing data for individual curves. More...

#include <PlotData.h>

Public Member Functions

 PlotData ()
 Constructor.
 
PlotDataoperator= (const PlotData &source)
 Overloads the assignment operator to allow for assigning/overwriting the values of one plot data with that of another.
 
void AddPoint (double x, double y)
 Adds a single new point on both the x and y components. More...
 
void AddX (double x)
 Adds a single new point on the x component. More...
 
void AddY (double y)
 Adds a single new point on the y component. More...
 
double GetXOffset () const
 Returns the assigned offset used to shift/translate all data points along the x-axis. More...
 
double GetYOffset () const
 Returns the assigned offset used to shift/translate all data points along the y-axis. More...
 
void SetXYOffset (double x, double y)
 Assigns offsets for the x and y axis by which all points along those axises will be shifted/translated by. More...
 
void SetXOffset (double val)
 Assigns an offset for the x axis by which all points along the x-axis will be shifted/translated by. More...
 
void SetYOffset (double val)
 Assigns an offset for the y axis by which all points along the y-axis will be shifted/translated by. More...
 
double GetXLower () const
 Returns the lowest value of all points along the x-axis. More...
 
double GetXUpper () const
 Returns the highest value of all points along the x-axis. More...
 
double GetYLower () const
 Returns the lowest value of all points along the y-axis. More...
 
double GetYUpper () const
 Returns the highest value of all points along the y-axis. More...
 
void SetXLower (double val)
 Assigns the lower bound of the x-axis. More...
 
void SetXUpper (double val)
 Assigns the upper bound of the x-axis. More...
 
void SetYLower (double val)
 Assigns the lower bound of the y-axis. More...
 
void SetYUpper (double val)
 Assigns the upper bound of the y-axis. More...
 
bool GetSelected () const
 Returns a flag/boolean indicating whether the plot has been selected by the user using the mouse. More...
 
void SetSelected (bool selected)
 Assigns a flag/boolean indicated whether the plot has been selected by the user using the mouse. More...
 

Public Attributes

QString Name
 The name of the plot/curve. More...
 
QVector< double > X
 X-axis data points. More...
 
QVector< double > Y
 Y-axis data points. More...
 
QColor Color
 The expected color of the plot. More...
 

Protected Attributes

double xOffset_
 Value by which all values on the x-axis will be shifted by. More...
 
double yOffset_
 Value by which all values on the y-axis will be shifted by. More...
 
double xLower_
 The lower bound of the viewport along the x-axis. More...
 
double xUpper_
 The upper bound of the viewport along the x-axis. More...
 
double yLower_
 The lower bound of the viewport along the y-axis. More...
 
double yUpper_
 The upper bound of the viewport along the y-axis. More...
 
bool Selected_
 A flag indicating if the user has selected the plot with the mouse. More...
 

Detailed Description

Structure for storing data for individual curves.

Member Function Documentation

void PlotData::AddPoint ( double  x,
double  y 
)

Adds a single new point on both the x and y components.

The upper and lower ranges for both axis will be tested and a new range will be assigned if the new data exceeds the bounds of the existing data.

Parameters
xis the value of the point along the x-axis.
yis the value of the point along the x-axis.
See Also
DataPlot::AddX, DataPlot::AddY
void PlotData::AddX ( double  x)

Adds a single new point on the x component.

The upper and lower ranges for the x axis will be tested and a new range will be assigned if the new data exceeds the bounds of the existing data.

Parameters
xis the value of the point along the x-axis.
See Also
DataPlot::AddPoint, DataPlot::AddY
void PlotData::AddY ( double  y)

Adds a single new point on the y component.

The upper and lower ranges for the y axis will be tested and a new range will be assigned if the new data exceeds the bounds of the existing data.

Parameters
yis the value of the point along the y-axis.
See Also
DataPlot::AddPoint, DataPlot::AddX
bool PlotData::GetSelected ( ) const
inline

Returns a flag/boolean indicating whether the plot has been selected by the user using the mouse.

See Also
DataPlot::SetSelected
double PlotData::GetXLower ( ) const
inline

Returns the lowest value of all points along the x-axis.

The value returned has the x offset added to it.

See Also
DataPlot::SetXLower
double PlotData::GetXOffset ( ) const
inline

Returns the assigned offset used to shift/translate all data points along the x-axis.

Returns
a double for the value of the offset.
See Also
PlotData::SetXYOffset, PlotData::SetXOffset, PlotData::SetYOffset
double PlotData::GetXUpper ( ) const
inline

Returns the highest value of all points along the x-axis.

The value returned has the x offset added to it.

See Also
DataPlot::SetXUpper
double PlotData::GetYLower ( ) const
inline

Returns the lowest value of all points along the y-axis.

The value returned has the y offset added to it.

See Also
DataPlot::SetYLower
double PlotData::GetYOffset ( ) const
inline

Returns the assigned offset used to shift/translate all data points along the y-axis.

Returns
a double for the value of the offset.
double PlotData::GetYUpper ( ) const
inline

Returns the highest value of all points along the y-axis.

The value returned has the y offset added to it.

See Also
DataPlot::SetYUpper
void PlotData::SetSelected ( bool  selected)
inline

Assigns a flag/boolean indicated whether the plot has been selected by the user using the mouse.

See Also
DataPlot::GetSelected
void PlotData::SetXLower ( double  val)
inline

Assigns the lower bound of the x-axis.

This value is used to determine the leftmost bound of the plot's viewport.

See Also
DataPlot::GetXLower
void PlotData::SetXOffset ( double  val)
inline

Assigns an offset for the x axis by which all points along the x-axis will be shifted/translated by.

Parameters
valis the value that all points on the x-axis will be shifted by.
See Also
PlotData::SetYOffset, PlotData::SetXYOffset
void PlotData::SetXUpper ( double  val)
inline

Assigns the upper bound of the x-axis.

This value is used to determine the rightmost bound of the plot's viewport.

See Also
DataPlot::GetXUpper
void PlotData::SetXYOffset ( double  x,
double  y 
)

Assigns offsets for the x and y axis by which all points along those axises will be shifted/translated by.

Parameters
xis the value that all points on the x-axis will be shifted by.
yis the value that all points on the y-axis will be shifted by.
See Also
PlotData::SetXOffset, PlotData::SetYOffset
void PlotData::SetYLower ( double  val)
inline

Assigns the lower bound of the y-axis.

This value is used to determine the bottommost bound of the plot's viewport.

See Also
DataPlot::GetYLower
void PlotData::SetYOffset ( double  val)
inline

Assigns an offset for the y axis by which all points along the y-axis will be shifted/translated by.

Parameters
valis the value that all points on the y-axis will be shifted by.
See Also
PlotData::SetXYOffset, PlotData::SetXYOffset
void PlotData::SetYUpper ( double  val)
inline

Assigns the upper bound of the y-axis.

This value is used to determine the topmost bound of the plot's viewport.

Member Data Documentation

QColor DataVisualizerGUI::PlotData::Color

The expected color of the plot.

QString DataVisualizerGUI::PlotData::Name

The name of the plot/curve.

bool DataVisualizerGUI::PlotData::Selected_
protected

A flag indicating if the user has selected the plot with the mouse.

QVector<double> DataVisualizerGUI::PlotData::X

X-axis data points.

double DataVisualizerGUI::PlotData::xLower_
protected

The lower bound of the viewport along the x-axis.

double DataVisualizerGUI::PlotData::xOffset_
protected

Value by which all values on the x-axis will be shifted by.

double DataVisualizerGUI::PlotData::xUpper_
protected

The upper bound of the viewport along the x-axis.

QVector<double> DataVisualizerGUI::PlotData::Y

Y-axis data points.

double DataVisualizerGUI::PlotData::yLower_
protected

The lower bound of the viewport along the y-axis.

double DataVisualizerGUI::PlotData::yOffset_
protected

Value by which all values on the y-axis will be shifted by.

double DataVisualizerGUI::PlotData::yUpper_
protected

The upper bound of the viewport along the y-axis.


The documentation for this class was generated from the following files: