#ifndef SQUARETRAYBUTTON_H #define SQUARETRAYBUTTON_H #include class SquareTrayButton : public QAbstractButton { public: explicit SquareTrayButton(int trayIndex, int loadedCount, QWidget *parent = nullptr); void setTrayInfo(int trayId, const QString &code, int loadedCount, const QString &status, bool present); void setPlanned(bool planned); QSize sizeHint() const override; QSize minimumSizeHint() const override; protected: void paintEvent(QPaintEvent *event) override; private: int m_trayId; bool m_planned; }; #endif // SQUARETRAYBUTTON_H