mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 18:43:55 -07:00
minor performance improvements, removed explicit font size setting
This commit is contained in:
parent
eea75078ac
commit
64c3c0984e
8 changed files with 95 additions and 87 deletions
|
|
@ -3,12 +3,17 @@
|
|||
|
||||
#include <QGraphicsScene>
|
||||
#include <QList>
|
||||
#include <QPointer>
|
||||
#include <QSet>
|
||||
|
||||
class Player;
|
||||
class ZoneViewWidget;
|
||||
class CardZone;
|
||||
class AbstractCardItem;
|
||||
class CardItem;
|
||||
class ServerInfo_Card;
|
||||
class PhasesToolbar;
|
||||
class QBasicTimer;
|
||||
|
||||
class GameScene : public QGraphicsScene {
|
||||
Q_OBJECT
|
||||
|
|
@ -20,8 +25,13 @@ private:
|
|||
QRectF playersRect;
|
||||
QList<ZoneViewWidget *> views;
|
||||
QSize viewSize;
|
||||
QPointer<CardItem> hoveredCard;
|
||||
QBasicTimer *animationTimer;
|
||||
QSet<CardItem *> cardsToAnimate;
|
||||
void updateHover(const QPointF &scenePos);
|
||||
public:
|
||||
GameScene(PhasesToolbar *_phasesToolbar, QObject *parent = 0);
|
||||
~GameScene();
|
||||
void retranslateUi();
|
||||
const QRectF &getPlayersRect() const { return playersRect; }
|
||||
void processViewSizeChange(const QSize &newSize);
|
||||
|
|
@ -29,6 +39,8 @@ public:
|
|||
void startRubberBand(const QPointF &selectionOrigin);
|
||||
void resizeRubberBand(const QPointF &cursorPoint);
|
||||
void stopRubberBand();
|
||||
|
||||
void registerAnimationItem(AbstractCardItem *item);
|
||||
public slots:
|
||||
void toggleZoneView(Player *player, const QString &zoneName, int numberCards);
|
||||
void addRevealedZoneView(Player *player, CardZone *zone, const QList<ServerInfo_Card *> &cardList);
|
||||
|
|
@ -40,6 +52,7 @@ public slots:
|
|||
void rearrange();
|
||||
protected:
|
||||
bool event(QEvent *event);
|
||||
void timerEvent(QTimerEvent *event);
|
||||
signals:
|
||||
void sigStartRubberBand(const QPointF &selectionOrigin);
|
||||
void sigResizeRubberBand(const QPointF &cursorPoint);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue