diff options
Diffstat (limited to 'mobile-widgets/statsmanager.cpp')
-rw-r--r-- | mobile-widgets/statsmanager.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mobile-widgets/statsmanager.cpp b/mobile-widgets/statsmanager.cpp new file mode 100644 index 000000000..2864a5f16 --- /dev/null +++ b/mobile-widgets/statsmanager.cpp @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0 +#include "statsmanager.h" + +StatsManager::StatsManager() : view(nullptr) +{ + // Test: show some random data. Let's see what happens. + state.var1Changed(2); + state.var2Changed(3); + state.binner2Changed(2); +} + +StatsManager::~StatsManager() +{ +} + +void StatsManager::init(StatsView *v) +{ + if (!v) + fprintf(stderr, "StatsManager::init(): no StatsView - statistics will not work.\n"); + view = v; +} + +void StatsManager::doit() +{ + if (!view) + return; + view->plot(state); +} |