[VDE] Consolidate statistical analysis into a separate object (#6392)

* [VDE] Consolidate statistical analysis into a separate object so multiple widgets can re-use calculations and calculation is only performed once on data change.

* [VDE] Lint.

* [VDE] Move struct up to not confuse compiler.

* [VDE] NoDiscards

* [VDE] Move variables

* [VDE] Lint.
This commit is contained in:
BruebachL 2025-12-02 13:51:08 +01:00 committed by GitHub
parent 364d0ca52b
commit f0ebd28148
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 215 additions and 202 deletions

View file

@ -24,10 +24,11 @@ public:
explicit DeckAnalyticsWidget(QWidget *parent, DeckListModel *deckListModel);
void setDeckList(const DeckList &_deckListModel);
std::map<int, int> analyzeManaCurve();
void refreshDisplays(DeckListModel *_deckListModel);
void refreshDisplays();
private:
DeckListModel *deckListModel;
DeckListStatisticsAnalyzer *deckListStatisticsAnalyzer;
QVBoxLayout *mainLayout;
QWidget *container;