ChartsAndCamerasWnd.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef CHARTSANDCAMERASWND_H
  2. #define CHARTSANDCAMERASWND_H
  3. #include <QMainWindow>
  4. #include <QSlider>
  5. #include <QLineEdit>
  6. #include <QSettings>
  7. namespace Ui {
  8. class ChartsAndCamerasWnd;
  9. }
  10. class ChartsAndCamerasWnd : public QMainWindow
  11. {
  12. Q_OBJECT
  13. public:
  14. explicit ChartsAndCamerasWnd(QWidget *parent = nullptr);
  15. ~ChartsAndCamerasWnd();
  16. void initFrom();
  17. void connectSliderAndLineEdit(QSlider* slider, QLineEdit* lineEdit);
  18. void initLineEdits();
  19. void initSliders();
  20. protected:
  21. void wheelEvent(QWheelEvent *event);
  22. void loadSettings();
  23. void checkSettings();
  24. void loadGroupSettings(int Id, int Index);
  25. void showEvent(QShowEvent *event) override;
  26. void hideEvent(QHideEvent *event) override;
  27. private slots:
  28. void on_ZoomUpButton_clicked();
  29. QPixmap getCurrentPixmap() const {
  30. return currentPixmap;
  31. }
  32. void on_ZoomOutButton_clicked();
  33. private:
  34. Ui::ChartsAndCamerasWnd *ui;
  35. QPixmap currentPixmap;
  36. qreal scaleFactor;
  37. int lastGroupId = -1;
  38. int lastIndex = -1;
  39. };
  40. #endif // CHARTSANDCAMERASWND_H