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);
127 void setupPanel(QWidget* parent);
128 void enableForm(
bool enabled);
129 bool validateInput();
133 QLineEdit* usernameEdit_;
134 QLineEdit* emailEdit_;
135 QLineEdit* passwordEdit_;
136 QLineEdit* confirmPasswordEdit_;
137 QCheckBox* showPasswordCheck_;
138 QPushButton* signUpButton_;
139 QPushButton* loginButton_;
141 QLabel* statusLabel_;
144 QLineEdit* hostEdit_;
145 QSpinBox* portSpinBox_;
151 QString registeredUsername_;
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:29
Result of a login attempt.
Definition ClientManager.hpp:70
Result of a signup attempt.
Definition ClientManager.hpp:88
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:109
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:95
QString getServer() const
Get the current server/host field value.
Definition SignUpDialog.cpp:83
void setClientManager(ClientManager *clientManager)
Set the client manager for performing signup.
Definition SignUpDialog.cpp:91
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:87
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:79
void setServer(const QString &server)
Set the server/host field value.
Definition SignUpDialog.cpp:75