Cockatrice 2025-11-30-Development-2.11.0-beta.38
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,
23 QTreeView *deckView,
24 QSlider *cardSizeSlider,
25 const ExactCard &rootCard);
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
37private:
38 QVBoxLayout *layout;
41 QTreeView *deckView;
48};
49
50#endif // ALL_ZONES_CARD_AMOUNT_WIDGET_H
TODO: Document this.
AbstractTabDeckEditor is the base class for all deck editor tabs.
Definition abstract_tab_deck_editor.h:92
CardAmountWidget * buttonBoxSideboard
Definition all_zones_card_amount_widget.h:47
QSlider * cardSizeSlider
Definition all_zones_card_amount_widget.h:42
DeckListModel * deckModel
Definition all_zones_card_amount_widget.h:40
AbstractTabDeckEditor * deckEditor
Definition all_zones_card_amount_widget.h:39
CardAmountWidget * buttonBoxMainboard
Definition all_zones_card_amount_widget.h:45
QVBoxLayout * layout
Definition all_zones_card_amount_widget.h:38
void enterEvent(QEnterEvent *event) override
Handles the event when the mouse enters the widget.
Definition all_zones_card_amount_widget.cpp:111
AllZonesCardAmountWidget(QWidget *parent, AbstractTabDeckEditor *deckEditor, DeckListModel *deckModel, QTreeView *deckView, QSlider *cardSizeSlider, const ExactCard &rootCard)
Constructor for the AllZonesCardAmountWidget class.
Definition all_zones_card_amount_widget.cpp:20
int getSideboardAmount()
Gets the card count in the sideboard zone.
Definition all_zones_card_amount_widget.cpp:97
QLabel * zoneLabelSideboard
Definition all_zones_card_amount_widget.h:46
int getMainboardAmount()
Gets the card count in the mainboard zone.
Definition all_zones_card_amount_widget.cpp:87
QLabel * zoneLabelMainboard
Definition all_zones_card_amount_widget.h:44
ExactCard rootCard
Definition all_zones_card_amount_widget.h:43
QTreeView * deckView
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:63
Definition card_amount_widget.h:22
Qt model representing a decklist for use in views (tree/table).
Definition deck_list_model.h:200
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:19
TODO: Document this.