12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #pragma once
- #ifndef SINGLECAMERAOPERATIONWND_H
- #define SINGLECAMERAOPERATIONWND_H
- #include <QMainWindow>
- #include <QSlider>
- #include <QLineEdit>
- #include "CameraMaterialGroupWnd/MaterialWindow/Wafer.h"
- #include "CameraMaterialGroupWnd/MaterialWindow/Waffle.h"
- #include "CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h"
- #include "CameraDataHandleAndShow.h"
- #include "CameraMaterialGroupWnd/CameraImage/CameraImageHandler.h"
- #include "CameraMaterialGroupWnd/MaterialWindow/DraggableLine.h"
- #include "JOriginalMainWnd.h"
- namespace Ui {
- class SingleCameraOperationWnd;
- }
- class SingleCameraOperationWnd : public JOriginalMainWnd
- {
- Q_OBJECT
- public:
- explicit SingleCameraOperationWnd(QWidget *parent = nullptr);
- ~SingleCameraOperationWnd();
- void initFrom();
- void closeEvent(QCloseEvent *event) override;
- void loadGroupSettings(int Id, int Index);
- void startCamera(int cameraId);
- void stopCamera(int cameraId);
- void updateImage(const QImage&image);
- void updateMaterialWidget(int materialWndType, int groupId);
- public slots: // 确保这里声明了槽函数
- // void onComboBoxIndexChanged(int index); // 确保签名匹配
- QString getImagePathFromIndex(int index);
- void on_DatacomboBox_currentIndexChanged(int index);
- //void handleComBoxChange(int groupId,int index);
- void loadLiveVedio();
- protected:
- void wheelEvent(QWheelEvent *event) override;
- void loadSettings();
- void checkSettings();
- void showEvent(QShowEvent *event) override;
- void hideEvent(QHideEvent *event) override;
- private slots:
- QPixmap getCurrentPixmap() const {
- return currentPixmap;
- }
- public:
- /**必须绑定它, 没必要一直new ,只是控制
- */
- virtual void InitMainCameraBind(CameraBind* pCameraBind);
- virtual void UpdateCameraDisplay0(int iCameraId, JVision::ImageInfo imageData);
- virtual void UpdateCameraDisplay1(int iCameraId, JVision::ImageInfo imageData);
- virtual void UpdateCameraDisplay2(int iCameraId, JVision::ImageInfo imageData);
- virtual void UpdateCameraDisplay3(int iCameraId, JVision::ImageInfo imageData);
- virtual void UpdateCameraDisplay4(int iCameraId, JVision::ImageInfo imageData);
- private :
- Ui::SingleCameraOperationWnd *ui;
- QPixmap currentPixmap;
- qreal scaleFactor;
- int lastGroupId = -1;
- int lastIndex = -1;
- Wafer *wafer; // 声明Wafer指针
- Waffle *waffle; // 声明Waffle指针
- MaterialBox *materialbox; // 声明materialbox指针
- bool isShow;
- ImageGrabber *m_grabber;
- QMap<int, Group*> groupMap;
- int currentCameraId;
- QMap<int, Wafer*> waferMap;
- QMap<int, Waffle*> waffleMap;
- QMap<int, MaterialBox*> materialBoxMap;
- OperateMode currentMode = ModeImage;
- QGraphicsView *currentView = nullptr;
- QPoint mousePos;
- double previousScaleFactor;
- void updateScale(double newScaleFactor); // 更新缩放比例
- void applyScale(); // 应用缩放
- bool liveClick;
- };
- #endif // SINGLECAMERAOPERATIONWND_H
|