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

Provides an interface for administrative tasks within the banking system. More...

#include <AdminWidget.h>

Inheritance diagram for AdminWidget:
Inheritance graph
Collaboration diagram for AdminWidget:
Collaboration graph

Public Slots

void onDatabaseContentUpdated (const QList< QMap< QString, QString >> &data)
 Slot for handling updates to the database content. More...
 
void onTransactionsFetched (const QList< QMap< QString, QString >> &transactions)
 Slot for handling fetched transaction history. More...
 
void onSuccessfullRequest (QString message)
 Slot for handling successful request messages. More...
 
void onFailedRequest (QString message)
 Slot for handling failed request messages. More...
 

Signals

void logout ()
 Signal emitted when the admin logs out.
 

Public Member Functions

 AdminWidget (QString email, QString first_name, QWidget *parent=nullptr)
 Constructs an AdminWidget object. More...
 

Detailed Description

Provides an interface for administrative tasks within the banking system.

The AdminWidget class allows administrators to manage user accounts, view transaction history, and update settings. It includes tabs for managing the database, viewing transactions, and updating settings, as well as floating action buttons for user management tasks. The widget provides features for viewing database content, managing user accounts, and logging out of the application. The AdminWidget communicates with the backend server through the RequestManager to perform various operations.

The widget consists of:

  • Database tab: Displays database content and allows users.
  • Transactions tab: Shows transaction history for all bank accounts (from -> to -> amount).
  • Settings tab: Allows the admin to update their email address and password.

Constructor & Destructor Documentation

◆ AdminWidget()

AdminWidget::AdminWidget ( QString  email,
QString  first_name,
QWidget *  parent = nullptr 
)

Constructs an AdminWidget object.

Parameters
emailThe email of the admin.
first_nameThe first name of the admin.
parentThe parent widget (default is nullptr).

Member Function Documentation

◆ onDatabaseContentUpdated

void AdminWidget::onDatabaseContentUpdated ( const QList< QMap< QString, QString >> &  data)
slot

Slot for handling updates to the database content.

Parameters
dataThe updated database content.

Referenced by UIManager::closeAdminWidget(), and UIManager::createAdminWidget().

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

◆ onFailedRequest

void AdminWidget::onFailedRequest ( QString  message)
slot

Slot for handling failed request messages.

Parameters
messageThe failure message.

Referenced by UIManager::onFailedNotification().

Here is the caller graph for this function:

◆ onSuccessfullRequest

void AdminWidget::onSuccessfullRequest ( QString  message)
slot

Slot for handling successful request messages.

Parameters
messageThe success message.

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

Here is the caller graph for this function:

◆ onTransactionsFetched

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

Slot for handling fetched transaction history.

Parameters
transactionsThe fetched transactions.

Referenced by UIManager::closeAdminWidget(), and UIManager::createAdminWidget().

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: