FactDev  0.1
Models::Customer Class Reference

The Customer class Customer. More...

#include <customer.h>

Inheritance diagram for Models::Customer:
Models::People Models::IModel

Public Member Functions

 Customer ()
 Customer::Customer Construct a Customer.
 
 Customer (int id)
 Customer::Customer Constuct a Customer who is specidied by id More...
 
void commit ()
 Customer::Customer Constuct a People who is specidied by id More...
 
void hydrat (int id)
 Customer::hydrat Insert into database informations related to the Customer who is specified by id More...
 
void remove ()
 Customer::remove Remove the current customer.
 
QVariantHash getDataMap ()
 getDataMap Get all data of model with a HashMap key/value More...
 
QString getPath () const
 Customer::getPath Return the path of the workspace for the current Customer. More...
 
QString getNameFolder () const
 Customer::getNameFolder Return the name of the current Customer's folder in the workspace. More...
 
double getTurnover () const
 Customer::getTurnover Return the turnover of the customer money that customer pay, revenue sales. More...
 
QPixmap * getImage ()
 Customer::getImage Return the compagny image. More...
 
void setImage (QPixmap *image)
 Customer::setImage Change the current image by the new image More...
 
bool isArchived () const
 Customer::isArchived Return if the Customer is archived. More...
 
void setIsArchived (const bool isArchived)
 Customer::setIsArchived set the isArchived parameter. More...
 
- Public Member Functions inherited from Models::People
 People ()
 People::People Construct a People.
 
 People (int id)
 People::People Construct a People.
 
QString getFirstname () const
 People::getFirstname Return the People firstname. More...
 
void setFirstname (const QString &firstname)
 People::setFirstnament Modify the People firstname More...
 
QString getLastname () const
 People::getLastname Return the People lastname. More...
 
void setLastname (const QString &lastname)
 People::setLastname Modify the People lastname More...
 
QString getCompany () const
 People::getCompany Return the People company. More...
 
void setCompany (const QString &company)
 People::setCompany Modify the People company name. More...
 
QString getAddress () const
 People::getAddress Return the company addess (Number and name of street) More...
 
void setAddress (const QString &address)
 People::setAddress Modify the People company address More...
 
QString getPostalCode () const
 People::getPostalCode Return the postal code. More...
 
void setPostalCode (const QString &postalCode)
 People::setPostalCode Modify the postal code postalCode More...
 
QString getCity () const
 People::getCity Return the city. More...
 
void setCity (const QString &city)
 People::setCity Modify the city More...
 
QString getCountry () const
 People::getCountry Return the country of the People. More...
 
void setCountry (const QString &country)
 People::setCountry Replace the country of the People by country More...
 
QString getEmail () const
 People::getEmail Return the People professional email More...
 
void setEmail (const QString &email)
 People::setEmail Modify the People professional email More...
 
QString getPhone () const
 People::getPhone Return the number of the desktop phone. More...
 
void setPhone (const QString &phone)
 People::setPhone Modify the number of the desktop phone More...
 
QString getMobilePhone () const
 People::getMobilePhone Return the number of the professional mobile phone. More...
 
void setMobilePhone (const QString &mobilePhone)
 People::setMobilePhone Modify the number of the professional People mobile phone mobilePhone More...
 
QString getFax () const
 People::getFax Return the fax number. More...
 
void setFax (const QString &fax)
 People::setFax Replace the current fax number by fax More...
 
virtual QPixmap * getImage () const
 People::getImage Return the compagny image. More...
 
QString getExtensionImage () const
 People::getExtensionImage Return the extension of the image file. More...
 
void setExtensionImage (const QString &ext)
 People::setExtensionImage Change the extension of the image file by the new ext More...
 
QString getAddressComplement () const
 getAddressComplement Return the address complement (Building, Appartment, …) More...
 
void setAddressComplement (const QString &addressComplement)
 setAddressComplement Change the address complement More...
 
QString getWebsite () const
 getWebsite Website of People More...
 
void setWebsite (const QString &website)
 setWebsite Change the url of website More...
 
bool operator== (const People &c)
 People::operator == Re-define the operator "==" to compare if the current People is the same to the other People c Return TRUE if both Peoples are the same, else FALSE. More...
 
bool operator!= (const People &c)
 People::operator == Re-define the operator "!=" to compare if the current People is differnt to the other People c Return TRUE if both Peoples 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::People
QPixmap * _image
 Compagny image.
 
- Protected Attributes inherited from Models::IModel
int _id
 Element identify.
 
bool _toRemoved
 Flag to know if the object must be removed.
 

Detailed Description

The Customer class Customer.

Author
Antoine de Roquemaurel
Florent Berbie

Constructor & Destructor Documentation

Models::Customer::Customer ( int  id)

Customer::Customer Constuct a Customer who is specidied by id

Parameters
idCustomer identify

Member Function Documentation

void Models::Customer::commit ( )
virtual

Customer::Customer Constuct a People who is specidied by id

Parameters
idCustomer identify

Implements Models::IModel.

QVariantHash Models::Customer::getDataMap ( )
virtual

getDataMap Get all data of model with a HashMap key/value

Returns
Model's data

Implements Models::IModel.

QPixmap * Models::Customer::getImage ( )

Customer::getImage Return the compagny image.

Returns
compagny image
QString Models::Customer::getNameFolder ( ) const

Customer::getNameFolder Return the name of the current Customer's folder in the workspace.

Returns
name of the Customer's folder
QString Models::Customer::getPath ( ) const

Customer::getPath Return the path of the workspace for the current Customer.

Returns
workspace path
double Models::Customer::getTurnover ( ) const

Customer::getTurnover Return the turnover of the customer money that customer pay, revenue sales.

Returns
turnover
void Models::Customer::hydrat ( int  id)
virtual

Customer::hydrat Insert into database informations related to the Customer who is specified by id

Parameters
idCustomer identify

Implements Models::IModel.

bool Models::Customer::isArchived ( ) const

Customer::isArchived Return if the Customer is archived.

Returns
true or false
void Models::Customer::setImage ( QPixmap *  image)
virtual

Customer::setImage Change the current image by the new image

Parameters
imageNew image

Reimplemented from Models::People.

void Models::Customer::setIsArchived ( const bool  isArchived)

Customer::setIsArchived set the isArchived parameter.

Parameters
isArchived

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