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>
12
#include <
libcockatrice/card/printing/exact_card.h
>
13
14
class
CardInfoPictureEnlargedWidget
final :
public
QWidget
15
{
16
Q_OBJECT
17
18
public
:
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
25
protected
:
26
// Handles the painting event for the enlarged card
27
void
paintEvent
(QPaintEvent *event)
override
;
28
29
private
:
30
// Cached pixmap for the enlarged card
31
QPixmap
enlargedPixmap
;
32
33
// Tracks if the pixmap needs to be refreshed/redrawn
34
bool
pixmapDirty
;
35
36
// Card information
37
ExactCard
card
;
38
39
// Loads the enlarged card pixmap
40
void
loadPixmap
(
const
QSize &size);
41
};
42
43
#endif
// CARD_PICTURE_ENLARGED_WIDGET_H
CardInfoPictureEnlargedWidget::card
ExactCard card
Definition
card_info_picture_enlarged_widget.h:37
CardInfoPictureEnlargedWidget::pixmapDirty
bool pixmapDirty
Definition
card_info_picture_enlarged_widget.h:34
CardInfoPictureEnlargedWidget::enlargedPixmap
QPixmap enlargedPixmap
Definition
card_info_picture_enlarged_widget.h:31
CardInfoPictureEnlargedWidget::loadPixmap
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::CardInfoPictureEnlargedWidget
CardInfoPictureEnlargedWidget(QWidget *parent=nullptr)
Constructs a CardPictureEnlargedWidget.
Definition
card_info_picture_enlarged_widget.cpp:15
CardInfoPictureEnlargedWidget::setCardPixmap
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
CardInfoPictureEnlargedWidget::paintEvent
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
ExactCard
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition
exact_card.h:19
exact_card.h
cockatrice
src
interface
widgets
cards
card_info_picture_enlarged_widget.h
Generated by
1.14.0