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::ObjectIdSet * | find (double &xValue, double &yValue) |
It returns a pointer to an ObjectIdSet that contains all of the scatter's selected points. More... | |
te::da::ObjectIdSet * | find (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... | |
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... | |
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... | |
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 intervals 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... | |
A class to represent a scatter.
A widget used to adjust a scatter's input data.
te::qt::widgets::Scatter::Scatter | ( | const std::vector< double > & | axisX, |
const std::vector< double > & | axisY | ||
) |
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.
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.
xValue | The new x axis value to be added to the vector. |
yValue | The new y axis value to be added to the vector. |
oid | The ObjectId that will be added to the container |
Definition at line 156 of file Scatter.cpp.
Referenced by 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.
xValue | The new value to be added to the vector. |
Definition at line 146 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.
yValue | The new value to be added to the vector. |
Definition at line 151 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 53 of file Scatter.cpp.
Referenced by te::qt::widgets::createScatter(), 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.
xValue | The x axis value to be searched. |
yValue | The x axis value to be searched. |
Definition at line 163 of file Scatter.cpp.
References te::da::ObjectIdSet::add(), and te::da::ObjectId::addValue().
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.
selectedPoints | A vector containing all the points within the selection box |
Definition at line 193 of file Scatter.cpp.
References te::da::ObjectIdSet::add(), and te::da::ObjectId::addValue().
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.
oid | The ObjectId to be searched. |
Definition at line 231 of file Scatter.cpp.
References te::da::ObjectId::getValueAsString().
double te::qt::widgets::Scatter::getMaxX | ( | ) |
It returns the maximum value of the X axis.
Definition at line 111 of file Scatter.cpp.
double te::qt::widgets::Scatter::getMaxY | ( | ) |
It returns the maximum value of the Y axis.
Definition at line 121 of file Scatter.cpp.
double te::qt::widgets::Scatter::getMinX | ( | ) |
It returns the minimum value of the X axis.
Definition at line 106 of file Scatter.cpp.
double te::qt::widgets::Scatter::getMinY | ( | ) |
It returns the minimum value of the Y axis.
Definition at line 116 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.
idx | The index of the element. |
Definition at line 86 of file Scatter.cpp.
double * te::qt::widgets::Scatter::getX | ( | ) |
It returns a pointer to the first value of the scatter X axis.
Definition at line 91 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.
idx | The index of the element. |
Definition at line 96 of file Scatter.cpp.
double * te::qt::widgets::Scatter::getY | ( | ) |
It returns a pointer to the first value of the scatter Y axis.
Definition at line 101 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 131 of file Scatter.cpp.
void te::qt::widgets::Scatter::setMaxY | ( | double & | maxY | ) |
It sets the maximum value of the Y axis.
Definition at line 141 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 126 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 136 of file Scatter.cpp.
std::size_t te::qt::widgets::Scatter::sizeX | ( | ) |
It returns the size of the scatter.
Definition at line 76 of file Scatter.cpp.
Referenced by te::qt::widgets::ScatterChart::ScatterChart().
std::size_t te::qt::widgets::Scatter::sizeY | ( | ) |
It returns the size of the scatter.
Definition at line 81 of file Scatter.cpp.
Referenced by te::qt::widgets::ScatterChart::ScatterChart().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |