mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-13 13:30:00 -08:00
Continuumatrice: render interactive public piles with themed icons
This commit is contained in:
parent
f87b4eeeac
commit
d6070c5c96
1 changed files with 9 additions and 1 deletions
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
#include "card_zone.h"
|
#include "card_zone.h"
|
||||||
|
|
||||||
|
#include <QPixmap>
|
||||||
|
#include <QString>
|
||||||
#include <qtmetamacros.h>
|
#include <qtmetamacros.h>
|
||||||
|
|
||||||
class PileZoneLogic;
|
class PileZoneLogic;
|
||||||
|
|
@ -21,6 +23,11 @@ class QGraphicsItem;
|
||||||
class PileZone : public CardZone
|
class PileZone : public CardZone
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
private:
|
||||||
|
QString customDisplayName;
|
||||||
|
QString customIconAsset;
|
||||||
|
QPixmap customIconPixmap;
|
||||||
|
void reloadCustomIcon();
|
||||||
private slots:
|
private slots:
|
||||||
void callUpdate()
|
void callUpdate()
|
||||||
{
|
{
|
||||||
|
|
@ -28,7 +35,8 @@ private slots:
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PileZone(PileZoneLogic *_logic, QGraphicsItem *parent);
|
PileZone(PileZoneLogic *_logic, QGraphicsItem *parent,
|
||||||
|
const QString &displayName = {}, const QString &iconAsset = {});
|
||||||
[[nodiscard]] QRectF boundingRect() const override;
|
[[nodiscard]] QRectF boundingRect() const override;
|
||||||
[[nodiscard]] QPainterPath shape() const override;
|
[[nodiscard]] QPainterPath shape() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue