te::qt::widgets::Scatter Class Reference

A class to represent a scatter. More...

#include <Scatter.h>

Public Member Functions

void addData (double &xValue, double &yValue, te::da::ObjectId *oid)
 It adds the x and Y axis values to the scatter's vectors and the associeted objectId to the scatter's multi_index container. More...
 
void addX (double &xValue)
 It adds a new value to the vector containing the X axis values. More...
 
void addY (double &yValue)
 It adds a new value to the vector containing the Y axis values. More...
 
void calculateMinMaxValues ()
 Calculates the minimum and maximum values for both the X and Y axis. More...
 
te::da::ObjectIdSetfind (double &xValue, double &yValue)
 It returns a pointer to an ObjectIdSet that contains all of the scatter's selected points. More...
 
te::da::ObjectIdSetfind (std::vector< QPointF > selectedPoints)
 It returns a pointer to an ObjectIdSet that contains all of the scatter's selected points. More...
 
const std::pair< double, double > find (const te::da::ObjectId *oid)
 It returns a pair representing the point that contais the secected ObjectId. More...
 
double getMaxX ()
 It returns the maximum value of the X axis. More...
 
double getMaxY ()
 It returns the maximum value of the Y axis. More...
 
double getMinX ()
 It returns the minimum value of the X axis. More...
 
double getMinY ()
 It returns the minimum value of the Y axis. More...
 
double getX (unsigned int idx)
 It returns the idx-th value of the scatter X axis, as a double. More...
 
double * getX ()
 It returns a pointer to the first value of the scatter X axis. More...
 
std::vector< double > getXValues ()
 It returns the vector containing the values of the scatter X axis. More...
 
double getY (unsigned int idx)
 It returns the idx-th value of the scatter Y axis, as a double. More...
 
double * getY ()
 It returns a pointer to the first value of the scatter Y axis. More...
 
std::vector< double > getYValues ()
 It returns the vector containing the values of the scatter Y axis. More...
 
 Scatter (const std::vector< double > &axisX, const std::vector< double > &axisY)
 Constructor. More...
 
 Scatter ()
 Constructor. More...
 
void setMaxX (double &new_maxX)
 It sets the maximum value of the X axis. More...
 
void setMaxY (double &maxY)
 It sets the maximum value of the Y axis. More...
 
void setMinX (double &new_minX)
 It sets the minimum value of the X axis. More...
 
void setMinY (double &new_minY)
 It sets the minimum value of the Y axis. More...
 
void setXValues (std::vector< double > xValues)
 It sets the values of the X axis. More...
 
void setYValues (std::vector< double > yValues)
 It sets the values of the Y axis. More...
 
std::size_t sizeX ()
 It returns the size of the scatter. More...
 
std::size_t sizeY ()
 It returns the size of the scatter. More...
 
 ~Scatter ()
 Destructor. More...
 

Private Attributes

double m_maxX
 The maximum value of the x Axis. More...
 
double m_maxY
 The maximum value of the y Axis. More...
 
double m_minX
 The minimum value of the x Axis. More...
 
double m_minY
 The minimum value of the y Axis. More...
 
PointToObjectIdSet m_valuesOids
 The points and ObjecIds ordered in a boost multi index container. More...
 
std::vector< double > m_xValues
 Double values for axis X. More...
 
std::vector< double > m_yValues
 Double values for axis Y. More...
 

Detailed Description

A class to represent a scatter.

A widget used to adjust a scatter's input data.

Definition at line 51 of file Scatter.h.

Constructor & Destructor Documentation

te::qt::widgets::Scatter::Scatter ( const std::vector< double > &  axisX,
const std::vector< double > &  axisY 
)

Constructor.

te::qt::widgets::Scatter::Scatter ( )

Constructor.

te::qt::widgets::Scatter::~Scatter ( )

Destructor.

Member Function Documentation

void te::qt::widgets::Scatter::addData ( double &  xValue,
double &  yValue,
te::da::ObjectId oid 
)

It adds the x and Y axis values to the scatter's vectors and the associeted objectId to the scatter's multi_index container.

Parameters
xValueThe new x axis value to be added to the vector.
yValueThe new y axis value to be added to the vector.
oidThe ObjectId that will be added to the container
Note
it will take ownership of the given ObjectId pointer
void te::qt::widgets::Scatter::addX ( double &  xValue)

It adds a new value to the vector containing the X axis values.

Parameters
xValueThe new value to be added to the vector.
void te::qt::widgets::Scatter::addY ( double &  yValue)

It adds a new value to the vector containing the Y axis values.

Parameters
yValueThe new value to be added to the vector.
void te::qt::widgets::Scatter::calculateMinMaxValues ( )

Calculates the minimum and maximum values for both the X and Y axis.

te::da::ObjectIdSet* te::qt::widgets::Scatter::find ( double &  xValue,
double &  yValue 
)

It returns a pointer to an ObjectIdSet that contains all of the scatter's selected points.

