SingleCameraOperationWnd.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef SINGLECAMERAOPERATIONWND_H
  2. #define SINGLECAMERAOPERATIONWND_H
  3. #include <QMainWindow>
  4. #include <QSlider>
  5. #include <QLineEdit>
  6. namespace Ui {
  7. class SingleCameraOperationWnd;
  8. }
  9. class SingleCameraOperationWnd : public QMainWindow
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit SingleCameraOperationWnd(QWidget *parent = nullptr);
  14. ~SingleCameraOperationWnd();
  15. void initFrom();
  16. void connectSliderAndLineEdit(QSlider* slider, QLineEdit* lineEdit);
  17. void initSliders();
  18. void initLineEdits();
  19. void saveSliderStates();
  20. void loadSliderStates();
  21. void closeEvent(QCloseEvent *event);
  22. void loadGroupSettings(int Id, int Index);
  23. public slots: // 确保这里声明了槽函数
  24. void onComboBoxIndexChanged(int index); // 确保签名匹配
  25. QString getImagePathFromIndex(int index);
  26. protected:
  27. void wheelEvent(QWheelEvent *event);
  28. void loadSettings();
  29. void checkSettings();
  30. void showEvent(QShowEvent *event) override;
  31. void hideEvent(QHideEvent *event) override;
  32. private slots:
  33. void on_ZoomUpButton_clicked();
  34. QPixmap getCurrentPixmap() const {
  35. return currentPixmap;
  36. }
  37. void on_ZoomOutButton_clicked();
  38. private:
  39. Ui::SingleCameraOperationWnd *ui;
  40. QPixmap currentPixmap;
  41. qreal scaleFactor;
  42. int lastGroupId = -1;
  43. int lastIndex = -1;
  44. };
  45. #endif // SINGLECAMERAOPERATIONWND_H