Represents an invitation of a Task for a User. More...
#include <invitation.h>
Public Types | |
enum | State { Accepted = 0x1, Pending = 0x2, Declined = 0x4, All = Accepted | Pending | Declined } |
Public Member Functions | |
const Task * | task () const |
const User * | user () const |
State | state () const |
QString | stateString () const |
void | setState (State state) |
Private Member Functions | |
Invitation (Task *task, User *user) | |
Private Attributes | |
InvitationPrivate *const | d |
Friends | |
class | TaskManagerData |
Represents an invitation of a Task for a User.
Invitation object are responsible for the link with the corresponding Task and User objects. They also keep track of the state() of the invitation.
Definition at line 20 of file invitation.h.
Possible value for the state() of an invitation. Values of this enumeration can be used as flags.
Accepted |
Accepted state. |
Pending |
Pending state. |
Declined |
Declined state. |
All |
Helper state that represents all states. |
Definition at line 32 of file invitation.h.
void domain::Invitation::setState | ( | Invitation::State | state | ) |
Sets the state() of this invitation.
InvalidDataException | If the given state is State::All. |
Definition at line 64 of file invitation.cpp.
Invitation::State domain::Invitation::state | ( | ) | const |
Returns the State of this invitation.
Definition at line 45 of file invitation.cpp.
QString domain::Invitation::stateString | ( | ) | const |
Returns a string representation of the state() of this invitation.
Definition at line 50 of file invitation.cpp.
const Task * domain::Invitation::task | ( | ) | const |
Returns the Task this invitation is issued for.
Definition at line 35 of file invitation.cpp.
const User * domain::Invitation::user | ( | ) | const |
Returns the User this invitation is for.
Definition at line 40 of file invitation.cpp.