domain::Invitation Class Reference

Represents an invitation of a Task for a User. More...

#include <invitation.h>

Inheritance diagram for domain::Invitation:
Inheritance graph
[legend]
Collaboration diagram for domain::Invitation:
Collaboration graph
[legend]

List of all members.

Public Types

enum  State {
  Accepted = 0x1,
  Pending = 0x2,
  Declined = 0x4,
  All = Accepted | Pending | Declined
}

Public Member Functions

const Tasktask () const
const Useruser () 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

Detailed Description

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.


Member Enumeration Documentation

Possible value for the state() of an invitation. Values of this enumeration can be used as flags.

Enumerator:
Accepted 

Accepted state.

Pending 

Pending state.

Declined 

Declined state.

All 

Helper state that represents all states.

Definition at line 32 of file invitation.h.


Member Function Documentation

void domain::Invitation::setState ( Invitation::State  state  ) 

Sets the state() of this invitation.

Exceptions:
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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations Enumerator
Generated on Thu May 27 14:20:09 2010 for MopTaskManager by  doxygen 1.6.3