Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
mana_devotion_widget.h
Go to the documentation of this file.
1
6
7#ifndef MANA_DEVOTION_WIDGET_H
8#define MANA_DEVOTION_WIDGET_H
9
11
12#include <QHBoxLayout>
13#include <QWidget>
16#include <utility>
17
18class ManaDevotionWidget : public QWidget
19{
20 Q_OBJECT
21
22public:
23 explicit ManaDevotionWidget(QWidget *parent, DeckListModel *deckListModel);
24 void updateDisplay();
25
26 std::unordered_map<char, int> countManaSymbols(const QString &manaString);
27 void mergeManaCounts(std::unordered_map<char, int> &manaCounts1, const std::unordered_map<char, int> &manaCounts2);
28
29public slots:
30 void setDeckModel(DeckListModel *deckModel);
31 std::unordered_map<char, int> analyzeManaDevotion();
32 void retranslateUi();
33
34private:
37 std::unordered_map<char, int> manaDevotionMap;
38 QVBoxLayout *layout;
39 QHBoxLayout *barLayout;
40};
41
42#endif // MANA_DEVOTION_WIDGET_H
TODO: Document this.
Definition banner_widget.h:17
Qt model representing a decklist for use in views (tree/table).
Definition deck_list_model.h:200
std::unordered_map< char, int > manaDevotionMap
Definition mana_devotion_widget.h:37
void updateDisplay()
Definition mana_devotion_widget.cpp:63
BannerWidget * bannerWidget
Definition mana_devotion_widget.h:36
QHBoxLayout * barLayout
Definition mana_devotion_widget.h:39
std::unordered_map< char, int > analyzeManaDevotion()
Definition mana_devotion_widget.cpp:43
QVBoxLayout * layout
Definition mana_devotion_widget.h:38
void setDeckModel(DeckListModel *deckModel)
Definition mana_devotion_widget.cpp:36
ManaDevotionWidget(QWidget *parent, DeckListModel *deckListModel)
Definition mana_devotion_widget.cpp:13
void retranslateUi()
Definition mana_devotion_widget.cpp:31
std::unordered_map< char, int > countManaSymbols(const QString &manaString)
Definition mana_devotion_widget.cpp:93
DeckListModel * deckListModel
Definition mana_devotion_widget.h:35
void mergeManaCounts(std::unordered_map< char, int > &manaCounts1, const std::unordered_map< char, int > &manaCounts2)
Definition mana_devotion_widget.cpp:132