mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
* [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.
37 lines
812 B
C++
37 lines
812 B
C++
/**
|
|
* @file mana_curve_widget.h
|
|
* @ingroup DeckEditorAnalyticsWidgets
|
|
* @brief TODO: Document this.
|
|
*/
|
|
|
|
#ifndef MANA_CURVE_WIDGET_H
|
|
#define MANA_CURVE_WIDGET_H
|
|
|
|
#include "../general/display/banner_widget.h"
|
|
#include "deck_list_statistics_analyzer.h"
|
|
|
|
#include <QHBoxLayout>
|
|
#include <QWidget>
|
|
#include <libcockatrice/models/deck_list/deck_list_model.h>
|
|
#include <unordered_map>
|
|
|
|
class ManaCurveWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ManaCurveWidget(QWidget *parent, DeckListStatisticsAnalyzer *deckStatAnalyzer);
|
|
void updateDisplay();
|
|
|
|
public slots:
|
|
void retranslateUi();
|
|
|
|
private:
|
|
DeckListStatisticsAnalyzer *deckStatAnalyzer;
|
|
QVBoxLayout *layout;
|
|
BannerWidget *bannerWidget;
|
|
QWidget *barContainer;
|
|
QHBoxLayout *barLayout;
|
|
};
|
|
|
|
#endif // MANA_CURVE_WIDGET_H
|