|
void | makeRequest (QJsonObject Data) |
| Signal emitted when a request is ready to be sent to the server. More...
|
|
void | requestConnection (const QString &host, quint16 port) |
| Signal emitted to request a connection to the server. More...
|
|
void | requestDisconnection () |
| Signal emitted to request a disconnection from the server.
|
|
◆ ~UIManager()
UIManager::~UIManager |
( |
| ) |
|
Destructor for the UIManager class.
Cleans up the main window and its widgets.
◆ connectToTheServer
void UIManager::connectToTheServer |
( |
const QString & |
host, |
|
|
quint16 |
port |
|
) |
| |
|
slot |
Connects to the server.
- Parameters
-
host | Server host address. |
port | Server port number. |
Referenced by createLoginWidget().
◆ createAdminWidget
void UIManager::createAdminWidget |
( |
QString |
email, |
|
|
QString |
first_name |
|
) |
| |
|
slot |
Creates the admin widget.
- Parameters
-
email | Admin email address. |
first_name | Admin first name. |
◆ createLoginWidget
void UIManager::createLoginWidget |
( |
| ) |
|
|
slot |
Creates the login widget.
Initializes and displays the login widget.
◆ createUserWidget
void UIManager::createUserWidget |
( |
QString |
email, |
|
|
QString |
first_name, |
|
|
QString |
account_number, |
|
|
QString |
balance |
|
) |
| |
|
slot |
Creates the user widget.
- Parameters
-
email | User email address. |
first_name | User first name. |
account_number | User account number. |
balance | User account balance. |
◆ getInstance()
UIManager * UIManager::getInstance |
( |
QObject * |
parent = nullptr | ) |
|
|
static |
Gets the singleton instance of UIManager.
- Parameters
-
parent | Optional parent QObject. |
- Returns
- Pointer to the UIManager instance.
◆ logout
void UIManager::logout |
( |
| ) |
|
|
slot |
◆ makeRequest
void UIManager::makeRequest |
( |
QJsonObject |
Data | ) |
|
|
signal |
Signal emitted when a request is ready to be sent to the server.
- Parameters
-
Data | JSON object containing the request data. |
Referenced by requestReady().
◆ onConnectionResponse
void UIManager::onConnectionResponse |
( |
bool |
status | ) |
|
|
slot |
Handles the server connection response.
- Parameters
-
status | Connection status (true if connected, false otherwise). |
◆ onFailedNotification
void UIManager::onFailedNotification |
( |
QString |
message | ) |
|
|
slot |
Displays a failed notification.
- Parameters
-
message | The failure message to be displayed. |
◆ onSuccessfullNotification
void UIManager::onSuccessfullNotification |
( |
QString |
message | ) |
|
|
slot |
Displays a successful notification.
- Parameters
-
message | The success message to be displayed. |
◆ requestConnection
void UIManager::requestConnection |
( |
const QString & |
host, |
|
|
quint16 |
port |
|
) |
| |
|
signal |
Signal emitted to request a connection to the server.
- Parameters
-
host | Server host address. |
port | Server port number. |
Referenced by connectToTheServer().
◆ requestReady
void UIManager::requestReady |
( |
QJsonObject |
Data | ) |
|
|
slot |
Slot to handle requests that are ready to be sent.
- Parameters
-
Data | JSON object containing the request data. |
Referenced by createLoginWidget().
◆ responseReady
void UIManager::responseReady |
( |
QJsonObject |
Data | ) |
|
|
slot |
Slot to handle responses from the server.
- Parameters
-
Data | JSON object containing the response data. |
The documentation for this class was generated from the following files: