20#ifndef ORES_QT_LOGIN_DIALOG_HPP
21#define ORES_QT_LOGIN_DIALOG_HPP
34#include "ores.qt/ClientManager.hpp"
35#include "ores.logging/make_logger.hpp"
49 inline static std::string_view logger_name =
"ores.qt.login_dialog";
51 [[nodiscard]]
static auto& lg() {
53 static auto instance = make_logger(logger_name);
61 QSize sizeHint()
const override;
109 void keyPressEvent(QKeyEvent* event)
override;
122 void signUpRequested();
123 void closeRequested();
141 void onLoginClicked();
142 void onSignUpClicked();
143 void onGetStartedClicked();
144 void onShowPasswordToggled(
bool checked);
149 void setupLeftPanel(QWidget* parent);
150 void setupRightPanel(QWidget* parent);
151 void setupHeader(QVBoxLayout* layout, QWidget* parent);
152 void setupAuthFields(QVBoxLayout* layout, QWidget* parent);
153 void setupServerFields(QVBoxLayout* layout, QWidget* parent);
154 void setupActions(QVBoxLayout* layout, QWidget* parent);
155 void setupFooter(QVBoxLayout* layout, QWidget* parent);
156 void enableForm(
bool enabled);
159 QLabel* loginTitleLabel_;
160 QLineEdit* usernameEdit_;
161 QLineEdit* passwordEdit_;
162 QCheckBox* showPasswordCheck_;
163 QCheckBox* rememberMeCheck_;
164 QPushButton* loginButton_;
165 QPushButton* signUpButton_;
166 QLabel* signUpLabel_;
167 QLabel* statusLabel_;
170 QLineEdit* hostEdit_;
171 QSpinBox* portSpinBox_;
174 QToolButton* savedConnectionsButton_;
175 QMenu* savedConnectionsMenu_;
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
Manages the lifecycle of the network client and IO context.
Definition ClientManager.hpp:90
Login dialog with dark theme.
Definition LoginDialog.hpp:45
void loginSucceeded(const QString &username)
Emitted when login succeeds.
void loginFailed(const QString &errorMessage)
Emitted when login fails.
void bootstrapModeDetected(const std::vector< BootstrapBundleInfo > &bundles)
Emitted when the server is in bootstrap mode.
QString getServer() const
Get the current server/host field value.
Definition LoginDialog.cpp:114
void setClientManager(ClientManager *clientManager)
Set the client manager for performing login.
Definition LoginDialog.cpp:106
int getPort() const
Get the current port field value.
Definition LoginDialog.cpp:118
void setSavedConnections(const QStringList &connectionNames)
Set the list of saved connection names for the dropdown.
Definition LoginDialog.cpp:72
void setUsername(const QString &username)
Set the username field value.
Definition LoginDialog.cpp:98
void setPassword(const QString &password)
Set the password field value.
Definition LoginDialog.cpp:102
void savedConnectionSelected(const QString &connectionName)
Emitted when user selects a saved connection from the dropdown.
QString getUsername() const
Get the username that was used for login.
Definition LoginDialog.cpp:110
void setPort(int port)
Set the port field value.
Definition LoginDialog.cpp:94
void setServer(const QString &server)
Set the server/host field value.
Definition LoginDialog.cpp:90