![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
#include <all_zones_card_amount_widget.h>
Public Slots | |
| void | adjustFontSize (int scalePercentage) |
| Adjusts the font size of the zone labels based on the slider value. | |
| void | setAmounts (int mainboardAmount, int sideboardAmount, int tokensboardAmount) |
Public Member Functions | |
| AllZonesCardAmountWidget (QWidget *parent, DeckStateManager *deckStateManager, QSlider *cardSizeSlider, const ExactCard &rootCard) | |
| Constructor for the AllZonesCardAmountWidget class. | |
| int | getMainboardAmount () |
| Gets the card count in the mainboard zone. | |
| int | getSideboardAmount () |
| Gets the card count in the sideboard zone. | |
| int | getTokensboardAmount () |
| Gets the card count in the tokensboard zone. | |
| bool | isNonZero () |
| Checks if the amount is at least one in either the mainboard or sideboard or tokensboard. | |
| void | enterEvent (QEnterEvent *event) override |
| Handles the event when the mouse enters the widget. | |
Private Attributes | |
| QVBoxLayout * | layout |
| QSlider * | cardSizeSlider |
| QLabel * | zoneLabelMainboard |
| CardAmountWidget * | buttonBoxMainboard |
| QLabel * | zoneLabelSideboard |
| CardAmountWidget * | buttonBoxSideboard |
| QLabel * | zoneLabelTokensboard |
| CardAmountWidget * | buttonBoxTokensboard |
|
explicit |
Constructor for the AllZonesCardAmountWidget class.
Initializes the widget with its layout and sets up the connections and necessary UI elements for managing card counts in all the mainboard, tokensboard and sideboard zones.
| parent | The parent widget. |
| deckStateManager | Pointer to the DeckStateManager |
| cardSizeSlider | Pointer to the QSlider used for dynamic font resizing. |
| rootCard | The root card for the widget. |
|
slot |
Adjusts the font size of the zone labels based on the slider value.
This method calculates the new font size as a percentage of the original font size based on the slider value and applies it to the zone label text.
| scalePercentage | The scale percentage from the slider. |
|
override |
Handles the event when the mouse enters the widget.
This method is triggered when the mouse enters the widget's area, allowing for updates or interactions such as UI feedback or layout changes.
| event | The event information for the mouse entry. |
| int AllZonesCardAmountWidget::getMainboardAmount | ( | ) |
Gets the card count in the mainboard zone.
| int AllZonesCardAmountWidget::getSideboardAmount | ( | ) |
Gets the card count in the sideboard zone.
| int AllZonesCardAmountWidget::getTokensboardAmount | ( | ) |
Gets the card count in the tokensboard zone.
| bool AllZonesCardAmountWidget::isNonZero | ( | ) |
Checks if the amount is at least one in either the mainboard or sideboard or tokensboard.
|
slot |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |