Cockatrice
2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Toggle main menu visibility
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>
13
#include <
libcockatrice/card/printing/exact_card.h
>
14
#include <qtmetamacros.h>
15
16
class
QSize;
17
18
class
CardInfoPictureEnlargedWidget
final :
public
QWidget
19
{
20
Q_OBJECT
21
22
public
:
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
29
protected
:
30
// Handles the painting event for the enlarged card
31
void
paintEvent
(QPaintEvent *event)
override
;
32
33
private
:
34
// Cached pixmap for the enlarged card
35
QPixmap
enlargedPixmap
;
36
37
// Tracks if the pixmap needs to be refreshed/redrawn
38
bool
pixmapDirty
;
39
40
// Card information
41
ExactCard
card
;
42
43
// Loads the enlarged card pixmap
44
void
loadPixmap
(
const
QSize &size);
45
};
46
47
#endif
// CARD_PICTURE_ENLARGED_WIDGET_H
CardInfoPictureEnlargedWidget::card
ExactCard card
Definition
card_info_picture_enlarged_widget.h:41
CardInfoPictureEnlargedWidget::pixmapDirty
bool pixmapDirty
Definition
card_info_picture_enlarged_widget.h:38
CardInfoPictureEnlargedWidget::enlargedPixmap
QPixmap enlargedPixmap
Definition
card_info_picture_enlarged_widget.h:35
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:43
CardInfoPictureEnlargedWidget::CardInfoPictureEnlargedWidget
CardInfoPictureEnlargedWidget(QWidget *parent=nullptr)
Constructs a CardPictureEnlargedWidget.
Definition
card_info_picture_enlarged_widget.cpp:23
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:66
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:97
ExactCard
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition
exact_card.h:24
exact_card.h
cockatrice
src
interface
widgets
cards
card_info_picture_enlarged_widget.h
Generated by
1.18.0