ControlOperationPage.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef VIEWWIDGETGROUP_H
  2. #define VIEWWIDGETGROUP_H
  3. #include <QWidget>
  4. #include <QVBoxLayout>
  5. #include <QstringList.h>
  6. #include "CameraMaterialGroupWnd/MaterialWindow/Wafer.h"
  7. #include "CameraMaterialGroupWnd/MaterialWindow/Waffle.h"
  8. #include "CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h"
  9. #include "OriginalWnd/CameraDataHandleAndShow.h"
  10. #include "CameraMaterialGroupWnd/CameraImage/CameraImageHandler.h"
  11. #include "ImageWidget.h"
  12. namespace Ui {
  13. class ControlOperationPage;
  14. }
  15. class ControlOperationPage : public QWidget
  16. {
  17. Q_OBJECT
  18. public:
  19. enum kinds{
  20. wafer_kind,
  21. waffle_kind,
  22. materialbox_kind,
  23. bond_kind
  24. };
  25. explicit ControlOperationPage(QWidget *parent = nullptr);
  26. ~ControlOperationPage();
  27. void initForm();
  28. void updateOperateWidget(const QPixmap& pixmap, const QStringList& textList);
  29. void clearLayout();
  30. void updateScale(double newScaleFactor);
  31. void applyScale();
  32. void updateMaterialWidget( kinds materialWndType);
  33. void KindsofWidget(kinds kind);
  34. void setWafer(Wafer *wafer);
  35. void setWaffle(Waffle *waffle);
  36. void setMaterialBox(MaterialBox *materialbox);
  37. //void setBond(Bond *bond);
  38. ImageWidget* getOperatewidget();
  39. void resizeSingleUI();
  40. void resizeChartsAndCamerasUI();
  41. private slots:
  42. void on_ZoomUpButton_clicked();
  43. void on_ZoomOutButton_clicked();
  44. // void on_RulerButton_clicked();
  45. //void on_PenButton_clicked();
  46. void handleDoubleClick();
  47. void on_switchJoystickBut_clicked();
  48. protected:
  49. void timerEvent(QTimerEvent* event) override;
  50. private:
  51. void HideLayout(bool bShow);
  52. void ResetIdleTimer(bool bStart = false);
  53. private:
  54. template<class T>
  55. void DeduplicationBox(QComboBox* pCom, const T& veTemp, int nIndex);
  56. private:
  57. Ui::ControlOperationPage* ui;
  58. QPixmap m_currentPixmap;
  59. qreal m_scaleFactor;
  60. QPoint m_mousePos;
  61. OperateMode m_currentMode = ModeImage;
  62. QGraphicsView* m_currentView = nullptr;
  63. double m_previousScaleFactor;
  64. Wafer* m_wafer; // 声明Wafer指针
  65. Waffle* m_waffle; // 声明Waffle指针
  66. MaterialBox* m_materialbox; // 声明materialbox指针
  67. //Bond *m_bond;
  68. /**用作定时使用,后面移动到整个类里面,目前先实现功能
  69. */
  70. int m_idleTimer = -1;
  71. };
  72. #endif // VIEWWIDGETGROUP_H