Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
printing_selector_card_overlay_widget.h
Go to the documentation of this file.
1
6
7#ifndef PRINTING_SELECTOR_CARD_OVERLAY_WIDGET_H
8#define PRINTING_SELECTOR_CARD_OVERLAY_WIDGET_H
9
13
15
17{
18 Q_OBJECT
19
20public:
21 explicit PrintingSelectorCardOverlayWidget(QWidget *parent,
22 AbstractTabDeckEditor *_deckEditor,
23 DeckStateManager *_deckStateManager,
24 QSlider *_cardSizeSlider,
25 const ExactCard &_rootCard);
26
27protected:
28 void resizeEvent(QResizeEvent *event) override;
29 void enterEvent(QEnterEvent *event) override;
30 void leaveEvent(QEvent *event) override;
31 void mousePressEvent(QMouseEvent *event) override;
32 void customMenu(QPoint point);
33
34signals:
36
37public slots:
38 void updateCardAmounts(int mainboardAmount, int sideboardAmount, int tokensboardAmount);
39
40private slots:
41 void updateVisibility();
43
44private:
45 void initializePinBadge();
48 QLabel *pinBadge = nullptr;
51};
52
53#endif // PRINTING_SELECTOR_CARD_OVERLAY_WIDGET_H
Defines the AbstractTabDeckEditor class, which provides a base for deck editor tabs in the applicatio...
AbstractTabDeckEditor is the base class for all deck editor tabs.
Definition abstract_tab_deck_editor.h:94
Definition all_zones_card_amount_widget.h:17
Widget that displays an enlarged image of a card, loading the image based on the card's info or showi...
Definition card_info_picture_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
ExactCard rootCard
Definition printing_selector_card_overlay_widget.h:50
QLabel * pinBadge
Definition printing_selector_card_overlay_widget.h:48
void updatePinBadgeVisibility()
Updates the pin badge visibility and position based on the card's pinned state.
Definition printing_selector_card_overlay_widget.cpp:148
void updateCardAmounts(int mainboardAmount, int sideboardAmount, int tokensboardAmount)
Definition printing_selector_card_overlay_widget.cpp:117
CardInfoPictureWidget * cardInfoPicture
Definition printing_selector_card_overlay_widget.h:46
AbstractTabDeckEditor * deckEditor
Definition printing_selector_card_overlay_widget.h:49
void mousePressEvent(QMouseEvent *event) override
Handles the mouse press event for right-clicks to show the context menu.
Definition printing_selector_card_overlay_widget.cpp:76
AllZonesCardAmountWidget * allZonesCardAmountWidget
Definition printing_selector_card_overlay_widget.h:47
void resizeEvent(QResizeEvent *event) override
Resizes the overlay widget to match the card's size.
Definition printing_selector_card_overlay_widget.cpp:93
void customMenu(QPoint point)
Creates and shows a custom context menu when the right mouse button is clicked.
Definition printing_selector_card_overlay_widget.cpp:196
void updateVisibility()
Sets the visibility of the widgets depending on the amounts and whether the mouse is hovering over.
Definition printing_selector_card_overlay_widget.cpp:128
void enterEvent(QEnterEvent *event) override
Handles the mouse enter event when the cursor enters the overlay widget area.
Definition printing_selector_card_overlay_widget.cpp:110
void leaveEvent(QEvent *event) override
Handles the mouse leave event when the cursor leaves the overlay widget area.
Definition printing_selector_card_overlay_widget.cpp:181
PrintingSelectorCardOverlayWidget(QWidget *parent, AbstractTabDeckEditor *_deckEditor, DeckStateManager *_deckStateManager, QSlider *_cardSizeSlider, const ExactCard &_rootCard)
Constructs a PrintingSelectorCardOverlayWidget for displaying a card overlay.
Definition printing_selector_card_overlay_widget.cpp:31
void initializePinBadge()
Initializes the pin badge overlay and loads its icon with DPI-aware rasterization.
Definition printing_selector_card_overlay_widget.cpp:248