增加和修改了非常多的功能
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#ifndef LOGINWIDGET_H
|
||||
#define LOGINWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class ElaLineEdit;
|
||||
class ElaPushButton;
|
||||
class ElaToggleSwitch;
|
||||
class QLabel;
|
||||
|
||||
class LoginWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LoginWidget(QWidget* parent = nullptr);
|
||||
QString nickname() const;
|
||||
|
||||
signals:
|
||||
void loggedIn(const QString& nickname);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent* event) override;
|
||||
|
||||
private:
|
||||
void initUI();
|
||||
void onConnect();
|
||||
void onLogin();
|
||||
void onRegister();
|
||||
|
||||
ElaLineEdit* _serverEdit = nullptr;
|
||||
ElaLineEdit* _usernameEdit = nullptr;
|
||||
ElaLineEdit* _passwordEdit = nullptr;
|
||||
ElaToggleSwitch* _rememberSwitch = nullptr;
|
||||
ElaPushButton* _connectBtn = nullptr;
|
||||
ElaPushButton* _loginBtn = nullptr;
|
||||
ElaPushButton* _registerBtn = nullptr;
|
||||
QLabel* _statusLabel = nullptr;
|
||||
QString _nickname;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user