#ifndef SETREGSWINDOW_H
#define SETREGSWINDOW_H

#include <QDialog>
#include <QLineEdit>

namespace Ui {
class setRegsWindow;
}

class setRegsWindow : public QDialog {
  Q_OBJECT

public:
  explicit setRegsWindow(QWidget *parent = nullptr);
  ~setRegsWindow();

public slots:
  void registerData(uint8_t, uint16_t);
  void portStatus(bool, bool);

private slots:
  void on_readAddEdit_textChanged(const QString &arg1);

  void on_writeAddEdit_textChanged(const QString &arg1);

  void on_writeValueEdit_textChanged(const QString &arg1);

  void on_readButton_clicked();

  void on_writeButton_clicked();

private:
  Ui::setRegsWindow *ui;
  QWidget *parent;

  void hexControl(const QString &arg1, QLineEdit *edit);
  void cursorToBegin(QLineEdit *edit);
};

#endif // SETREGSWINDOW_H
