28 #include "../../../dataaccess/dataset/ObjectIdSet.h"
41 : m_minX(std::numeric_limits<double>::max()),
42 m_maxX(-std::numeric_limits<double>::max()),
43 m_minY(std::numeric_limits<double>::max()),
44 m_maxY(-std::numeric_limits<double>::max())
55 std::vector<double>::const_iterator itx = m_xValues.begin();
56 std::vector<double>::const_iterator ity = m_yValues.begin();
57 while(itx!=m_xValues.end())
66 while(ity!=m_yValues.end())
78 return m_xValues.size();
83 return m_yValues.size();
88 return m_xValues[idx];
98 return m_yValues[idx];
103 return &m_yValues[0];
148 m_xValues.push_back(xValue);
153 m_yValues.push_back(yValue);
158 m_xValues.push_back(xValue);
159 m_yValues.push_back(yValue);
165 typedef te::qt::widgets::PointToObjectIdSet::nth_index<0>::type::iterator itPointToObjectIdSet;
168 std::pair<itPointToObjectIdSet, itPointToObjectIdSet> res = m_valuesOids.equal_range(aux);
169 itPointToObjectIdSet it0 = res.first;
170 itPointToObjectIdSet it1 = res.second;
180 for(boost::ptr_vector<te::dt::AbstractData>::const_iterator it = it0->oid->getValue().begin(); it != it0->oid->getValue().end(); ++it)
195 typedef te::qt::widgets::PointToObjectIdSet::nth_index<0>::type::iterator itPointToObjectIdSet;
196 itPointToObjectIdSet it0, it1;
197 std::pair<itPointToObjectIdSet, itPointToObjectIdSet> res;
201 for(
size_t i = 0; i < selectedPoints.size(); ++i)
203 double x = selectedPoints.at(i).x();
204 double y = selectedPoints.at(i).y();
206 res = m_valuesOids.equal_range(aux);
216 for(boost::ptr_vector<te::dt::AbstractData>::const_iterator it = it0->oid->getValue().begin(); it != it0->oid->getValue().end(); ++it)
233 te::qt::widgets::PointToObjectIdSet::nth_index<1>::type::iterator it= m_valuesOids.get<1>().find(oid->
getValueAsString());
234 return std::make_pair(it->x, it->y);
This class represents a set of unique ids created in the same context. i.e. from the same data set...
void setMinX(double &new_minX)
It sets the minimum value of the X axis.
void setMinY(double &new_minY)
It sets the minimum value of the Y axis.
void setMaxY(double &maxY)
It sets the maximum value of the Y axis.
double getMinY()
It returns the minimum value of the Y axis.
void addValue(te::dt::AbstractData *data)
It adds a property value to uniquely identify a data set element.
void setMaxX(double &new_maxX)
It sets the maximum value of the X axis.
std::size_t sizeY()
It returns the size of the scatter.
void addY(double &yValue)
It adds a new value to the vector containing the Y axis values.
double getMinX()
It returns the minimum value of the X axis.
double * getY()
It returns a pointer to the first value of the scatter Y axis.
A class to represent a scatter.
void calculateMinMaxValues()
Calculates the minimum and maximum values for both the X and Y axis.
double * getX()
It returns a pointer to the first value of the scatter X axis.
This class represents an unique id for a data set element.
double getMaxX()
It returns the maximum value of the X axis.
std::size_t sizeX()
It returns the size of the scatter.
double getMaxY()
It returns the maximum value of the Y axis.
std::string getValueAsString() const
It gets the properties values used to uniquely identify a data set element as string.
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...
void addX(double &xValue)
It adds a new value to the vector containing the X axis values.
void add(ObjectId *oid)
It adds an object id to this object id set.
te::da::ObjectIdSet * find(double &xValue, double &yValue)
It returns a pointer to an ObjectIdSet that contains all of the scatter's selected points...