Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
exact_card.h
Go to the documentation of this file.
1#ifndef EXACT_CARD_H
2#define EXACT_CARD_H
3
4#include "../card_info.h"
5
19{
22
23public:
30 ExactCard();
31
38 explicit ExactCard(const CardInfoPtr &_card, const PrintingInfo &_printing = PrintingInfo());
39
45 [[nodiscard]] CardInfoPtr getCardPtr() const
46 {
47 return card;
48 }
49
55 [[nodiscard]] PrintingInfo getPrinting() const
56 {
57 return printing;
58 }
59
66 bool operator==(const ExactCard &other) const;
67
73 [[nodiscard]] QString getName() const;
74
84 [[nodiscard]] const CardInfo &getInfo() const;
85
92 [[nodiscard]] QString getPixmapCacheKey() const;
93
100 [[nodiscard]] bool isEmpty() const;
101
107 explicit operator bool() const;
108
115 void emitPixmapUpdated() const;
116};
117
118#endif // EXACT_CARD_H
QSharedPointer< CardInfo > CardInfoPtr
Definition card_info.cpp:20
Represents a card and its associated metadata, properties, and relationships.
Definition card_info.h:46
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:19
bool operator==(const ExactCard &other) const
Compares both card pointer and printing for equality.
Definition exact_card.cpp:23
QString getPixmapCacheKey() const
Generates a stable cache key for pixmap caching.
Definition exact_card.cpp:53
const CardInfo & getInfo() const
Returns a reference to the underlying CardInfo object.
Definition exact_card.cpp:41
CardInfoPtr getCardPtr() const
Returns the underlying CardInfoPtr.
Definition exact_card.h:45
QString getName() const
Convenience helper to get the card's display name.
Definition exact_card.cpp:32
PrintingInfo printing
Definition exact_card.h:21
void emitPixmapUpdated() const
Emits the pixmapUpdated signal on the underlying CardInfo.
Definition exact_card.cpp:79
PrintingInfo getPrinting() const
Returns the printing information associated with this card.
Definition exact_card.h:55
CardInfoPtr card
Definition exact_card.h:20
ExactCard()
Constructs an empty ExactCard.
Definition exact_card.cpp:11
bool isEmpty() const
Indicates whether this ExactCard represents no valid card.
Definition exact_card.cpp:63
Represents metadata for a specific variation of a card within a set.
Definition printing_info.h:27