statistics: add series interface class

Add a interface class for the chart series used by the statistics
module. Abstract virtual functions are declared for replotting
and selecting items.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-01 21:54:35 +01:00 committed by Dirk Hohndel
parent 31da037701
commit 907e6ff05d
3 changed files with 47 additions and 0 deletions

18
stats/statsseries.cpp Normal file
View file

@ -0,0 +1,18 @@
// SPDX-License-Identifier: GPL-2.0
#include "statsseries.h"
#include "statsaxis.h"
#include <QChart>
StatsSeries::StatsSeries(QtCharts::QChart *chart, StatsAxis *xAxis, StatsAxis *yAxis)
{
chart->addSeries(this);
if (xAxis && yAxis) {
attachAxis(xAxis->qaxis());
attachAxis(yAxis->qaxis());
}
}
StatsSeries::~StatsSeries()
{
}