#ifndef VIEWWIDGETGROUP_H #define VIEWWIDGETGROUP_H #include #include #include #include "CameraMaterialGroupWnd/MaterialWindow/Wafer.h" #include "CameraMaterialGroupWnd/MaterialWindow/Waffle.h" #include "CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h" #include "OriginalWnd/CameraDataHandleAndShow.h" #include "CameraMaterialGroupWnd/CameraImage/CameraImageHandler.h" #include "ImageWidget.h" #include "../common/GlobalUse/JMouseMonitorThread.h" #include "../CameraBind.h" namespace Ui { class ControlOperationPage; } class ControlOperationPage : public QWidget { Q_OBJECT public: enum kinds{ wafer_kind, waffle_kind, materialbox_kind, bond_kind }; explicit ControlOperationPage(QWidget *parent = nullptr); ~ControlOperationPage(); public: void initForm(); void updateOperateWidget(const QPixmap& pixmap); void setDataSources(const QStringList& textList); void clearLayout(); void updateScale(double newScaleFactor); void applyScale(); void updateMaterialWidget( kinds materialWndType); void KindsofWidget(kinds kind); void setWafer(Wafer *wafer); void setWaffle(Waffle *waffle); void setMaterialBox(MaterialBox *materialbox); //void setBond(Bond *bond); ImageWidget* getOperatewidget(); void resizeSingleUI(bool bMax = false); void resizeChartsAndCamerasUI(); /**更新硬件指针 */ void UpDateCameraBind(CameraBind* pCameraBind); void setEnableControls(bool enable); private slots: void on_ZoomUpButton_clicked(); void on_ZoomOutButton_clicked(); // void on_RulerButton_clicked(); //void on_PenButton_clicked(); void handleDoubleClick(); void on_switchJoystickBut_clicked(); private slots: /**位置更新 */ void MouseMovedSlots(const QPoint& delta); void RequestCursorMoveSlots(const QPoint& pos); protected: void timerEvent(QTimerEvent* event) override; void mousePressEvent(QMouseEvent* event) override; void mouseMoveEvent(QMouseEvent* event) override; private: void HideLayout(bool bShow); void ResetIdleTimer(bool bStart = false); void InitWnd(); /**创建鼠标控制线程, * @in isStart== false 关闭 */ void CreateMouseMonitor(bool isStart); /**鼠标操作 */ void LockMouse(bool islockMouse); private: template void DeduplicationBox(QComboBox* pCom, const T& veTemp, int nIndex); private: Ui::ControlOperationPage* ui; QPixmap m_currentPixmap; qreal m_scaleFactor; QPoint m_mousePos; OperateMode m_currentMode = ModeImage; QGraphicsView* m_currentView = nullptr; double m_previousScaleFactor; Wafer* m_wafer = nullptr; // 声明Wafer指针 Waffle* m_waffle = nullptr; // 声明Waffle指针 MaterialBox* m_materialbox = nullptr; // 声明materialbox指针 //Bond *m_bond; /**用作定时使用,后面移动到整个类里面,目前先实现功能 */ int m_idleTimer = -1; private: JMouseMonitorThread* m_pMousethread = nullptr; bool m_bMouseRun = false; // 重复点击 /**硬件指针 */ QPointer m_pCameraBindCopy; }; #endif // VIEWWIDGETGROUP_H