Commit e23731cc authored by Volker Krause's avatar Volker Krause
Browse files

Fix typo

parent 3373cff2
...@@ -126,26 +126,26 @@ void CategoryAggregator::updateTimelineChart() ...@@ -126,26 +126,26 @@ void CategoryAggregator::updateTimelineChart()
QtCharts::QChart* CategoryAggregator::singlularChart() QtCharts::QChart* CategoryAggregator::singlularChart()
{ {
if (!m_singlularChart) { if (!m_singularChart) {
m_singlularChart.reset(new QChart); m_singularChart.reset(new QChart);
ChartUtil::applyTheme(m_singlularChart.get()); ChartUtil::applyTheme(m_singularChart.get());
updateSingularChart(); updateSingularChart();
} }
return m_singlularChart.get(); return m_singularChart.get();
} }
void CategoryAggregator::updateSingularChart() void CategoryAggregator::updateSingularChart()
{ {
if (!m_singlularChart) if (!m_singularChart)
return; return;
m_singlularChart->removeAllSeries(); m_singularChart->removeAllSeries();
if (sourceModel()->rowCount() <= 0) if (sourceModel()->rowCount() <= 0)
return; return;
auto series = new QPieSeries(m_singlularChart.get()); auto series = new QPieSeries(m_singularChart.get());
auto mapper = new QHPieModelMapper(m_singlularChart.get()); auto mapper = new QHPieModelMapper(m_singularChart.get());
auto modelWithLabels = new ExtraRowsProxyModel(mapper); auto modelWithLabels = new ExtraRowsProxyModel(mapper);
modelWithLabels->setSourceModel(singularAggregationModel()); modelWithLabels->setSourceModel(singularAggregationModel());
mapper->setModel(modelWithLabels); mapper->setModel(modelWithLabels);
...@@ -154,5 +154,5 @@ void CategoryAggregator::updateSingularChart() ...@@ -154,5 +154,5 @@ void CategoryAggregator::updateSingularChart()
mapper->setLabelsRow(1); mapper->setLabelsRow(1);
mapper->setSeries(series); mapper->setSeries(series);
m_singlularChart->addSeries(series); m_singularChart->addSeries(series);
} }
...@@ -45,7 +45,7 @@ private: ...@@ -45,7 +45,7 @@ private:
std::unique_ptr<CategoryAggregationModel> m_model; std::unique_ptr<CategoryAggregationModel> m_model;
std::unique_ptr<QtCharts::QChart> m_timelineChart; std::unique_ptr<QtCharts::QChart> m_timelineChart;
std::unique_ptr<QtCharts::QChart> m_singlularChart; std::unique_ptr<QtCharts::QChart> m_singularChart;
}; };
}} }}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment