Conference Registration 2024.07.18.04
Loading...
Searching...
No Matches
registrationlist.h
Go to the documentation of this file.
1
9#ifndef REGISTRATIONLIST_H
10#define REGISTRATIONLIST_H
11
12#include "registration.h"
13
14
15#include <QList>
16#include <QObject>
17
20
21
27class RegistrationList : public QObject
28{
29 Q_OBJECT
30
31public:
37 RegistrationList(RegistrationModel &model, QObject *parent = nullptr);
38
44
50 bool addRegistration(Registration* registration);
51
57 bool removeRegistration(Registration *registration);
58
64 bool isRegistered(const QString &name) const;
65
71 bool isRegistered(const Person &person) const;
72
78 double totalFee(const QString &typeString) const;
79
85 int totalRegistrations(const QString &affiliation) const;
86
91 QList<Registration *> getAttendeeList() const;
92
93signals:
98 void registrationAdded(Registration *registration);
99
105
106private slots:
107 void on_registrationAdded(Registration *registration);
108 void on_registrationRemoved(Registration *registration);
109
110private:
111 QList<Registration*> m_AttendeeList;
112 RegistrationModel *m_RegistrationModel;
113};
114
115#endif // REGISTRATIONLIST_H
The Person class represents a person with a name, affiliation, and email.
Definition person.h:20
The Registration class represents a registration for an event.
Definition registration.h:24
Manages a list of conference registrations.
Definition registrationlist.h:28
void registrationRemoved(Registration *registration)
Signal emitted when a registration is removed from the list.
bool removeRegistration(Registration *registration)
Removes the selected registration from the list.
Definition registrationlist.cpp:44
void registrationAdded(Registration *registration)
Signal emitted when a registration is added to the list.
~RegistrationList()
Destructor for RegistrationList. Cleans up the list of Registrations.
Definition registrationlist.cpp:25
bool isRegistered(const QString &name) const
Checks if an attendee with the given name is already registered.
Definition registrationlist.cpp:55
int totalRegistrations(const QString &affiliation) const
Returns the number of attendees registered for the conference from a specific institution.
Definition registrationlist.cpp:96
double totalFee(const QString &typeString) const
Calculates the total registration fees for a given type of registration.
Definition registrationlist.cpp:81
RegistrationList(RegistrationModel &model, QObject *parent=nullptr)
Constructs a RegistrationList.
Definition registrationlist.cpp:16
bool addRegistration(Registration *registration)
Adds a registration to the list if the attendee's name is not already on the list.
Definition registrationlist.cpp:32
QList< Registration * > getAttendeeList() const
Returns the list of attendees.
Definition registrationlist.cpp:110
The RegistrationModel class is a custom model that extends QStandardItemModel.
Definition registrationmodel.h:23
The RegistrationTypes class represents the different types of registration.
Definition registrationtypes.h:21