mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
* Move models to own library.
Took 35 minutes
Took 22 minutes
* Adjust CMakeLists
Took 20 seconds
* Reformat CMakeLists.
Took 2 minutes
* Revert "Reformat CMakeLists."
This reverts commit db5982ad1c.
Took 55 seconds
* Lint an include
Took 17 minutes
Took 9 seconds
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
39 lines
886 B
C++
39 lines
886 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 <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, DeckListModel *deckListModel);
|
|
void updateDisplay();
|
|
|
|
public slots:
|
|
void setDeckModel(DeckListModel *deckModel);
|
|
std::unordered_map<int, int> analyzeManaCurve();
|
|
void retranslateUi();
|
|
|
|
private:
|
|
DeckListModel *deckListModel;
|
|
std::unordered_map<int, int> manaCurveMap;
|
|
QVBoxLayout *layout;
|
|
BannerWidget *bannerWidget;
|
|
QWidget *barContainer;
|
|
QHBoxLayout *barLayout;
|
|
};
|
|
|
|
#endif // MANA_CURVE_WIDGET_H
|