123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #ifndef GROUP_H
- #define GROUP_H
- #include <QWidget>
- #include <QtWidgets/QComboBox>
- #include "CameraMaterialGroupWnd/MaterialWindow/Wafer.h"
- #include "CameraMaterialGroupWnd/MaterialWindow/Waffle.h"
- #include "CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h"
- namespace Ui {
- class Group;
- }
- class Group : public QWidget
- {
- Q_OBJECT
- public:
- // 相机ID 实时图片 物料窗口类型 下拉框文本
- explicit Group(int Id, const QString& imagePath1, int MaterialWindowType, const QStringList& textList, QWidget* parent);
- ~Group();
- void initForm();
- bool eventFilter(QObject *obj, QEvent *event);
- void saveGroupSettings(int Id, const QString& imagePath1, int materialWndType, const QStringList& textList);
- void saveBorderSettings(); // 新增:保存边框颜色信息
- void loadBorderSettings(); // 新增:加载边框颜色信息
- void recordBorderInfo(int groupId, const QString& side);
- QString getBlueBorderStyle();
- void setDatacomboBox(int index);
- signals:
- void send_button_Signal();
- void send_ComboBox_singal(int groupId,int index);
- void groupSelected(Group* group, int index);
- public slots:
- void Changedstyle();
- void onclickbutton();
- void on_DatacomboBox_currentIndexChanged(int index);
- void onGroupSelected(Group* group, int index);
- protected:
- void showEvent(QShowEvent *event) override;
- void hideEvent(QHideEvent *event) override;
- void check_selected(int index);
- void WaferWidget(); // 圆晶
- void WaffleWidget(); // 华夫盒
- void MaterialBoxWidget(); // 料盒
- private:
- Ui::Group *ui;
- int currentGroupId;
- Wafer *wafer; // 声明Wafer指针
- Waffle *waffle; // 声明Waffle指针
- MaterialBox *materialbox; // 声明materialbox指针
- static Group* currentlySelectedGroup; // 当前选中(红色边框)的实例
- static Group* previouslySelectedBlueGroup; // 上一次选中且边框为蓝色的实例
- static Group* lastClickedGroup; // 上一次点击的实例
- static int lastClickedIndex; // 上一次点击的索引
- static int lastSavedIndex; // 上次保存的索引
- int groupId; // 新增:记录当前 Group 的 ID
- };
- #endif // GROUP_H
|