All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.

Definition at line 33 of file Scatter.cpp.

References calculateMinMaxValues().

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

Constructor.

Definition at line 40 of file Scatter.cpp.

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

Destructor.

Definition at line 48 of file Scatter.cpp.

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

Definition at line 182 of file Scatter.cpp.

Referenced by buildSummarizedScatter(), and te::qt::widgets::createScatter().

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.

Definition at line 172 of file Scatter.cpp.

Referenced by te::qt::widgets::createScatter().

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.

Definition at line 177 of file Scatter.cpp.

Referenced by te::qt::widgets::createScatter().

void te::qt::widgets::Scatter::calculateMinMaxValues ( )

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

Definition at line 59 of file Scatter.cpp.

Referenced by te::qt::widgets::createScatter(), te::qt::widgets::FusionWizardPage::onLowResSensorTypeActivated(), and Scatter().

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

Definition at line 189 of file Scatter.cpp.

References te::da::ObjectIdSet::add().

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

Definition at line 213 of file Scatter.cpp.

References te::da::ObjectIdSet::add().

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

Definition at line 244 of file Scatter.cpp.

References te::da::ObjectId::getValueAsString().

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.

Definition at line 127 of file Scatter.cpp.

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.

Definition at line 137 of file Scatter.cpp.

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.

Definition at line 122 of file Scatter.cpp.

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.

Definition at line 132 of file Scatter.cpp.

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.

Definition at line 97 of file Scatter.cpp.

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.

Definition at line 102 of file Scatter.cpp.

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.

Definition at line 92 of file Scatter.cpp.

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.

Definition at line 112 of file Scatter.cpp.

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.

Definition at line 117 of file Scatter.cpp.

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.

Definition at line 107 of file Scatter.cpp.

void te::qt::widgets::Scatter::setMaxX ( double &  new_maxX)

It sets the maximum value of the X axis.

Definition at line 152 of file Scatter.cpp.

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

It sets the maximum value of the Y axis.

Definition at line 167 of file Scatter.cpp.

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

It sets the minimum value of the X axis.

Definition at line 147 of file Scatter.cpp.

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

It sets the minimum value of the Y axis.

Definition at line 162 of file Scatter.cpp.

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.

Definition at line 142 of file Scatter.cpp.

Referenced by te::qt::widgets::FusionWizardPage::onLowResSensorTypeActivated().

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.

Definition at line 157 of file Scatter.cpp.

Referenced by te::qt::widgets::FusionWizardPage::onLowResSensorTypeActivated().

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.

Definition at line 82 of file Scatter.cpp.

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.

Definition at line 87 of file Scatter.cpp.

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 files: