Group.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef GROUP_H
  2. #define GROUP_H
  3. #include <QWidget>
  4. #include <QtWidgets/QComboBox>
  5. #include "CameraMaterialGroupWnd/MaterialWindow/Wafer.h"
  6. #include "CameraMaterialGroupWnd/MaterialWindow/Waffle.h"
  7. #include "CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h"
  8. namespace Ui {
  9. class Group;
  10. }
  11. class Group : public QWidget
  12. {
  13. Q_OBJECT
  14. public:
  15. // 相机ID 实时图片 物料窗口类型 下拉框文本
  16. explicit Group(int Id, const QString& imagePath1, int MaterialWindowType, const QStringList& textList, QWidget* parent);
  17. ~Group();
  18. void initForm();
  19. bool eventFilter(QObject *obj, QEvent *event);
  20. void saveGroupSettings(int Id, const QString& imagePath1, int materialWndType, const QStringList& textList);
  21. void saveBorderSettings(); // 新增:保存边框颜色信息
  22. void loadBorderSettings(); // 新增:加载边框颜色信息
  23. void recordBorderInfo(int groupId, const QString& side);
  24. QString getBlueBorderStyle();
  25. void setDatacomboBox(int index);
  26. signals:
  27. void send_button_Signal();
  28. void send_ComboBox_singal(int groupId,int index);
  29. void SendGroupSelectedSignals(Group* group, int index);
  30. /**当前选中了哪一个
  31. */
  32. void SetCurrentSelectSig(int groupId,int nIndex);
  33. /**相机图像转发
  34. */
  35. void SetUpDataImageShowSig(const QPixmap& imageData);
  36. public slots:
  37. void Changedstyle();
  38. void onclickbutton();
  39. void on_DatacomboBox_currentIndexChanged(int index);
  40. void GetGroupSelectedSlots(Group* group, int index);
  41. void UpDataImageShowSlots(const QPixmap& imageData);
  42. protected:
  43. void showEvent(QShowEvent *event) override;
  44. void hideEvent(QHideEvent *event) override;
  45. void check_selected(int index);
  46. void WaferWidget(); // 圆晶
  47. void WaffleWidget(); // 华夫盒
  48. void MaterialBoxWidget(); // 料盒
  49. private:
  50. Ui::Group *ui;
  51. int m_nCurrentGroupId;
  52. Wafer * m_pWafer; // 声明Wafer指针
  53. Waffle * m_pWaffle; // 声明Waffle指针
  54. MaterialBox * m_pMaterialbox; // 声明materialbox指针
  55. static Group* m_pCurrentlySelectedGroup; // 当前选中(红色边框)的实例
  56. static Group* m_pPreviouslySelectedBlueGroup; // 上一次选中且边框为蓝色的实例
  57. static Group* m_pLastClickedGroup; // 上一次点击的实例
  58. static int m_stnLastClickedIndex; // 上一次点击的索引
  59. static int m_stnLastSavedIndex; // 上次保存的索引
  60. public:
  61. int m_nGroupId; // 新增:记录当前 Group 的 ID
  62. };
  63. #endif // GROUP_H