#ifndef UARTCONFIGWINDOW_H
#define UARTCONFIGWINDOW_H

#include <QDialog>
#include "qjsonarray.h"
#include "qjsondocument.h"
#include "qjsonobject.h"
#include "qjsonvalue.h"

namespace Ui {
class UartConfigWindow;
}

class UartConfigWindow : public QDialog
{
    Q_OBJECT

public:
    explicit UartConfigWindow(QWidget *parent = nullptr, QString cfg ="");
    ~UartConfigWindow();

private:
    Ui::UartConfigWindow *ui;
    QString configContent;
    QJsonDocument json;
signals:
   void updateConfiguration(QString newconfig);
private slots:
   void on_pushButton_2_clicked();
   void on_cbUsbProto_currentIndexChanged(int index);
   void on_btOk_clicked();
   void on_cbUart2Proto_currentIndexChanged(int index);
};

#endif // UARTCONFIGWINDOW_H