Parameters
xValueThe x axis value to be searched.
yValueThe x axis value to be searched.
Note
The caller will take ownership of the returned pointer
te::da::ObjectIdSet* te::qt::widgets::Scatter::find ( std::vector< QPointF >  selectedPoints)

It returns a pointer to an ObjectIdSet that contains all of the scatter's selected points.

Parameters
selectedPointsA vector containing all the points within the selection box
Note
The caller will take ownership of the returned pointer
const std::pair<double, double> te::qt::widgets::Scatter::find ( const te::da::ObjectId oid)

It returns a pair representing the point that contais the secected ObjectId.

Parameters
oidThe ObjectId to be searched.
Note
Returns NULL if no matching point was found
double te::qt::widgets::Scatter::getMaxX ( )

It returns the maximum value of the X axis.

Returns
The maximum value of the X axis.
Note
The caller will not have the ownership of the returned pointer.
double te::qt::widgets::Scatter::getMaxY ( )

It returns the maximum value of the Y axis.

Returns
The maximum value of the Y axis.
Note
The caller will not have the ownership of the returned pointer.
double te::qt::widgets::Scatter::getMinX ( )

It returns the minimum value of the X axis.

Returns
The minimum value of the X axis.
Note
The caller will not have the ownership of the returned pointer.
double te::qt::widgets::Scatter::getMinY ( )

It returns the minimum value of the Y axis.

Returns
The minimum value of the Y axis.
Note
The caller will not have the ownership of the returned pointer.
double te::qt::widgets::Scatter::getX ( unsigned int  idx)

It returns the idx-th value of the scatter X axis, as a double.

Parameters
idxThe index of the element.
Returns
The idx-th value of the scatter X axis, as a double.
double* te::qt::widgets::Scatter::getX ( )

It returns a pointer to the first value of the scatter X axis.

Returns
A pointer to the first value of the scatter X axis.
Note
The caller will not take the ownership of the returned pointer.
std::vector<double> te::qt::widgets::Scatter::getXValues ( )

It returns the vector containing the values of the scatter X axis.

Returns
A vector containing the values of the scatter X axis.
double te::qt::widgets::Scatter::getY ( unsigned int  idx)

It returns the idx-th value of the scatter Y axis, as a double.

Parameters
idxThe index of the element.
Returns
The idx-th value of the scatter Y axis, as a double.
double* te::qt::widgets::Scatter::getY ( )

It returns a pointer to the first value of the scatter Y axis.

Returns
A pointer to the first value of the scatter Y axis.
Note
The caller will not take the ownership of the returned pointer.
std::vector<double> te::qt::widgets::Scatter::getYValues ( )

It returns the vector containing the values of the scatter Y axis.

Returns
A vector containing the values of the scatter Y axis.
void te::qt::widgets::Scatter::setMaxX ( double &  new_maxX)

It sets the maximum value of the X axis.

void te::qt::widgets::Scatter::setMaxY ( double &  maxY)

It sets the maximum value of the Y axis.

void te::qt::widgets::Scatter::setMinX ( double &  new_minX)

It sets the minimum value of the X axis.

void te::qt::widgets::Scatter::setMinY ( double &  new_minY)

It sets the minimum value of the Y axis.

void te::qt::widgets::Scatter::setXValues ( std::vector< double >  xValues)

It sets the values of the X axis.

Parameters
xValuesThe vector containing the new values.
void te::qt::widgets::Scatter::setYValues ( std::vector< double >  yValues)

It sets the values of the Y axis.

Parameters
yValuesThe vector containing the new values.
std::size_t te::qt::widgets::Scatter::sizeX ( )

It returns the size of the scatter.

Returns
The number of the scatter elements on the X axis.
std::size_t te::qt::widgets::Scatter::sizeY ( )

It returns the size of the scatter.

Returns
The number of the scatter elements on the Y axis.

Member Data Documentation

double te::qt::widgets::Scatter::m_maxX
private

The maximum value of the x Axis.

Definition at line 269 of file Scatter.h.

double te::qt::widgets::Scatter::m_maxY
private

The maximum value of the y Axis.

Definition at line 271 of file Scatter.h.

double te::qt::widgets::Scatter::m_minX
private

The minimum value of the x Axis.

Definition at line 268 of file Scatter.h.

double te::qt::widgets::Scatter::m_minY
private

The minimum value of the y Axis.

Definition at line 270 of file Scatter.h.

PointToObjectIdSet te::qt::widgets::Scatter::m_valuesOids
private

The points and ObjecIds ordered in a boost multi index container.

Definition at line 264 of file Scatter.h.

std::vector<double> te::qt::widgets::Scatter::m_xValues
private

Double values for axis X.

Definition at line 265 of file Scatter.h.

std::vector<double> te::qt::widgets::Scatter::m_yValues
private

Double values for axis Y.

Definition at line 266 of file Scatter.h.


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