Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
all_zones_card_amount_widget.h
Go to the documentation of this file.
1
7
8#ifndef ALL_ZONES_CARD_AMOUNT_WIDGET_H
9#define ALL_ZONES_CARD_AMOUNT_WIDGET_H
10#include <QWidget>
11#include <qtmetamacros.h>
12
15class ExactCard;
16class QLabel;
17class QSlider;
18class QVBoxLayout;
19
20class AllZonesCardAmountWidget : public QWidget
21{
22 Q_OBJECT
23public:
24 explicit AllZonesCardAmountWidget(QWidget *parent,
25 DeckStateManager *deckStateManager,
26 QSlider *cardSizeSlider,
27 const ExactCard &rootCard);
31 bool isNonZero();
32
33 void enterEvent(QEnterEvent *event) override;
34
35public slots:
36 void adjustFontSize(int scalePercentage);
37 void setAmounts(int mainboardAmount, int sideboardAmount, int tokensboardAmount);
38
39private:
40 QVBoxLayout *layout;
48};
49
50#endif // ALL_ZONES_CARD_AMOUNT_WIDGET_H
void setAmounts(int mainboardAmount, int sideboardAmount, int tokensboardAmount)
Definition all_zones_card_amount_widget.cpp:104
AllZonesCardAmountWidget(QWidget *parent, DeckStateManager *deckStateManager, QSlider *cardSizeSlider, const ExactCard &rootCard)
Constructor for the AllZonesCardAmountWidget class.
Definition all_zones_card_amount_widget.cpp:31
CardAmountWidget * buttonBoxSideboard
Definition all_zones_card_amount_widget.h:45
QSlider * cardSizeSlider
Definition all_zones_card_amount_widget.h:41
CardAmountWidget * buttonBoxTokensboard
Definition all_zones_card_amount_widget.h:47
bool isNonZero()
Checks if the amount is at least one in either the mainboard or sideboard or tokensboard.
Definition all_zones_card_amount_widget.cpp:144
int getTokensboardAmount()
Gets the card count in the tokensboard zone.
Definition all_zones_card_amount_widget.cpp:136
CardAmountWidget * buttonBoxMainboard
Definition all_zones_card_amount_widget.h:43
QVBoxLayout * layout
Definition all_zones_card_amount_widget.h:40
void enterEvent(QEnterEvent *event) override
Handles the event when the mouse enters the widget.
Definition all_zones_card_amount_widget.cpp:157
int getSideboardAmount()
Gets the card count in the sideboard zone.
Definition all_zones_card_amount_widget.cpp:126
QLabel * zoneLabelSideboard
Definition all_zones_card_amount_widget.h:44
int getMainboardAmount()
Gets the card count in the mainboard zone.
Definition all_zones_card_amount_widget.cpp:116
QLabel * zoneLabelMainboard
Definition all_zones_card_amount_widget.h:42
void adjustFontSize(int scalePercentage)
Adjusts the font size of the zone labels based on the slider value.
Definition all_zones_card_amount_widget.cpp:84
QLabel * zoneLabelTokensboard
Definition all_zones_card_amount_widget.h:46
Definition card_amount_widget.h:24
This class centralizes the management of the state of the deck in the deck editor tab....
Definition deck_state_manager.h:32
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:24