27 #include "../../../qt/widgets/charts/Utils.h" 28 #include "../../../dataaccess.h" 29 #include "../../../datatype/Property.h" 30 #include "../../../st/core/timeseries/TimeSeries.h" 32 #include "ui_TimeSeriesDataWidgetForm.h" 35 #include <QMessageBox> 39 m_ui(new
Ui::TimeSeriesDataWidgetForm),
46 for (std::size_t i = 0; i <
m_dataSet->getNumProperties(); i++)
51 item = QString::fromUtf8(
m_dataSet->getPropertyName(i).c_str());
52 m_ui->m_timeComboBox->addItem(item, QVariant::fromValue(i));
57 item = QString::fromUtf8(
m_dataSet->getPropertyName(i).c_str());
58 m_ui->m_valueComboBox->addItem(item, QVariant::fromValue(i));
59 m_ui->m_idComboBox->addItem(item, QVariant::fromValue(i));
79 std::unique_ptr<te::dt::DateTime> time(
m_dataSet->getDateTime(
m_ui->m_timeComboBox->currentText().toUtf8().data()));
80 std::unique_ptr<te::dt::AbstractData> value(
m_dataSet->getValue(
m_ui->m_valueComboBox->currentText().toUtf8().data()));
81 timeSeries->
add(time.release(), value.release());
A class that models the description of a dataset.
void add(te::dt::DateTime *time, te::dt::AbstractData *value)
It adds an observation (time and attribute value) into the time series.
A dataset is the unit of information manipulated by the data access module of TerraLib.
A class to represent time series.