Bond.h 761 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef BOND_H
  2. #define BOND_H
  3. #include <QApplication>
  4. #include <QWidget>
  5. #include <QPainter>
  6. #include <QMouseEvent>
  7. #include <vector>
  8. #include <QString>
  9. #include <QDebug>
  10. #include "CInterface.h"
  11. #include "BondGraphicsView.h"
  12. #include <QFrame>
  13. // 自定义绘制窗口类
  14. class Bond : public QWidget {
  15. public:
  16. Bond(int flag, QWidget *parent = nullptr);
  17. void paintInitFrom(QWidget *parent);
  18. QPixmap getGlobalPixmap() const;
  19. void initFrom(QWidget *parent);
  20. BondGraphicsView* view;
  21. QGraphicsScene* scene;
  22. private slots:
  23. void handleLayerRightClicked(int layer);
  24. protected:
  25. void paintEvent(QPaintEvent *event) override;
  26. private:
  27. MATERIAL_BOX_STRUCT boxes; // 所有料盒的数据
  28. QPixmap globalPixmap;
  29. };
  30. #endif // BOND_H