MainAndSecondaryCamerasWnd.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef MAINANDSECONDARYCAMERASWND_H
  2. #define MAINANDSECONDARYCAMERASWND_H
  3. #include <QMainWindow>
  4. #include <QSlider>
  5. #include <QLineEdit>
  6. namespace Ui {
  7. class MainAndSecondaryCamerasWnd;
  8. }
  9. class MainAndSecondaryCamerasWnd : public QMainWindow
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit MainAndSecondaryCamerasWnd(QWidget *parent = nullptr);
  14. ~MainAndSecondaryCamerasWnd();
  15. void initFrom();
  16. void connectSliderAndLineEdit(QSlider* slider, QLineEdit* lineEdit);
  17. void initLineEdits();
  18. void initSliders();
  19. protected:
  20. void wheelEvent(QWheelEvent *event);
  21. void loadSettings();
  22. void checkSettings();
  23. void loadGroupSettings(int Id, int Index);
  24. void showEvent(QShowEvent *event) override;
  25. void hideEvent(QHideEvent *event) override;
  26. private slots:
  27. void on_LeftZoomUpButton_clicked();
  28. void on_RightZoomUpButton_clicked();
  29. void on_LeftZoomOutButton_clicked();
  30. void on_RightZoomOutButton_clicked();
  31. QPixmap getCurrentPixmap() const {
  32. return Right_currentPixmap;
  33. }
  34. private:
  35. Ui::MainAndSecondaryCamerasWnd *ui;
  36. QPixmap Left_currentPixmap;
  37. qreal Left_scaleFactor;
  38. QPixmap Right_currentPixmap;
  39. qreal Right_scaleFactor;
  40. int lastGroupId = -1;
  41. int lastIndex = -1;
  42. QPixmap lastRightPixmap;
  43. QStringList lasttextList;
  44. QPixmap lastLastRightPixmap; // 用于存储上一次的 lastRightPixmap
  45. QStringList lastLasttextList;
  46. bool isUpdatingSettings;
  47. };
  48. #endif // MAINANDSECONDARYCAMERASWND_H