Cockatrice 2026-10-19-Development-3.1.2-beta.2
A 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 <QPixmap>
12#include <QWidget>
14#include <qtmetamacros.h>
15
16class QSize;
17
18class CardInfoPictureEnlargedWidget final : public QWidget
19{
20 Q_OBJECT
21
22public:
23 // Constructor
24 explicit CardInfoPictureEnlargedWidget(QWidget *parent = nullptr);
25
26 // Sets the card pixmap to display
27 void setCardPixmap(const ExactCard &_card, QSize size);
28
29protected:
30 // Handles the painting event for the enlarged card
31 void paintEvent(QPaintEvent *event) override;
32
33private:
34 // Cached pixmap for the enlarged card
36
37 // Tracks if the pixmap needs to be refreshed/redrawn
39
40 // Card information
42
43 // Loads the enlarged card pixmap
44 void loadPixmap(const QSize &size);
45};
46
47#endif // CARD_PICTURE_ENLARGED_WIDGET_H
ExactCard card
Definition card_info_picture_enlarged_widget.h:41
bool pixmapDirty
Definition card_info_picture_enlarged_widget.h:38
QPixmap enlargedPixmap
Definition card_info_picture_enlarged_widget.h:35
void loadPixmap(const QSize &size)
Loads the pixmap based on the given size and card information.
Definition card_info_picture_enlarged_widget.cpp:43
CardInfoPictureEnlargedWidget(QWidget *parent=nullptr)
Constructs a CardPictureEnlargedWidget.
Definition card_info_picture_enlarged_widget.cpp:23
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:66
void paintEvent(QPaintEvent *event) override
Custom paint event that draws the enlarged card image with rounded corners.
Definition card_info_picture_enlarged_widget.cpp:97
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:24