Conference Registration 2024.07.18.04
Loading...
Searching...
No Matches
RegistrationList Class Reference

Manages a list of conference registrations. More...

#include <registrationlist.h>

Inheritance diagram for RegistrationList:

Signals

void registrationAdded (Registration *registration)
 Signal emitted when a registration is added to the list.
 
void registrationRemoved (Registration *registration)
 Signal emitted when a registration is removed from the list.
 

Public Member Functions

 RegistrationList (RegistrationModel &model, QObject *parent=nullptr)
 Constructs a RegistrationList.
 
 ~RegistrationList ()
 Destructor for RegistrationList. Cleans up the list of Registrations.
 
bool addRegistration (Registration *registration)
 Adds a registration to the list if the attendee's name is not already on the list.
 
bool removeRegistration (Registration *registration)
 Removes the selected registration from the list.
 
bool isRegistered (const QString &name) const
 Checks if an attendee with the given name is already registered.
 
bool isRegistered (const Person &person) const
 Checks if an attendee is already registered.
 
double totalFee (const QString &typeString) const
 Calculates the total registration fees for a given type of registration.
 
int totalRegistrations (const QString &affiliation) const
 Returns the number of attendees registered for the conference from a specific institution.
 
QList< Registration * > getAttendeeList () const
 Returns the list of attendees.
 

Detailed Description

Manages a list of conference registrations.

The RegistrationList class provides functionality to add and query conference registrations. It ensures no duplicate email addresses exist, unless they are associated with different names. It also calculates total fees based on registration types, as well as the number of attendees registered from a specific institution/affiliation.

Constructor & Destructor Documentation

◆ RegistrationList()

RegistrationList::RegistrationList ( RegistrationModel & model,
QObject * parent = nullptr )

Constructs a RegistrationList.

Parameters
modelThe RegistrationModel object.
parentThe parent QObject, default is nullptr.

Member Function Documentation

◆ addRegistration()

bool RegistrationList::addRegistration ( Registration * registration)

Adds a registration to the list if the attendee's name is not already on the list.

Parameters
registrationThe registration to be added.
Returns
true if the registration was added successfully, false otherwise.

◆ getAttendeeList()

QList< Registration * > RegistrationList::getAttendeeList ( ) const

Returns the list of attendees.

Returns
The list of attendees.

◆ isRegistered() [1/2]

bool RegistrationList::isRegistered ( const Person & person) const

Checks if an attendee is already registered.

Parameters
personThe Person object representing the attendee.
Returns
true if the attendee is already registered, false otherwise.

◆ isRegistered() [2/2]

bool RegistrationList::isRegistered ( const QString & name) const

Checks if an attendee with the given name is already registered.

Parameters
nameThe name of the attendee.
Returns
true if the attendee is already registered, false otherwise.

◆ registrationAdded

void RegistrationList::registrationAdded ( Registration * registration)
signal

Signal emitted when a registration is added to the list.

Parameters
registrationThe added registration.

◆ registrationRemoved

void RegistrationList::registrationRemoved ( Registration * registration)
signal

Signal emitted when a registration is removed from the list.

Parameters
registrationThe removed registration.

◆ removeRegistration()

bool RegistrationList::removeRegistration ( Registration * registration)

Removes the selected registration from the list.

Parameters
registrationThe registration to be removed.
Returns
true if the registration was removed successfully, false otherwise.

◆ totalFee()

double RegistrationList::totalFee ( const QString & typeString) const

Calculates the total registration fees for a given type of registration.

Parameters
typeStringThe type of registration.
Returns
The total registration fees for the given type.

◆ totalRegistrations()

int RegistrationList::totalRegistrations ( const QString & affiliation) const

Returns the number of attendees registered for the conference from a specific institution.

Parameters
affiliationThe affiliation (institution).
Returns
The number of registrations from the specified institution.

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