Cockatrice 2026-06-27-Development-3.1.0-beta.3
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#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
30 void enterEvent(QEnterEvent *event) override;
31#else
32 void enterEvent(QEvent *event) override;
33#endif
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: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: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: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: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:145
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:44
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: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:71
QLabel * zoneLabelTokensboard
Definition all_zones_card_amount_widget.h:46
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