Cockatrice 2026-09-01-Development-3.1.0-beta.10
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
11#include "card_amount_widget.h"
12
13#include <QWidget>
15
16class AllZonesCardAmountWidget : public QWidget
17{
18 Q_OBJECT
19public:
20 explicit AllZonesCardAmountWidget(QWidget *parent,
21 DeckStateManager *deckStateManager,
22 QSlider *cardSizeSlider,
23 const ExactCard &rootCard);
27 bool isNonZero();
28
29 void enterEvent(QEnterEvent *event) override;
30
31public slots:
32 void adjustFontSize(int scalePercentage);
33 void setAmounts(int mainboardAmount, int sideboardAmount, int tokensboardAmount);
34
35private:
36 QVBoxLayout *layout;
44};
45
46#endif // ALL_ZONES_CARD_AMOUNT_WIDGET_H
void setAmounts(int mainboardAmount, int sideboardAmount, int tokensboardAmount)
Definition all_zones_card_amount_widget.cpp:91
AllZonesCardAmountWidget(QWidget *parent, DeckStateManager *deckStateManager, QSlider *cardSizeSlider, const ExactCard &rootCard)
Constructor for the AllZonesCardAmountWidget class.
Definition all_zones_card_amount_widget.cpp:18
CardAmountWidget * buttonBoxSideboard
Definition all_zones_card_amount_widget.h:41
QSlider * cardSizeSlider
Definition all_zones_card_amount_widget.h:37
CardAmountWidget * buttonBoxTokensboard
Definition all_zones_card_amount_widget.h:43
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:131
int getTokensboardAmount()
Gets the card count in the tokensboard zone.
Definition all_zones_card_amount_widget.cpp:123
CardAmountWidget * buttonBoxMainboard
Definition all_zones_card_amount_widget.h:39
QVBoxLayout * layout
Definition all_zones_card_amount_widget.h:36
void enterEvent(QEnterEvent *event) override
Handles the event when the mouse enters the widget.
Definition all_zones_card_amount_widget.cpp:144
int getSideboardAmount()
Gets the card count in the sideboard zone.
Definition all_zones_card_amount_widget.cpp:113
QLabel * zoneLabelSideboard
Definition all_zones_card_amount_widget.h:40
int getMainboardAmount()
Gets the card count in the mainboard zone.
Definition all_zones_card_amount_widget.cpp:103
QLabel * zoneLabelMainboard
Definition all_zones_card_amount_widget.h:38
void adjustFontSize(int scalePercentage)
Adjusts the font size of the zone labels based on the slider value.
Definition all_zones_card_amount_widget.cpp:71
QLabel * zoneLabelTokensboard
Definition all_zones_card_amount_widget.h:42
Definition card_amount_widget.h:22
This class centralizes the management of the state of the deck in the deck editor tab....
Definition deck_state_manager.h:22
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:19