19#include <QPainterPath>
67 bool getPath(QPainterPath &path,
float scaleX,
float scaleY);
75 bool getPoint(QPointF &p, std::size_t i);
98 static int readList(
const QString &path, std::vector<DiagramList*> &list);
127 void setList(std::vector<std::pair<float, float>>
const& coords);
135 void setList(std::vector<std::pair<QDateTime, float>>
const& coords);
144 std::size_t
size()
const;
169 int readLine(std::ifstream inFile, QDateTime &cDate,
float &cValue);
178 std::vector< std::pair<float, float> >
_coords;
A List of data points and all the necessary meta-information to draw a graph.
void update()
Updates the bounds of the data points contained in the list.
float minYValue() const
Returns the minimum y-value.
float maxXValue() const
Returns the maximum x-value.
void setXLabel(QString label)
Specifies the meaning of the x Axis.
QString getYUnit() const
Returns the unit associated with the y-axis.
bool getPoint(QPointF &p, std::size_t i)
const QDateTime getStartDate() const
Returns the start date of this list.
void setYUnit(QString unit)
Specifies the unit of the y Axis.
std::size_t size() const
Returns the number of data points.
void truncateToRange(QDateTime const &start, QDateTime const &end)
cut list entries not within the given range
QString getXLabel() const
Returns the label associated with the x-axis.
DiagramList()
Constructor containing an empty list.
float maxYValue() const
Returns the maximum y-value.
float calcMinXValue()
Returns the minimum x-value of all the data points.
QString getXUnit() const
Returns the unit associated with the x-axis.
QString getName() const
Returns the name of the diagram.
static int readList(const QString &path, std::vector< DiagramList * > &list)
float height() const
Returns the height of the bounding box of all data points within the list.
float minXValue() const
Returns the minimum x-value.
float calcMaxXValue()
Returns the maximum x-value of all the data points.
float calcMinYValue()
Returns the minimum y-value of all the data points.
QColor getColor() const
Returns the colour of the graph.
float calcMaxYValue()
Returns the maximum y-value of all the data points.
double width() const
Returns the width of the bounding box of all data points within the list.
std::vector< std::pair< float, float > > _coords
void addNextPoint(float x, float y)
Adds a point at (x,y) to the list.
void setStartDate(QDateTime date)
Sets the start date (i.e. the min-value of the x-axis).
int readLine(std::ifstream inFile, QDateTime &cDate, float &cValue)
void setName(QString name)
Sets the name of the graph to be displayed in the caption.
void setList(std::vector< std::pair< float, float > > const &coords)
void setXUnit(QString unit)
Specifies the unit of the x Axis.
void setColor(QColor c)
Sets the colour of the graph.
QString getYLabel() const
Returns the label associated with the y-axis.
bool getPath(QPainterPath &path, float scaleX, float scaleY)
void setYLabel(QString label)
Specifies the meaning of the y Axis.
A container for sensor data at an observation site. The class stores a number of time series and has ...