Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
card_info_picture_enlarged_widget.h
Go to the documentation of this file.
1
7
8#ifndef CARD_PICTURE_ENLARGED_WIDGET_H
9#define CARD_PICTURE_ENLARGED_WIDGET_H
10
11#include <QWidget>
13
14class CardInfoPictureEnlargedWidget final : public QWidget
15{
16 Q_OBJECT
17
18public:
19 // Constructor
20 explicit CardInfoPictureEnlargedWidget(QWidget *parent = nullptr);
21
22 // Sets the card pixmap to display
23 void setCardPixmap(const ExactCard &_card, QSize size);
24
25protected:
26 // Handles the painting event for the enlarged card
27 void paintEvent(QPaintEvent *event) override;
28
29private:
30 // Cached pixmap for the enlarged card
32
33 // Tracks if the pixmap needs to be refreshed/redrawn
35
36 // Card information
38
39 // Loads the enlarged card pixmap
40 void loadPixmap(const QSize &size);
41};
42
43#endif // CARD_PICTURE_ENLARGED_WIDGET_H
ExactCard card
Definition card_info_picture_enlarged_widget.h:37
bool pixmapDirty
Definition card_info_picture_enlarged_widget.h:34
QPixmap enlargedPixmap
Definition card_info_picture_enlarged_widget.h:31
void loadPixmap(const QSize &size)
Loads the pixmap based on the given size and card information.
Definition card_info_picture_enlarged_widget.cpp:34
CardInfoPictureEnlargedWidget(QWidget *parent=nullptr)
Constructs a CardPictureEnlargedWidget.
Definition card_info_picture_enlarged_widget.cpp:15
void setCardPixmap(const ExactCard &_card, QSize size)
Sets the pixmap for the widget based on a provided card.
Definition card_info_picture_enlarged_widget.cpp:51
void paintEvent(QPaintEvent *event) override
Custom paint event that draws the enlarged card image with rounded corners.
Definition card_info_picture_enlarged_widget.cpp:68
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:19