123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- #ifndef VIEWWIDGETGROUP_H
- #define VIEWWIDGETGROUP_H
- #include <QWidget>
- #include <QVBoxLayout>
- #include <QstringList.h>
- #include "CameraMaterialGroupWnd/MaterialWindow/Wafer.h"
- #include "CameraMaterialGroupWnd/MaterialWindow/Waffle.h"
- #include "CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h"
- #include "CameraMaterialGroupWnd/MaterialWindow/Bond.h"
- #include "OriginalWnd/CameraDataHandleAndShow.h"
- #include "CameraMaterialGroupWnd/CameraImage/CameraImageHandler.h"
- #include "ImageWidget.h"
- #include "../common/GlobalUse/JMouseMonitorThread.h"
- #include "../CameraBind.h"
- #include "ImageView.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();
- qreal getScaleFactorValue();
- void setScaleFactorSize(QPixmap scaledImage);
- void setComboBox(const QList<QPair<QString, QString>> fileList, const int index);
- void setEnableControls(bool enable);
-
- void UpDateCameraBind(CameraBind* pCameraBind);
- void setSwitchJoystickButEnable(bool isEnable);
- void setBlueBord();
- void initImage();
- QPixmap getCurrentComboBoxPixmap(const int index);
- private slots:
- void on_ZoomUpButton_clicked();
- void on_ZoomOutButton_clicked();
- void on_RulerButton_clicked();
- void on_PenButton_clicked();
-
- void handleDoubleClick();
- void on_switchJoystickBut_clicked();
- void on_moduleTypeComboBox_currentIndexChanged(int index);
- void on_axisTypeComboBox_currentIndexChanged(int index);
- void SaveNewImage();
- void on_DataSources_currentIndexChanged(int comboxIndex);
- signals:
-
- void SendModuleTypeSignals(const ST_MOVE_AXIS& _module);
- void send_ComboBox_singal(int index);
- private slots:
-
- void MouseMovedSlots(const QPoint& delta);
- void RequestCursorMoveSlots(const QPoint& pos);
- protected:
- void timerEvent(QTimerEvent* event) override;
-
- void wheelEvent(QWheelEvent* event) override;
-
- private:
- void HideLayout(bool bShow);
- void ResetIdleTimer(bool bStart = false);
- void InitWnd();
-
- void CreateMouseMonitor(bool isStart);
-
- void LockMouse(bool islockMouse);
-
- void UpdataModuleType(const QString& strMode, int nIndex);
- private:
- template<class T>
- 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;
- Waffle* m_waffle = nullptr;
- MaterialBox* m_materialbox = nullptr;
- Bond* m_bond = nullptr;
- ImageView* m_currentImageView = nullptr;
- bool m_isEnable;
- bool m_bRuler;
- QPoint m_pressPos;
-
- int m_idleTimer = -1;
- private:
- JMouseMonitorThread* m_pMousethread = nullptr;
- bool m_bMouseRun = false;
- bool m_isUserOnclick = false;
-
- QPointer<CameraBind> m_pCameraBindCopy;
-
- ST_MOVE_AXIS m_currentSelectRunAxis = {};
- bool m_isAdd = false;
- };
- #endif
|