20#ifndef ORES_QT_SIGNUP_DIALOG_HPP
21#define ORES_QT_SIGNUP_DIALOG_HPP
30#include "ores.qt/ClientManager.hpp"
31#include "ores.logging/make_logger.hpp"
45 inline static std::string_view logger_name =
"ores.qt.signup_dialog";
47 [[nodiscard]]
static auto& lg() {
49 static auto instance = make_logger(logger_name);
57 QSize sizeHint()
const override;
90 void keyPressEvent(QKeyEvent* event)
override;
119 void onSignUpClicked();
120 void onLoginClicked();
121 void onShowPasswordToggled(
bool checked);
124 void updatePasswordMatchIndicator();
128 void setupPanel(QWidget* parent);
129 void enableForm(
bool enabled);
130 bool validateInput();
134 QLineEdit* usernameEdit_;
135 QLineEdit* emailEdit_;
136 QLineEdit* passwordEdit_;
137 QLineEdit* confirmPasswordEdit_;
138 QCheckBox* showPasswordCheck_;
139 QPushButton* signUpButton_;
140 QPushButton* loginButton_;
142 QLabel* statusLabel_;
145 QLineEdit* hostEdit_;
146 QSpinBox* portSpinBox_;
152 QString registeredUsername_;
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:35
Result of a login attempt.
Definition ClientManager.hpp:58
Result of a signup attempt.
Definition ClientManager.hpp:69
Manages the lifecycle of the network client and IO context.
Definition ClientManager.hpp:90
Sign up dialog with dark theme.
Definition SignUpDialog.hpp:41
void loginSucceeded(const QString &username)
Emitted when signup and auto-login succeed.
QString getRegisteredUsername() const
Get the username that was registered.
Definition SignUpDialog.cpp:94
QString getServer() const
Get the current server/host field value.
Definition SignUpDialog.cpp:82
void setClientManager(ClientManager *clientManager)
Set the client manager for performing signup.
Definition SignUpDialog.cpp:90
void signupSucceeded(const QString &username)
Emitted when signup succeeds (before auto-login).
void signupFailed(const QString &errorMessage)
Emitted when signup fails.
int getPort() const
Get the current port field value.
Definition SignUpDialog.cpp:86
void closeRequested()
Emitted when the widget should be closed.
void loginRequested()
Emitted when user wants to go back to login.
void setPort(int port)
Set the port field value.
Definition SignUpDialog.cpp:78
void setServer(const QString &server)
Set the server/host field value.
Definition SignUpDialog.cpp:74