Banking_System_Client  1.0.0
Qt-based banking app for user/admin account management, transactions, secure server communication via PostgreSQL/Supabase.
UIManager Class Reference
Inheritance diagram for UIManager:
Inheritance graph
Collaboration diagram for UIManager:
Collaboration graph

Public Slots

void responseReady (QJsonObject Data)
 Slot to handle responses from the server. More...
 
void requestReady (QJsonObject Data)
 Slot to handle requests that are ready to be sent. More...
 
void logout ()
 Logs out the current user. More...
 
void createLoginWidget ()
 Creates the login widget. More...
 
void createAdminWidget (QString email, QString first_name)
 Creates the admin widget. More...
 
void createUserWidget (QString email, QString first_name, QString account_number, QString balance)
 Creates the user widget. More...
 
void onSuccessfullNotification (QString message)
 Displays a successful notification. More...
 
void onFailedNotification (QString message)
 Displays a failed notification. More...
 
void closeAdminWidget ()
 Closes the admin widget.
 
void closeUserWidget ()
 Closes the user widget.
 
void closeLoginWidget ()
 Closes the login widget.
 
void connectToTheServer (const QString &host, quint16 port)
 Connects to the server. More...
 
void disconnectFromTheServer ()
 Disconnects from the server.
 
void onConnectionResponse (bool status)
 Handles the server connection response. More...
 

Signals

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.
 

Public Member Functions

 ~UIManager ()
 Destructor for the UIManager class. More...
 
 UIManager (const UIManager &)=delete
 Deleted copy constructor to prevent copying.
 
void operator= (const UIManager &)=delete
 Deleted assignment operator to prevent copying.
 

Static Public Member Functions

static UIManagergetInstance (QObject *parent=nullptr)
 Gets the singleton instance of UIManager. More...
 

Constructor & Destructor Documentation

◆ ~UIManager()

UIManager::~UIManager ( )

Destructor for the UIManager class.

Cleans up the main window and its widgets.

Member Function Documentation

◆ connectToTheServer

void UIManager::connectToTheServer ( const QString &  host,
quint16  port 
)
slot

Connects to the server.

Parameters
hostServer host address.
portServer port number.

Referenced by createLoginWidget().

Here is the caller graph for this function:

◆ createAdminWidget

void UIManager::createAdminWidget ( QString  email,
QString  first_name 
)
slot

Creates the admin widget.

Parameters
emailAdmin email address.
first_nameAdmin first name.
Here is the call graph for this function:

◆ createLoginWidget

void UIManager::createLoginWidget ( )
slot

Creates the login widget.

Initializes and displays the login widget.

Here is the call graph for this function:

◆ createUserWidget

void UIManager::createUserWidget ( QString  email,
QString  first_name,
QString  account_number,
QString  balance 
)
slot

Creates the user widget.

Parameters
emailUser email address.
first_nameUser first name.
account_numberUser account number.
balanceUser account balance.
Here is the call graph for this function:

◆ getInstance()

UIManager * UIManager::getInstance ( QObject *  parent = nullptr)
static

Gets the singleton instance of UIManager.

Parameters
parentOptional parent QObject.
Returns
Pointer to the UIManager instance.

◆ logout

void UIManager::logout ( )
slot

Logs out the current user.

Disconnects signals and resets the UI to the login widget.

Referenced by closeAdminWidget(), closeUserWidget(), createAdminWidget(), and createUserWidget().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeRequest

void UIManager::makeRequest ( QJsonObject  Data)
signal

Signal emitted when a request is ready to be sent to the server.

Parameters
DataJSON object containing the request data.

Referenced by requestReady().

Here is the caller graph for this function:

◆ onConnectionResponse

void UIManager::onConnectionResponse ( bool  status)
slot

Handles the server connection response.

Parameters
statusConnection status (true if connected, false otherwise).
Here is the call graph for this function:

◆ onFailedNotification

void UIManager::onFailedNotification ( QString  message)
slot

Displays a failed notification.

Parameters
messageThe failure message to be displayed.
Here is the call graph for this function:

◆ onSuccessfullNotification

void UIManager::onSuccessfullNotification ( QString  message)
slot

Displays a successful notification.

Parameters
messageThe success message to be displayed.
Here is the call graph for this function:

◆ requestConnection

void UIManager::requestConnection ( const QString &  host,
quint16  port 
)
signal

Signal emitted to request a connection to the server.

Parameters
hostServer host address.
portServer port number.

Referenced by connectToTheServer().

Here is the caller graph for this function:

◆ requestReady

void UIManager::requestReady ( QJsonObject  Data)
slot

Slot to handle requests that are ready to be sent.

Parameters
DataJSON object containing the request data.

Referenced by createLoginWidget().

Here is the caller graph for this function:

◆ responseReady

void UIManager::responseReady ( QJsonObject  Data)
slot

Slot to handle responses from the server.

Parameters
DataJSON object containing the response data.
Here is the call graph for this function:

The documentation for this class was generated from the following files: