#include <card_amount_widget.h>
|
| void | setAmount (int _amount) |
| void | updateCardCount () |
| | Updates the card count display in the widget.
|
| void | addPrinting (const QString &zone) |
| | Adds a printing of the card to the specified zone (Mainboard or Sideboard).
|
|
| void | paintEvent (QPaintEvent *event) override |
| | Handles the painting of the widget, drawing a semi-transparent background.
|
| void | showEvent (QShowEvent *event) override |
◆ CardAmountWidget()
| CardAmountWidget::CardAmountWidget |
( |
QWidget * | parent, |
|
|
DeckStateManager * | deckStateManager, |
|
|
QSlider * | cardSizeSlider, |
|
|
const ExactCard & | rootCard, |
|
|
const QString & | zoneName ) |
|
explicit |
Constructs a widget for displaying and controlling the card count in a specific zone.
- Parameters
-
| parent | The parent widget. |
| cardSizeSlider | Pointer to the QSlider for adjusting font size. |
| rootCard | The root card to manage within the widget. |
| zoneName | The zone name (e.g., DECK_ZONE_MAIN or DECK_ZONE_SIDE). |
◆ addPrinting
| void CardAmountWidget::addPrinting |
( |
const QString & | zone | ) |
|
|
slot |
Adds a printing of the card to the specified zone (Mainboard or Sideboard).
- Parameters
-
| zone | The zone to add the card to (DECK_ZONE_MAIN or DECK_ZONE_SIDE). |
◆ addPrintingMainboard
| void CardAmountWidget::addPrintingMainboard |
( |
| ) |
|
|
privateslot |
Adds a printing to the mainboard zone.
◆ addPrintingSideboard
| void CardAmountWidget::addPrintingSideboard |
( |
| ) |
|
|
privateslot |
Adds a printing to the sideboard zone.
◆ adjustFontSize
| void CardAmountWidget::adjustFontSize |
( |
int | scalePercentage | ) |
|
|
privateslot |
Adjusts the font size of the card count label based on the slider value.
- Parameters
-
| scalePercentage | The percentage value from the slider for scaling the font size. |
< Minimum font size
< Maximum font size
< Scale at 100%
◆ deckModified
| void CardAmountWidget::deckModified |
( |
const QString & | modificationReason | ) |
|
|
signal |
◆ decrementCardHelper()
| void CardAmountWidget::decrementCardHelper |
( |
const QString & | zone | ) |
|
|
private |
Helper function to decrement the card count for a given zone.
- Parameters
-
| zone | The zone from which to remove the card (DECK_ZONE_MAIN or DECK_ZONE_SIDE). |
◆ getAmount()
| int CardAmountWidget::getAmount |
( |
| ) |
|
◆ paintEvent()
| void CardAmountWidget::paintEvent |
( |
QPaintEvent * | event | ) |
|
|
overrideprotected |
Handles the painting of the widget, drawing a semi-transparent background.
- Parameters
-
◆ removePrintingMainboard
| void CardAmountWidget::removePrintingMainboard |
( |
| ) |
|
|
privateslot |
Removes a printing from the mainboard zone.
◆ removePrintingSideboard
| void CardAmountWidget::removePrintingSideboard |
( |
| ) |
|
|
privateslot |
Removes a printing from the sideboard zone.
◆ setAmount
| void CardAmountWidget::setAmount |
( |
int | _amount | ) |
|
|
slot |
◆ showEvent()
| void CardAmountWidget::showEvent |
( |
QShowEvent * | event | ) |
|
|
overrideprotected |
◆ updateCardCount
| void CardAmountWidget::updateCardCount |
( |
| ) |
|
|
slot |
Updates the card count display in the widget.
◆ amount
| int CardAmountWidget::amount = 0 |
|
private |
◆ cardCountInZone
| QLabel* CardAmountWidget::cardCountInZone |
|
private |
◆ cardSizeSlider
| QSlider* CardAmountWidget::cardSizeSlider |
|
private |
◆ deckStateManager
◆ decrementButton
◆ hovered
| bool CardAmountWidget::hovered |
|
private |
◆ incrementButton
◆ layout
| QHBoxLayout* CardAmountWidget::layout |
|
private |
◆ rootCard
◆ zoneName
| QString CardAmountWidget::zoneName |
|
private |
The documentation for this class was generated from the following files: