mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 17:44:01 -07:00
Rework card menu handling (#6069)
* extract cardMenu from CardItem * move cardMenu saving to TabGame * delete TabGame::updateCardMenu * move checking to updateCardMenu * unset activeCard when all cards are unselected
This commit is contained in:
parent
1649f30389
commit
03bebbe4c2
6 changed files with 106 additions and 123 deletions
|
|
@ -33,8 +33,6 @@ private:
|
|||
CardItem *attachedTo;
|
||||
QList<CardItem *> attachedCards;
|
||||
|
||||
QMenu *cardMenu, *ptMenu, *moveMenu;
|
||||
|
||||
void prepareDelete();
|
||||
void handleClickedToPlay(bool shiftHeld);
|
||||
public slots:
|
||||
|
|
@ -54,7 +52,7 @@ public:
|
|||
const CardRef &cardRef = {},
|
||||
int _cardid = -1,
|
||||
CardZone *_zone = nullptr);
|
||||
~CardItem() override;
|
||||
|
||||
void retranslateUi();
|
||||
CardZone *getZone() const
|
||||
{
|
||||
|
|
@ -135,19 +133,6 @@ public:
|
|||
void resetState(bool keepAnnotations = false);
|
||||
void processCardInfo(const ServerInfo_Card &_info);
|
||||
|
||||
QMenu *getCardMenu() const
|
||||
{
|
||||
return cardMenu;
|
||||
}
|
||||
QMenu *getPTMenu() const
|
||||
{
|
||||
return ptMenu;
|
||||
}
|
||||
QMenu *getMoveMenu() const
|
||||
{
|
||||
return moveMenu;
|
||||
}
|
||||
|
||||
bool animationEvent();
|
||||
CardDragItem *createDragItem(int _id, const QPointF &_pos, const QPointF &_scenePos, bool faceDown);
|
||||
void deleteDragItem();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue