#ifndef ROIWINDOW_H
#define ROIWINDOW_H

#include <QDialog>

namespace Ui {
class ROIWindow;
}

class ROIWindow : public QDialog {
  Q_OBJECT

public:
  explicit ROIWindow(QWidget *parent = nullptr);
  ~ROIWindow();
  Ui::ROIWindow *ui;
  uint8_t rowUsed;
  uint8_t collumUsed;

private:
  QWidget *parent;
  uint8_t rowBin;
  uint8_t collumBin;
  uint8_t rowSkip;
  uint8_t collumSkip;

  void checkAlign(bool editWidth);

public slots:
  void on_sendROIButton_clicked();

private slots:
  void catchSensorUpdate(uint8_t);
  void on_startXSpin_valueChanged(int arg1);
  void on_widthSpin_valueChanged(int arg1);
  void on_startYSpin_valueChanged(int arg1);
  void on_heightSpin_valueChanged(int arg1);

  void on_previewCheck_stateChanged(int arg1);

signals:
  void aligned(void);
  void previewState(bool);
  void roiWindow(QRect);
  void requestRedraw(void);
};

#endif // ROIWINDOW_H
