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... | |
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... | |
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 | ||
) |
Constructor.
te::qt::widgets::Scatter::Scatter | ( | ) |
Constructor.
te::qt::widgets::Scatter::~Scatter | ( | ) |
Destructor.
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 |
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. |
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. |
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.
xValue | The x axis value to be searched. |
yValue | The x axis value to be searched. |
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 |
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. |
double te::qt::widgets::Scatter::getMaxX | ( | ) |
It returns the maximum value of the X axis.
double te::qt::widgets::Scatter::getMaxY | ( | ) |
It returns the maximum value of the Y axis.
double te::qt::widgets::Scatter::getMinX | ( | ) |
It returns the minimum value of the X axis.
double te::qt::widgets::Scatter::getMinY | ( | ) |
It returns the minimum value of the Y axis.
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. |
double* te::qt::widgets::Scatter::getX | ( | ) |
It returns a pointer to the first value of the scatter X axis.
std::vector<double> te::qt::widgets::Scatter::getXValues | ( | ) |
It returns the 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.
idx | The index of the element. |
double* te::qt::widgets::Scatter::getY | ( | ) |
It returns a pointer to the first value of the scatter Y axis.
std::vector<double> te::qt::widgets::Scatter::getYValues | ( | ) |
It returns the 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.
xValues | The vector containing the new values. |
void te::qt::widgets::Scatter::setYValues | ( | std::vector< double > | yValues | ) |
It sets the values of the Y axis.
yValues | The vector containing the new values. |
std::size_t te::qt::widgets::Scatter::sizeX | ( | ) |
It returns the size of the scatter.
std::size_t te::qt::widgets::Scatter::sizeY | ( | ) |
It returns the size of the scatter.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |