Cockatrice 2026-01-14-Development-2.11.0-beta.46
A cross-platform 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#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
30 void enterEvent(QEnterEvent *event) override;
31#else
32 void enterEvent(QEvent *event) override;
33#endif
34 void leaveEvent(QEvent *event) override;
35 void mousePressEvent(QMouseEvent *event) override;
36 void customMenu(QPoint point);
37
38signals:
40
41public slots:
42 void updateCardAmounts(int mainboardAmount, int sideboardAmount);
43
44private slots:
45 void updateVisibility();
47
48private:
49 void initializePinBadge();
52 QLabel *pinBadge = nullptr;
55};
56
57#endif // PRINTING_SELECTOR_CARD_OVERLAY_WIDGET_H
Defines the AbstractTabDeckEditor class, which provides a base for deck editor tabs in the applicatio...
TODO: Document this.
AbstractTabDeckEditor is the base class for all deck editor tabs.
Definition abstract_tab_deck_editor.h:93
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:54
QLabel * pinBadge
Definition printing_selector_card_overlay_widget.h:52
void updatePinBadgeVisibility()
Updates the pin badge visibility and position based on the card's pinned state.
Definition printing_selector_card_overlay_widget.cpp:154
CardInfoPictureWidget * cardInfoPicture
Definition printing_selector_card_overlay_widget.h:50
void updateCardAmounts(int mainboardAmount, int sideboardAmount)
Definition printing_selector_card_overlay_widget.cpp:125
AbstractTabDeckEditor * deckEditor
Definition printing_selector_card_overlay_widget.h:53
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:80
AllZonesCardAmountWidget * allZonesCardAmountWidget
Definition printing_selector_card_overlay_widget.h:51
void resizeEvent(QResizeEvent *event) override
Resizes the overlay widget to match the card's size.
Definition printing_selector_card_overlay_widget.cpp:97
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:201
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:134
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:115
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:186
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:29
void initializePinBadge()
Initializes the pin badge overlay and loads its icon with DPI-aware rasterization.
Definition printing_selector_card_overlay_widget.cpp:253