Cockatrice 2026-01-14-Development-2.11.0-beta.46
A cross-platform 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);
26 bool isNonZero();
27
28#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
29 void enterEvent(QEnterEvent *event) override;
30#else
31 void enterEvent(QEvent *event) override;
32#endif
33
34public slots:
35 void adjustFontSize(int scalePercentage);
36 void setAmounts(int mainboardAmount, int sideboardAmount);
37
38private:
39 QVBoxLayout *layout;
45};
46
47#endif // ALL_ZONES_CARD_AMOUNT_WIDGET_H
TODO: Document this.
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:44
QSlider * cardSizeSlider
Definition all_zones_card_amount_widget.h:40
bool isNonZero()
Checks if the amount is at least one in either the mainboard or sideboard.
Definition all_zones_card_amount_widget.cpp:104
CardAmountWidget * buttonBoxMainboard
Definition all_zones_card_amount_widget.h:42
QVBoxLayout * layout
Definition all_zones_card_amount_widget.h:39
void enterEvent(QEnterEvent *event) override
Handles the event when the mouse enters the widget.
Definition all_zones_card_amount_widget.cpp:118
int getSideboardAmount()
Gets the card count in the sideboard zone.
Definition all_zones_card_amount_widget.cpp:96
void setAmounts(int mainboardAmount, int sideboardAmount)
Definition all_zones_card_amount_widget.cpp:75
QLabel * zoneLabelSideboard
Definition all_zones_card_amount_widget.h:43
int getMainboardAmount()
Gets the card count in the mainboard zone.
Definition all_zones_card_amount_widget.cpp:86
QLabel * zoneLabelMainboard
Definition all_zones_card_amount_widget.h:41
void adjustFontSize(int scalePercentage)
Adjusts the font size of the zone labels based on the slider value.
Definition all_zones_card_amount_widget.cpp:56
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
TODO: Document this.