#ifndef ADDRESSPAGE_H
#define ADDRESSPAGE_H

#include <QWidget>
#include <QStandardItemModel>
#include <QJsonArray>
#include "buttondelegate.h"
#include "HttpClient.h"
#include "PageWidget.h"

class QJsonArray;
class QTableView;


namespace Ui {
class AddressPage;
}

class AddressPage : public QWidget
{
    Q_OBJECT

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

private:
    void parseJsonString(const QJsonDocument& jsonDoc);
    void dataTable( const QJsonDocument& jsonDoc);
    QList<QStandardItem*> jsonToItem(const QJsonObject& jsonObj);
    HttpClient *m_httpClient;
    Ui::AddressPage *ui;
    QStandardItemModel *model;
    QJsonArray dataArray;
};

#endif // ADDRESSPAGE_H
