#include <all_zones_card_amount_widget.h>
|
| void | adjustFontSize (int scalePercentage) |
| | Adjusts the font size of the zone labels based on the slider value.
|
| void | setAmounts (int mainboardAmount, int sideboardAmount) |
◆ AllZonesCardAmountWidget()
| AllZonesCardAmountWidget::AllZonesCardAmountWidget |
( |
QWidget * | parent, |
|
|
DeckStateManager * | deckStateManager, |
|
|
QSlider * | cardSizeSlider, |
|
|
const ExactCard & | rootCard ) |
|
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 both the mainboard and sideboard zones.
- Parameters
-
| 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. |
◆ adjustFontSize
| void AllZonesCardAmountWidget::adjustFontSize |
( |
int | scalePercentage | ) |
|
|
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.
- Parameters
-
| scalePercentage | The scale percentage from the slider. |
◆ enterEvent()
| void AllZonesCardAmountWidget::enterEvent |
( |
QEnterEvent * | event | ) |
|
|
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.
- Parameters
-
| event | The event information for the mouse entry. |
◆ getMainboardAmount()
| int AllZonesCardAmountWidget::getMainboardAmount |
( |
| ) |
|
Gets the card count in the mainboard zone.
- Returns
- The number of cards in the mainboard.
◆ getSideboardAmount()
| int AllZonesCardAmountWidget::getSideboardAmount |
( |
| ) |
|
Gets the card count in the sideboard zone.
- Returns
- The number of cards in the sideboard.
◆ isNonZero()
| bool AllZonesCardAmountWidget::isNonZero |
( |
| ) |
|
Checks if the amount is at least one in either the mainboard or sideboard.
◆ setAmounts
| void AllZonesCardAmountWidget::setAmounts |
( |
int | mainboardAmount, |
|
|
int | sideboardAmount ) |
|
slot |
◆ buttonBoxMainboard
◆ buttonBoxSideboard
◆ cardSizeSlider
| QSlider* AllZonesCardAmountWidget::cardSizeSlider |
|
private |
◆ layout
| QVBoxLayout* AllZonesCardAmountWidget::layout |
|
private |
◆ zoneLabelMainboard
| QLabel* AllZonesCardAmountWidget::zoneLabelMainboard |
|
private |
◆ zoneLabelSideboard
| QLabel* AllZonesCardAmountWidget::zoneLabelSideboard |
|
private |
The documentation for this class was generated from the following files: