|
FactDev
0.1
|
The Project class : Project linked to a Customer. More...
#include <project.h>
Public Member Functions | |
| Project () | |
| Project::Project Construct a Project. | |
| Project (QString name) | |
| Project::project Construct a project with a name. | |
| Project (int id) | |
| Project::Project Construct a Project which is specified by an id More... | |
| virtual | ~Project () |
| ~Project Desctruct project object | |
| void | commit () |
| Project::commit Update project data in the database. | |
| void | hydrat (int id) |
| Project::hydrat Insert project data which is specified by id in the database. More... | |
| void | remove () |
| Project::remove Remove the current project. | |
| QVariantHash | getDataMap () |
| getDataMap Get all data of model with a HashMap key/value More... | |
| void | lock () |
| lock Lock the current project and change endDate by today(); | |
| bool | isLocked () const |
| isLocked Return true if the project is locked : end Date of project is passed. | |
| void | unlock () |
| unlock Unlock the current project; | |
| QString | getName () const |
| Project::getName Return the project name. More... | |
| void | setName (const QString &name) |
| Project::setName Modify the project name More... | |
| QString | getDescription () const |
| Project::getDescription Return a project description. More... | |
| void | setDescription (const QString &description) |
| Project::setDescription Modify the project description More... | |
| QDate | getBeginDate () const |
| Project::getBeginDate return the date of creation of the Project More... | |
| void | setBeginDate (QDate beginDate) |
| Project::setBeginDate Modify beginDate of a Project More... | |
| QDate | getEndDate () const |
| Project::getEndDate Return the endDate of the Project More... | |
| void | setEndDate (QDate endDate) |
| Project::setEndDate Modify endDate of Project More... | |
| double | getCost () const |
| Project::getCost Return the Project cost More... | |
| double | getDailyRate () const |
| Project::getDailyRate Return the daily rate estimated for this project. More... | |
| void | setDailyRate (double dailyRate) |
| Project::setDailyRate Modify the daily rate dailyRate of the current project. More... | |
| QSharedPointer< Customer > | getCustomer () const |
| Project::getCustomer Return the reference to the customer linked to this project. More... | |
| void | setCustomer (QSharedPointer< Customer > customer) |
| Project::setCustomer Modify the customer linked to this project. More... | |
| bool | operator== (const Project &p) |
| Project::operator == Re-define the operator "==" to compare if the current project is the same to the other Project p Return TRUE if both projects are the same, else FALSE. More... | |
| bool | operator< (const Project &p) const |
| Project::operator < defines the operator "< to compare two Project and to see if the fisrt is anterior to the second. More... | |
| bool | operator!= (const Project &p) |
| Project::operator == Re-define the operator "!=" to compare if the current project is differnt to the other Project p Return TRUE if both projects are different, else FALSE. More... | |
Public Member Functions inherited from Models::IModel | |
| virtual | ~IModel () |
| ~IModel Remove an instance of IModel | |
| int | getId () const |
| IModel::getId Return the identify of the element of the database. More... | |
| void | setId (int id) |
| IModel::setId Replace the current identify by id More... | |
| bool | isToRemoved () const |
| toRemoved return if object must be removed. More... | |
| void | setToRemoved (bool toRemoved) |
| setToRemoved Change the flag for removed object More... | |
Additional Inherited Members | |
Protected Attributes inherited from Models::IModel | |
| int | _id |
| Element identify. | |
| bool | _toRemoved |
| Flag to know if the object must be removed. | |
| Models::Project::Project | ( | int | id | ) |
Project::Project Construct a Project which is specified by an id
| id |
| QDate Models::Project::getBeginDate | ( | ) | const |
Project::getBeginDate return the date of creation of the Project
| double Models::Project::getCost | ( | ) | const |
Project::getCost Return the Project cost
| QSharedPointer< Customer > Models::Project::getCustomer | ( | ) | const |
Project::getCustomer Return the reference to the customer linked to this project.
| double Models::Project::getDailyRate | ( | ) | const |
Project::getDailyRate Return the daily rate estimated for this project.
|
virtual |
getDataMap Get all data of model with a HashMap key/value
Implements Models::IModel.
| QString Models::Project::getDescription | ( | ) | const |
Project::getDescription Return a project description.
| QDate Models::Project::getEndDate | ( | ) | const |
Project::getEndDate Return the endDate of the Project
| QString Models::Project::getName | ( | ) | const |
Project::getName Return the project name.
|
virtual |
Project::hydrat Insert project data which is specified by id in the database.
| id | Project identify |
Implements Models::IModel.
| bool Models::Project::operator!= | ( | const Project & | p | ) |
Project::operator == Re-define the operator "!=" to compare if the current project is differnt to the other Project p Return TRUE if both projects are different, else FALSE.
| c | Project to compare |
| bool Models::Project::operator< | ( | const Project & | p | ) | const |
Project::operator < defines the operator "< to compare two Project and to see if the fisrt is anterior to the second.
| bool Models::Project::operator== | ( | const Project & | p | ) |
Project::operator == Re-define the operator "==" to compare if the current project is the same to the other Project p Return TRUE if both projects are the same, else FALSE.
| c | Project to compare |
| void Models::Project::setBeginDate | ( | QDate | beginDate | ) |
Project::setBeginDate Modify beginDate of a Project
| beginDate | the new date of creation of the project |
| void Models::Project::setCustomer | ( | QSharedPointer< Customer > | customer | ) |
Project::setCustomer Modify the customer linked to this project.
| customer | New customer associated to this project |
| void Models::Project::setDailyRate | ( | double | dailyRate | ) |
Project::setDailyRate Modify the daily rate dailyRate of the current project.
| dailyRate | New daily rate associated to the current project |
| void Models::Project::setDescription | ( | const QString & | description | ) |
Project::setDescription Modify the project description
| description | New project description |
| void Models::Project::setEndDate | ( | QDate | endDate | ) |
Project::setEndDate Modify endDate of Project
| endDate | the new end date of the project |
| void Models::Project::setName | ( | const QString & | name | ) |
Project::setName Modify the project name
| name | Project name |