FactDev  0.1
Models::ContributoriesList Class Reference

The ContributoriesList class List of contributories. More...

#include <contributorieslist.h>

Inheritance diagram for Models::ContributoriesList:
Models::Calculable

Public Member Functions

 ContributoriesList ()
 ContributoriesList::ContributoriesList Construct a ContributoriesList.
 
double getPrice (bool isPaied=false)
 getPrice Return the price of a contributories list More...
 
double getPrice (Models::Project *project)
 getPrice Return price of project More...
 
double getSumQuantity ()
 ContributoriesList::getSumQuantity Return the sum of quantity (number of hours) of the Contributories. More...
 
double getSumQuantity (Models::Project *project)
 ContributoriesList::getSumQuantity Return the sum of quantity (number of hours) of the Contributories of project. More...
 
Models::Rate getRate (Models::Project *project)
 ContributoriesList::getRate. More...
 
virtual void commit ()
 ContributoriesList::commit Update or insert data into the database.
 
void addContributory (Models::Contributory &contributory)
 ContributoriesList::addContributory Add a new contributory More...
 
void addProject (Project *p, Models::Rate rate)
 ContributoriesList::addProject Add a Project p and it rate More...
 
QList< Contributory > & getContributories (Project *p)
 ContributoriesList::getContributories Return a list of Contributories for the Project p More...
 
int getIdBilling () const
 ContributoriesList::getIdBilling Return the Billing ID. More...
 
void setIdBilling (int idBilling)
 ContributoriesList::setIdBilling Change the Billing id by the new idBilling More...
 
void setAllIdContributories (int idContributory)
 ContributoriesList::setAllIdContributories Change all Contributory id with the same id. More...
 
bool isInsert () const
 ContributoriesList::isInsert Return TRUE if an element is inserting else FALSE. More...
 
void setInsert (bool insert)
 ContributoriesList::setInsert Change the state of insertion. More...
 
int getNbProjects ()
 ContributoriesList::getNbProjects Return the number of projects. More...
 
QSharedPointer< CustomergetCustomer ()
 ContributoriesList::getCustomer Return the Customers linked to theses contributories. More...
 
QList< Project * > getProjects ()
 ContributoriesList::getProjects List of Projects. More...
 
QList< Contributory > * getAllContributories ()
 ContributoriesList::getAllContributories List of all contributories (all contributories from all projects) More...
 
QVariantList getDataMap ()
 ContributoriesList::getDataMap Return a list of Billing and it value linked which indicates if it is inserting or not. More...
 

Detailed Description

The ContributoriesList class List of contributories.

Author
Antoine de Roquemaurel

Member Function Documentation

void Models::ContributoriesList::addContributory ( Models::Contributory contributory)

ContributoriesList::addContributory Add a new contributory

Parameters
contributoryContributory to add
void Models::ContributoriesList::addProject ( Project p,
Models::Rate  rate 
)

ContributoriesList::addProject Add a Project p and it rate

Parameters
pProject to add
rateRate of the project
QList< Contributory > * Models::ContributoriesList::getAllContributories ( )

ContributoriesList::getAllContributories List of all contributories (all contributories from all projects)

Returns
List of all contributories
QList< Contributory > & Models::ContributoriesList::getContributories ( Project p)

ContributoriesList::getContributories Return a list of Contributories for the Project p

Parameters
pProject
Returns
List of Contributories for a project
QSharedPointer< Customer > Models::ContributoriesList::getCustomer ( )

ContributoriesList::getCustomer Return the Customers linked to theses contributories.

Returns
Customer
QVariantList Models::ContributoriesList::getDataMap ( )

ContributoriesList::getDataMap Return a list of Billing and it value linked which indicates if it is inserting or not.

Returns
List of billing and value linked
int Models::ContributoriesList::getIdBilling ( ) const
int Models::ContributoriesList::getNbProjects ( )

ContributoriesList::getNbProjects Return the number of projects.

Returns
Count number of project
double Models::ContributoriesList::getPrice ( bool  isPaied = false)
virtual

getPrice Return the price of a contributories list

Returns
The price

Implements Models::Calculable.

double Models::ContributoriesList::getPrice ( Models::Project project)

getPrice Return price of project

Parameters
projectThe project
Returns
The price
QList< Project * > Models::ContributoriesList::getProjects ( void  )

ContributoriesList::getProjects List of Projects.

Returns
List of Projects
Models::Rate Models::ContributoriesList::getRate ( Models::Project project)

ContributoriesList::getRate.

Parameters
project
Returns
double Models::ContributoriesList::getSumQuantity ( )
virtual

ContributoriesList::getSumQuantity Return the sum of quantity (number of hours) of the Contributories.

Returns
sum of quantity in days

Implements Models::Calculable.

double Models::ContributoriesList::getSumQuantity ( Models::Project project)

ContributoriesList::getSumQuantity Return the sum of quantity (number of hours) of the Contributories of project.

Parameters
projectThe project
Returns
sum of quantity in days
bool Models::ContributoriesList::isInsert ( ) const

ContributoriesList::isInsert Return TRUE if an element is inserting else FALSE.

Returns
boolean
void Models::ContributoriesList::setAllIdContributories ( int  idContributory)

ContributoriesList::setAllIdContributories Change all Contributory id with the same id.

Parameters
idContributorythe new Contributory id
void Models::ContributoriesList::setIdBilling ( int  idBilling)

ContributoriesList::setIdBilling Change the Billing id by the new idBilling

Parameters
idBillingBillind id
void Models::ContributoriesList::setInsert ( bool  insert)

ContributoriesList::setInsert Change the state of insertion.

Parameters
insertBoolean

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