6 #include <QSharedPointer>
8 #include "models/imodel.h"
9 #include "models/customer.h"
88 void setName(
const QString &name);
159 void setCustomer(QSharedPointer<Customer> customer);
188 QString _description;
193 QSharedPointer<Customer> _customer;
void setDescription(const QString &description)
Project::setDescription Modify the project description
Definition: project.cpp:99
void setName(const QString &name)
Project::setName Modify the project name
Definition: project.cpp:90
bool operator<(const Project &p) const
Project::operator < defines the operator "< to compare two Project and to see if the fisrt is anterio...
Definition: project.cpp:166
The IModel class.
Definition: imodel.h:13
double getCost() const
Project::getCost Return the Project cost
Definition: project.cpp:124
bool isLocked() const
isLocked Return true if the project is locked : end Date of project is passed.
Definition: project.cpp:81
void hydrat(int id)
Project::hydrat Insert project data which is specified by id in the database.
Definition: project.cpp:50
void setDailyRate(double dailyRate)
Project::setDailyRate Modify the daily rate dailyRate of the current project.
Definition: project.cpp:145
void setCustomer(QSharedPointer< Customer > customer)
Project::setCustomer Modify the customer linked to this project.
Definition: project.cpp:154
The Project class : Project linked to a Customer.
Definition: project.h:17
Project()
Project::Project Construct a Project.
Definition: project.cpp:11
void setBeginDate(QDate beginDate)
Project::setBeginDate Modify beginDate of a Project
Definition: project.cpp:109
bool operator==(const Project &p)
Project::operator == Re-define the operator "==" to compare if the current project is the same to the...
Definition: project.cpp:159
QString getDescription() const
Project::getDescription Return a project description.
Definition: project.cpp:94
void commit()
Project::commit Update project data in the database.
Definition: project.cpp:39
QVariantHash getDataMap()
getDataMap Get all data of model with a HashMap key/value
Definition: project.cpp:67
QSharedPointer< Customer > getCustomer() const
Project::getCustomer Return the reference to the customer linked to this project. ...
Definition: project.cpp:149
void unlock()
unlock Unlock the current project;
Definition: project.cpp:77
QString getName() const
Project::getName Return the project name.
Definition: project.cpp:85
void setEndDate(QDate endDate)
Project::setEndDate Modify endDate of Project
Definition: project.cpp:119
QDate getBeginDate() const
Project::getBeginDate return the date of creation of the Project
Definition: project.cpp:104
virtual ~Project()
~Project Desctruct project object
Definition: project.cpp:34
double getDailyRate() const
Project::getDailyRate Return the daily rate estimated for this project.
Definition: project.cpp:140
bool operator!=(const Project &p)
Project::operator == Re-define the operator "!=" to compare if the current project is differnt to the...
Definition: project.cpp:171
void lock()
lock Lock the current project and change endDate by today();
Definition: project.cpp:72
QDate getEndDate() const
Project::getEndDate Return the endDate of the Project
Definition: project.cpp:114