A class to represent a timeSeries chart. More...
#include <TimeSeriesChart.h>
Public Member Functions | |
| void | attach (QwtPlot *plot) |
| It atttaches a QwtPlot to this Cahrt. More... | |
| te::st::TimeSeries * | getTimeSeries () |
| It returns the chart's timeSeries. More... | |
| TimeSeriesStyle * | getTimeSeriesStyle () |
| Returns a clone of the pointer to the timeSeries' style. More... | |
| virtual int | rtti () const |
| Returns the chart's type. More... | |
| void | setData () |
| void | setDateFormat (std::string dateFormat) |
| It sets the date format that will be used on the labels. More... | |
| void | setTimeSeries (te::st::TimeSeries *newTimeSeries) |
| It sets the chart's timeSeries. More... | |
| void | setTimeSeriesStyle (TimeSeriesStyle *newStyle) |
| It sets the chart's style. More... | |
| TimeSeriesChart (te::st::TimeSeries *data) | |
| Constructor. More... | |
| TimeSeriesChart (te::st::TimeSeries *data, TimeSeriesStyle *style, size_t size) | |
| Constructor. More... | |
| ~TimeSeriesChart () | |
| Destructor. More... | |
Private Attributes | |
| std::set< std::string > | m_dates |
| The dates that will be plotted on the X axis. More... | |
| QColor | m_selColor |
| The color used to highlight selected obecjts. More... | |
| te::st::TimeSeries * | m_timeSeries |
| The scatter that will be shown on this chart. More... | |
| TimeSeriesStyle * | m_timeSeriesStyle |
| The symbol that defines the look of a scatter's point. More... | |
A class to represent a timeSeries chart.
Definition at line 56 of file TimeSeriesChart.h.
| te::qt::widgets::TimeSeriesChart::TimeSeriesChart | ( | te::st::TimeSeries * | data | ) |
Constructor.
It constructs a TimeSeres chart with a default style.
Definition at line 52 of file TimeSeriesChart.cpp.
References te::qt::widgets::Config(), te::qt::widgets::TimeSeriesStyle::getStroke(), m_timeSeriesStyle, and setData().
| te::qt::widgets::TimeSeriesChart::TimeSeriesChart | ( | te::st::TimeSeries * | data, |
| TimeSeriesStyle * | style, | ||
| size_t | size | ||
| ) |
Constructor.
Definition at line 70 of file TimeSeriesChart.cpp.
References setData().
| te::qt::widgets::TimeSeriesChart::~TimeSeriesChart | ( | ) |
| void te::qt::widgets::TimeSeriesChart::attach | ( | QwtPlot * | plot | ) |
It atttaches a QwtPlot to this Cahrt.
| plot | The QwtPlot that will be attached to this chart. |
Definition at line 128 of file TimeSeriesChart.cpp.
Referenced by te::qt::widgets::TimeSeriesDialog::onOkPushButtonClicked().
| te::st::TimeSeries * te::qt::widgets::TimeSeriesChart::getTimeSeries | ( | ) |
It returns the chart's timeSeries.
Definition at line 136 of file TimeSeriesChart.cpp.
References m_timeSeries.
| te::qt::widgets::TimeSeriesStyle * te::qt::widgets::TimeSeriesChart::getTimeSeriesStyle | ( | ) |
Returns a clone of the pointer to the timeSeries' style.
Definition at line 147 of file TimeSeriesChart.cpp.
References te::qt::widgets::TimeSeriesStyle::clone(), and m_timeSeriesStyle.
Referenced by te::qt::widgets::TimeSeriesFrame::setChart().
|
virtual |
Returns the chart's type.
Definition at line 123 of file TimeSeriesChart.cpp.
References te::qt::widgets::TIMESERIES_CHART.
| void te::qt::widgets::TimeSeriesChart::setData | ( | ) |
Definition at line 83 of file TimeSeriesChart.cpp.
References te::st::TimeSeries::begin(), d, te::dt::DATE, te::st::TimeSeries::end(), te::dt::DateTime::getDateTimeType(), te::st::TimeSeriesIterator::getDouble(), te::st::TimeSeriesIterator::getTime(), m_dates, m_timeSeries, and te::dt::TIME_INSTANT.
Referenced by TimeSeriesChart().
| void te::qt::widgets::TimeSeriesChart::setDateFormat | ( | std::string | dateFormat | ) |
It sets the date format that will be used on the labels.
The default format strings are:
Definition at line 167 of file TimeSeriesChart.cpp.
| void te::qt::widgets::TimeSeriesChart::setTimeSeries | ( | te::st::TimeSeries * | newTimeSeries | ) |
It sets the chart's timeSeries.
| newHistogram | The chart's new scatter. |
Definition at line 141 of file TimeSeriesChart.cpp.
References m_timeSeries.
| void te::qt::widgets::TimeSeriesChart::setTimeSeriesStyle | ( | TimeSeriesStyle * | newStyle | ) |
It sets the chart's style.
| newStyle | The chart's new style. |
Definition at line 152 of file TimeSeriesChart.cpp.
References te::qt::widgets::Config(), te::qt::widgets::TimeSeriesStyle::getStroke(), and m_timeSeriesStyle.
Referenced by te::qt::widgets::TimeSeriesFrame::getChart().
|
private |
The dates that will be plotted on the X axis.
Definition at line 142 of file TimeSeriesChart.h.
Referenced by setData().
|
private |
The color used to highlight selected obecjts.
Definition at line 144 of file TimeSeriesChart.h.
|
private |
The scatter that will be shown on this chart.
Definition at line 141 of file TimeSeriesChart.h.
Referenced by getTimeSeries(), setData(), and setTimeSeries().
|
private |
The symbol that defines the look of a scatter's point.
Definition at line 143 of file TimeSeriesChart.h.
Referenced by getTimeSeriesStyle(), setTimeSeriesStyle(), TimeSeriesChart(), and ~TimeSeriesChart().