本文整理汇总了C++中TimeSeries::units方法的典型用法代码示例。如果您正苦于以下问题:C++ TimeSeries::units方法的具体用法?C++ TimeSeries::units怎么用?C++ TimeSeries::units使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimeSeries
的用法示例。
在下文中一共展示了TimeSeries::units方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setBoundingRect
TimeSeriesFloodPlotData::TimeSeriesFloodPlotData(TimeSeries timeSeries)
: m_timeSeries(timeSeries),
m_minValue(minimum(timeSeries.values())),
m_maxValue(maximum(timeSeries.values())),
m_minX(timeSeries.firstReportDateTime().date().dayOfYear()),
m_maxX(ceil(timeSeries.daysFromFirstReport()[timeSeries.daysFromFirstReport().size()-1]+timeSeries.firstReportDateTime().date().dayOfYear()+timeSeries.firstReportDateTime().time().totalDays())), // end day
m_minY(0), // start hour
m_maxY(24), // end hour
m_startFractionalDay(timeSeries.firstReportDateTime().date().dayOfYear()+timeSeries.firstReportDateTime().time().totalDays())
{
// data range
setBoundingRect(QwtDoubleRect(m_minX, m_minY, m_maxX-m_minX, m_maxY-m_minY));
m_colorMapRange = QwtDoubleInterval(m_minValue, m_maxValue);
m_units = timeSeries.units();
}
示例2: QwtDoubleRect
TimeSeriesLinePlotData::TimeSeriesLinePlotData(TimeSeries timeSeries, double fracDaysOffset)
: m_timeSeries(timeSeries),
m_minX(timeSeries.firstReportDateTime().date().dayOfYear()+timeSeries.firstReportDateTime().time().totalDays()),
m_maxX(timeSeries.daysFromFirstReport()[timeSeries.daysFromFirstReport().size()-1]+timeSeries.firstReportDateTime().date().dayOfYear()+timeSeries.firstReportDateTime().time().totalDays()), // end day
m_minY(minimum(timeSeries.values())),
m_maxY(maximum(timeSeries.values())),
m_size(timeSeries.values().size())
{
m_boundingRect = QwtDoubleRect(m_minX, m_minY, (m_maxX - m_minX), (m_maxY - m_minY));
m_minValue = m_minY;
m_maxValue = m_maxY;
m_units = timeSeries.units();
m_fracDaysOffset = fracDaysOffset; // note updating in xValue does not affect scaled axis
m_x = m_timeSeries.daysFromFirstReport();
m_y = m_timeSeries.values();
}