From 83981f76348655507d225aca220893e668b09bdc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 Jul 2016 22:47:45 +0300 Subject: Add support for loading stats pages from stats.xml --- src/gui/widgets/statspage.cpp | 5 +++-- src/gui/widgets/statspage.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/statspage.cpp b/src/gui/widgets/statspage.cpp index b41cc6224..1f30f2862 100644 --- a/src/gui/widgets/statspage.cpp +++ b/src/gui/widgets/statspage.cpp @@ -37,7 +37,8 @@ #include "debug.h" -StatsPage::StatsPage(const Widget2 *const widget) : +StatsPage::StatsPage(const Widget2 *const widget, + const std::string &page) : Container(widget), WidgetListener(), StatListener(), @@ -51,7 +52,7 @@ StatsPage::StatsPage(const Widget2 *const widget) : mAttrScroll->setVerticalScrollPolicy(ScrollArea::SHOW_AUTO); add(mAttrScroll); - const std::vector &basicStats = StatDb::getExtendedStats(); + const std::vector &basicStats = StatDb::getStats(page); FOR_EACH (std::vector::const_iterator, it, basicStats) { const BasicStat &stat = *it; diff --git a/src/gui/widgets/statspage.h b/src/gui/widgets/statspage.h index 2bfb144d2..b9ab37df5 100644 --- a/src/gui/widgets/statspage.h +++ b/src/gui/widgets/statspage.h @@ -35,7 +35,8 @@ class StatsPage final : public Container, public StatListener { public: - StatsPage(const Widget2 *const widget); + StatsPage(const Widget2 *const widget, + const std::string &page); A_DELETE_COPY(StatsPage) -- cgit v1.2.3-70-g09d2