#ifndef LOGINUI_H
#define LOGINUI_H

#include <QMainWindow>
#include "ui_loginui.h"
#include <iostream>
#include <cstring>

using namespace std;

namespace Ui {
class LoginUi;
}

class LoginUi : public QMainWindow
{
    Q_OBJECT

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

private:
    Ui::LoginUi *ui;
    bool isPressedWidget;
    QPoint m_lastPos;

    void initWindow();
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void setWindowState();
    void setBtnAndLabelState();

    bool verifyAccount(string usr, string pwd);
    void changetoMainwindow();

};

#endif // LOGINUI_H
