#ifndef LOGINFORM_H
#define LOGINFORM_H

#include <QWidget>
#include <handle/httprequest.h>
#include "globalinfo.h"

namespace Ui {
class LoginForm;
}

class LoginForm : public QWidget
{
    Q_OBJECT

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

signals:
    void loginFinish();
    void SettingsClicked();
private slots:
    void on_pushLogin_clicked();

    void result(int code, const QJsonObject & body);

    void clear();
    void on_pushButton_2_clicked();

    void on_pushButton_clicked();

    void login();

private:
    HttpRequest  * request();
private:
    Ui::LoginForm *ui;
    HttpRequest  * _request;

    GlobalInfo * glo = GlobalInfo::this_();
};

#endif // LOGINFORM_H
