123456789101112131415161718192021222324252627282930313233343536373839 |
- #ifndef DIEITEM_H
- #define DIEITEM_H
- #pragma once
- #include <QGraphicsRectItem>
- #include <QColor>
- #include <QDebug>
- #include <QPen>
- #include <QMenu>
- #include <QGraphicsSceneContextMenuEvent>
- #include "CInterface.h"
- class DieItem : public QObject, public QGraphicsRectItem {
- public:
- DieItem(int row, int col, PICK_DIE_STATUS status, qreal size, QGraphicsItem* parent = nullptr);
-
- int getRow() const;
- int getCol() const;
- void setSelected(bool selected);
- void setLeftSelected(bool selected);
- void setRightSelected(bool selected);
- protected:
-
-
- private:
- int row, col;
- PICK_DIE_STATUS status;
- bool isSelected = false;
-
- QColor getColorByStatus(PICK_DIE_STATUS status);
- };
- #endif
|