12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef DIEITEM_H
- #define DIEITEM_H
- #include <QGraphicsRectItem>
- #include <QColor>
- #include <QDebug>
- #include <QPen>
- #include <QMenu>
- #include <QGraphicsSceneContextMenuEvent>
- enum PICK_DIE_STATUS {
- DIE_EXIST,
- PICK_ING,
- NO_EXIST,
- SKIP_DIE,
- EDGE_DIE
- };
- 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);
- protected:
-
-
- private:
- int row, col;
- PICK_DIE_STATUS status;
- bool isSelected = false;
-
- QColor getColorByStatus(PICK_DIE_STATUS status);
-
-
- };
- #endif
|