Banking_System_Client  1.0.0
Qt-based banking app for user/admin account management, transactions, secure server communication via PostgreSQL/Supabase.
UserWidget Class Reference

The UserWidget class provides a user interface for managing user accounts, performing transactions, and modifying settings within the banking application. More...

#include <UserWidget.h>

Inheritance diagram for UserWidget:
Inheritance graph
Collaboration diagram for UserWidget:
Collaboration graph

Public Slots

void onTransactionsFetched (const QList< QMap< QString, QString >> &transactions)
 Slot to handle successful fetch of transactions. More...
 
void onBalanceFetched (const QString balance)
 Slot to handle successful fetch of balance. More...
 
void onSuccessfullRequest (QString message)
 Slot to handle successful request. More...
 
void onFailedRequest (QString message)
 Slot to handle failed request. More...
 

Signals

void logout ()
 Emitted when the user requests to log out.
 

Public Member Functions

 UserWidget (QString email, QString first_name, QString account_number, QString balance, QWidget *parent=nullptr)
 Constructs a UserWidget instance. More...
 

Detailed Description

The UserWidget class provides a user interface for managing user accounts, performing transactions, and modifying settings within the banking application.

This class represents the main user interface component that allows users to interact with their account information, view transaction history, perform transfers, and update personal settings. It includes several tabs for different functionalities such as Home, Transfer, and Settings.

The UserWidget class manages the display of user data, handles user interactions, and communicates with the backend server through the RequestManager. It provides features for viewing transaction history, performing money transfers, updating account details, and logging out of the application.

The widget consists of:

  • Home tab: Displays welcome message, current balance, and transaction history.
  • Transfer tab: Allows users to transfer funds to another account or email.
  • Settings tab: Provides options to update email, update password, and log out.

Constructor & Destructor Documentation

◆ UserWidget()

UserWidget::UserWidget ( QString  email,
QString  first_name,
QString  account_number,
QString  balance,
QWidget *  parent = nullptr 
)

Constructs a UserWidget instance.

Parameters
emailThe user's email address.
first_nameThe user's first name.
account_numberThe user's account number.
balanceThe user's current balance.
parentThe parent widget (optional).
Here is the call graph for this function:

Member Function Documentation

◆ onBalanceFetched

void UserWidget::onBalanceFetched ( const QString  balance)
slot

Slot to handle successful fetch of balance.

Parameters
balanceThe balance fetched from the server.

Referenced by UIManager::closeUserWidget(), UIManager::createUserWidget(), and UserWidget().

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

◆ onFailedRequest

void UserWidget::onFailedRequest ( QString  message)
slot

Slot to handle failed request.

Parameters
messageThe failure message to display.

Referenced by UIManager::onFailedNotification().

Here is the caller graph for this function:

◆ onSuccessfullRequest

void UserWidget::onSuccessfullRequest ( QString  message)
slot

Slot to handle successful request.

Parameters
messageThe success message to display.

Referenced by onBalanceFetched(), UIManager::onSuccessfullNotification(), and onTransactionsFetched().

Here is the caller graph for this function:

◆ onTransactionsFetched

void UserWidget::onTransactionsFetched ( const QList< QMap< QString, QString >> &  transactions)
slot

Slot to handle successful fetch of transactions.

Parameters
transactionsThe list of transactions fetched from the server.

Referenced by UIManager::closeUserWidget(), and UIManager::createUserWidget().

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

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