ChartsAndCamerasWnd.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. #ifndef CHARTSANDCAMERASWND_H
  2. #define CHARTSANDCAMERASWND_H
  3. #include <QMainWindow>
  4. #include <QSlider>
  5. #include <QLineEdit>
  6. #include <QSettings>
  7. #include "chartline.h"
  8. #include "CameraMaterialGroupWnd/MaterialWindow/Wafer.h"
  9. #include "CameraMaterialGroupWnd/MaterialWindow/Waffle.h"
  10. #include "CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h"
  11. #include "JOriginalMainWnd.h"
  12. namespace Ui {
  13. class ChartsAndCamerasWnd;
  14. }
  15. class ChartsAndCamerasWnd : public JOriginalMainWnd
  16. {
  17. Q_OBJECT
  18. public:
  19. explicit ChartsAndCamerasWnd(QWidget *parent = nullptr);
  20. ~ChartsAndCamerasWnd();
  21. void initFrom();
  22. void updateMaterialWidget( int materialWndType, int groupId);
  23. protected:
  24. void wheelEvent(QWheelEvent *event) override;
  25. void loadSettings();
  26. void checkSettings();
  27. void loadGroupSettings(int Id, int Index);
  28. void showEvent(QShowEvent *event) override;
  29. void hideEvent(QHideEvent *event) override;
  30. private:
  31. void InitMainCameraBind(CameraBind* pCameraBind) override;
  32. void UpdateCameraDisplay0(int iCameraId, JVision::ImageInfo imageData) override;
  33. void UpdateCameraDisplay1(int iCameraId, JVision::ImageInfo imageData) override;
  34. void UpdateCameraDisplay2(int iCameraId, JVision::ImageInfo imageData) override;
  35. void UpdateCameraDisplay3(int iCameraId, JVision::ImageInfo imageData) override;
  36. void UpdateCameraDisplay4(int iCameraId, JVision::ImageInfo imageData) override;
  37. public slots: // 确保这里声明了槽函数
  38. private slots:
  39. QPixmap getCurrentPixmap() const {
  40. return currentPixmap;
  41. }
  42. // 通用槽函数
  43. // void on_GreenDiamondcheckBox_clicked();
  44. // void on_YellowDiamondcheckBox_clicked();
  45. // void on_BlackDiamondcheckBox_clicked();
  46. // void on_BlueDiamondcheckBox_clicked();
  47. // void on_BlueHorizontalLinecheckBox_clicked();
  48. // void on_BlueVerticalBarcheckBox_clicked();
  49. // void on_GreenVerticalBarcheckBox_clicked();
  50. // void on_PurpleVerticalBarcheckBox_clicked();
  51. // void on_RedDiamondcheckBox_clicked();
  52. // void on_RedHorizontalLinecheckBox_clicked();
  53. // void on_WhiteVerticalBarcheckBox_clicked();
  54. private:
  55. Ui::ChartsAndCamerasWnd *ui;
  56. // // 三个 ChartLine 实例
  57. // ChartLine *chartLine;
  58. // ChartLine *chartLine1;
  59. // ChartLine *chartLine2;
  60. // ChartLine 实例
  61. ChartLine *chartLine;
  62. ChartLine *chartLine1;
  63. ChartLine *chartLine2;
  64. // 存储所有系列信息
  65. QMap<QString, DataSeries> m_seriesMap;
  66. // 初始化系列信息
  67. void initializeSeriesInfo();
  68. QPixmap currentPixmap;
  69. qreal scaleFactor;
  70. double previousScaleFactor;
  71. int lastGroupId = -1;
  72. int lastIndex = -1;
  73. Wafer *wafer; // 声明Wafer指针
  74. Waffle *waffle; // 声明Waffle指针
  75. MaterialBox *materialbox; // 声明materialbox指针
  76. bool isShow;
  77. QMap<int, Wafer*> waferMap;
  78. QMap<int, Waffle*> waffleMap;
  79. QMap<int, MaterialBox*> materialBoxMap;
  80. OperateMode currentMode = ModeImage;
  81. QGraphicsView *currentView = nullptr;
  82. QPoint mousePos;
  83. };
  84. #endif // CHARTSANDCAMERASWND_H