#ifndef LOGINWINDOW_H
#define LOGINWINDOW_H

#include <QKeyEvent>
#include <QComboBox>
#include <QDialog>


class QVBoxLayout;
class QLineEdit;
class QToolButton;
class QFrame;
class QLabel;

class LoginWindow : public QDialog
{
	Q_OBJECT

public:
	LoginWindow(QWidget* parent = nullptr);
    ~LoginWindow() override;

	void initUi();
	void init();
    void clearInputData();
signals:
    void sigUserLoginSuccessful(const QString& userCode);

public slots:
	void doLogin();
    //void onUserCodeFocusOut(QFocusEvent* e);

private:
    void initUserList();

private:

    QVBoxLayout*                m_pVMainLayout;
	QFrame*						m_pUserCodeFrame;
	QVBoxLayout*				m_pUserCodeLayout;
    QLineEdit*                  m_pUserCodeEdit;
	QLineEdit*                  m_pPassWordEdit;
	QToolButton*				m_pLoginButton;
    QLabel*                     warn;
 
};

#endif // LOGINWINDOW_H
