mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-29 10:03:55 -07:00
add a bunch of parents to dialogs (#3658)
* add a bunch of parents to dialogs works on #3651 * use game as parent instead * add more parents * fix create token dialog modality * add parent to game information window * replace a bunch of nullptrs with the magic of sed * add parent to tip of the day and counters * reorder game ptr * set parent for life counter * clangify
This commit is contained in:
parent
7072f24103
commit
c874f201c3
66 changed files with 144 additions and 111 deletions
|
|
@ -12,7 +12,12 @@ class PlayerCounter : public AbstractCounter
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PlayerCounter(Player *_player, int _id, const QString &_name, int _value, QGraphicsItem *parent = 0);
|
||||
PlayerCounter(Player *_player,
|
||||
int _id,
|
||||
const QString &_name,
|
||||
int _value,
|
||||
QGraphicsItem *parent = nullptr,
|
||||
QWidget *game = nullptr);
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
};
|
||||
|
|
@ -23,6 +28,7 @@ class PlayerTarget : public ArrowTarget
|
|||
private:
|
||||
QPixmap fullPixmap;
|
||||
PlayerCounter *playerCounter;
|
||||
QWidget *game;
|
||||
public slots:
|
||||
void counterDeleted();
|
||||
|
||||
|
|
@ -36,7 +42,7 @@ public:
|
|||
return Type;
|
||||
}
|
||||
|
||||
PlayerTarget(Player *_player = 0, QGraphicsItem *parentItem = 0);
|
||||
PlayerTarget(Player *_player = nullptr, QGraphicsItem *parentItem = nullptr, QWidget *_game = nullptr);
|
||||
~PlayerTarget();
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue