#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" 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(); void initForm(); void updateOperateWidget(const QPixmap& pixmap, 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(); private slots: void on_ZoomUpButton_clicked(); void on_ZoomOutButton_clicked(); // void on_RulerButton_clicked(); //void on_PenButton_clicked(); void handleDoubleClick(); void on_switchJoystickBut_clicked(); protected: void timerEvent(QTimerEvent* event) override; private: void HideLayout(bool bShow); void ResetIdleTimer(bool bStart = false); 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; // 声明Wafer指针 Waffle* m_waffle; // 声明Waffle指针 MaterialBox* m_materialbox; // 声明materialbox指针 //Bond *m_bond; /**用作定时使用,后面移动到整个类里面,目前先实现功能 */ int m_idleTimer = -1; }; #endif // VIEWWIDGETGROUP_H