123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- #ifndef MAINANDSECONDARYCAMERASWND_H
- #define MAINANDSECONDARYCAMERASWND_H
- #include <QMainWindow>
- #include <QSlider>
- #include <QLineEdit>
- #include "CameraMaterialGroupWnd/MaterialWindow/Wafer.h"
- #include "CameraMaterialGroupWnd/MaterialWindow/Waffle.h"
- #include "CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h"
- namespace Ui {
- class MainAndSecondaryCamerasWnd;
- }
- class MainAndSecondaryCamerasWnd : public QMainWindow
- {
- Q_OBJECT
- public:
- explicit MainAndSecondaryCamerasWnd(QWidget *parent = nullptr);
- ~MainAndSecondaryCamerasWnd();
- void initFrom();
- void connectSliderAndLineEdit(QSlider* slider, QLineEdit* lineEdit);
- void initLineEdits();
- void initSliders();
- void initProgressBar();
- public slots: // 确保这里声明了槽函数
- void handleDoubleClick();
- void showAndHide();
- void showAndHide_L();
- void CheckIs();
- protected:
- void wheelEvent(QWheelEvent *event)override;
- void loadSettings();
- void checkSettings();
- void loadGroupSettings(int Id, int Index);
- void showEvent(QShowEvent *event) override;
- void hideEvent(QHideEvent *event) override;
- void clearLayout(int flag); // 清除大窗口上当前的布局
- void WaferWidget(int flag); // 圆晶
- void WaffleWidget(int flag); // 华夫盒
- void MaterialBoxWidget(int flag); // 料盒
- private slots:
- void on_LeftZoomUpButton_clicked();
- void on_RightZoomUpButton_clicked();
- void on_LeftZoomOutButton_clicked();
- void on_RightZoomOutButton_clicked();
- QPixmap getCurrentPixmap() const {
- return Right_currentPixmap;
- }
- private:
- Ui::MainAndSecondaryCamerasWnd *ui;
- QPixmap Left_currentPixmap;
- qreal Left_scaleFactor;
- QPixmap Right_currentPixmap;
- qreal Right_scaleFactor;
- int lastGroupId = -1;
- int lastIndex = -1;
- int lastLastGroupId = -1;
- int lastLastIndex = -1;
- QPixmap lastRightPixmap;
- QStringList lasttextList;
- QPixmap lastLastRightPixmap; // 用于存储上一次的 lastRightPixmap
- QStringList lastLasttextList;
- bool isUpdatingSettings;
- Wafer *wafer; // 声明Wafer指针
- Waffle *waffle; // 声明Waffle指针
- MaterialBox *materialbox; // 声明materialbox指针
- bool isShow;
- bool isShow_L;
- QMap<int, Wafer*> waferMap;
- OperateMode Left_currentMode = ModeImage;
- OperateMode Right_currentMode = ModeImage;
- QGraphicsView *Left_currentView = nullptr;
- QGraphicsView *Right_currentView = nullptr;
- QPoint mousePos;
- double Left_previousScaleFactor;
- double Right_previousScaleFactor;
- void updateScale(double newScaleFactor, int flag); // 更新缩放比例
- void applyScale(int flag); // 应用缩放
- };
- #endif // MAINANDSECONDARYCAMERASWND_H
|