#ifndef PENDING_H
#define PENDING_H

#include "./sensor/cmos.h"
#include "ui_mainwindow.h"
#include "ui_roiwindow.h"

class Pending : public QObject {
  Q_OBJECT
public:
  Pending(Ui_MainWindow *mainWindow, Ui_ROIWindow *roiWindow, CMOS *sensor);
  ~Pending() {}
  void enablePending(bool);
  bool enabled;

  void setROIpendingCount(int set) { this->ROIpendingCount = set; }

  void setPending(QWidget *widget, bool pending);

private:
  Ui_MainWindow *mainWindow;
  Ui_ROIWindow *roiWindow;
  CMOS *sensor;
  int ROIpendingCount;
  QPalette origStyle;
  QPalette pendingStyle;

private slots:
  void ROI_widthChanged(int);
  void ROI_heightChanged(int);
  void ROI_startXChanged(int);
  void ROI_startYChanged(int);

  void AECChanged(int);
  void AGCChanged(int);
  void HDRChanged(int);
  void Flip_RowChanged(int);
  void Flip_ColChanged(int);

  void BrightChanged(int);
  void ExposureChanged(int);
  void GainChanged(double);

  void Bin_RowChanged(QString);
  void Bin_ColChanged(QString);
};

#endif // PENDING_H
