FactDev  0.1
Models::User Class Reference

The User class User of it application. More...

#include <user.h>

Inheritance diagram for Models::User:
Models::People Models::IModel

Public Member Functions

 User ()
 User::User. Contruct an User.
 
 User (int id)
 User::User. Construct a User with the identify id More...
 
void commit ()
 User::commit Update user data in User table on the database.
 
void hydrat (int id=1)
 User::hydrat Get data of the user who is specified by id from the database. More...
 
void remove ()
 remove Remove the current User
 
QVariantHash getDataMap ()
 getDataMap Get all data of model with a HashMap key/value More...
 
void updateFolders (void)
 MainWindow::updateFolders Make directories which contain quotes and billings. Directories are the same than theirs of the Tree organisation (without Projects). More...
 
QString getTitle () const
 User::getTitle Return a short description of User (company) activity. More...
 
void setTitle (const QString &title)
 User::setTitle Modify the user/company activities description More...
 
QString getNoSiret () const
 User::getNoSiret Return the SIRET number (company registration number) More...
 
void setNoSiret (const QString &noSiret)
 User::setNoSiret Modify the SIRET number (company registration number) noSiret More...
 
QPixmap * getImage ()
 User::getImage Return the compagny image. More...
 
void setImage (QPixmap *image)
 User::setImage Change the current image by the new image More...
 
QString getWorkspaceName () const
 User::getWorkspaceName Return the name of the workspace user. More...
 
void setWorkspaceName (const QString &workspaceName)
 User::setWorkspaceName Change the current workspace name by the new workspaceName More...
 
QString getWorkspacePath () const
 User::getWorkspacePath Return the path of the workspace user. More...
 
void setWorkspacePath (const QString &workspacePath)
 User::setWorkspacePath Change the current workspace path by the new workspacePath More...
 
bool operator== (const User &u)
 User::operator == Re-define the operator "==" to compare if the current User is the same to the other User c Return TRUE if both Users are the same, else FALSE. More...
 
bool operator!= (const User &u)
 User::operator == Re-define the operator "!=" to compare if the current User is differnt to the other User c Return TRUE if both Users are different, else FALSE. More...
 
QString getPdflatexPath () const
 getPdflatexPath The path of pdflatex More...
 
void setPdflatexPath (const QString &getPdflatexPath)
 setPdflatexPath Change the pdflatex command path. More...
 
double getNbHoursPerDay () const
 nbHoursPerDays The number of hours per days who the user work. More...
 
void setNbHoursPerDay (double value)
 setNbHoursPerDay Change the number of hours per day More...
 
double getNbDaysPerMonth () const
 getNbDaysPerMonths The number of days per months who the user work. More...
 
void setNbDaysPerMonth (double getNbDaysPerMonth)
 setNbDaysPerMonth Change the number of days per month More...
 
double getNbDaysPerWeek () const
 getNbDaysPerWeek The number of days per week More...
 
void setNbDaysPerWeek (double value)
 setNbDaysPerWeek Change the number of days per week More...
 
double getNbHoursPerWeek () const
 getNbHoursPerWeek The number of hours per weeks. More...
 
double getNbHoursPerMonth () const
 getNbHoursPerMonth The number of hours per months. 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 User class User of it application.

Author
Florent Berbie

Constructor & Destructor Documentation

Models::User::User ( int  id)

User::User. Construct a User with the identify id

Parameters
idUser id

Member Function Documentation

QVariantHash Models::User::getDataMap ( )
virtual

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

Returns
Model's data

Implements Models::IModel.

QPixmap * Models::User::getImage ( )

User::getImage Return the compagny image.

Returns
compagny image
double Models::User::getNbDaysPerMonth ( ) const

getNbDaysPerMonths The number of days per months who the user work.

Returns
The number of days per months
double Models::User::getNbDaysPerWeek ( ) const

getNbDaysPerWeek The number of days per week

Returns
The new value
double Models::User::getNbHoursPerDay ( ) const

nbHoursPerDays The number of hours per days who the user work.

Returns
The number of hours per days
double Models::User::getNbHoursPerMonth ( ) const

getNbHoursPerMonth The number of hours per months.

Returns
The number of hours.
double Models::User::getNbHoursPerWeek ( ) const

getNbHoursPerWeek The number of hours per weeks.

Returns
The number of hours
QString Models::User::getNoSiret ( ) const

User::getNoSiret Return the SIRET number (company registration number)

Returns
SIRET number
QString Models::User::getPdflatexPath ( ) const

getPdflatexPath The path of pdflatex

Returns
The pdflatex path
QString Models::User::getTitle ( ) const

User::getTitle Return a short description of User (company) activity.

Returns
a short description of user (company) activity
QString Models::User::getWorkspaceName ( ) const

User::getWorkspaceName Return the name of the workspace user.

Returns
workspace name
QString Models::User::getWorkspacePath ( ) const

User::getWorkspacePath Return the path of the workspace user.

Returns
workspace path
void Models::User::hydrat ( int  id = 1)
virtual

User::hydrat Get data of the user who is specified by id from the database.

Parameters
idUser identify

Implements Models::IModel.

bool Models::User::operator!= ( const User u)

User::operator == Re-define the operator "!=" to compare if the current User is differnt to the other User c Return TRUE if both Users are different, else FALSE.

Parameters
uUser to compare
Returns
boolean
bool Models::User::operator== ( const User u)

User::operator == Re-define the operator "==" to compare if the current User is the same to the other User c Return TRUE if both Users are the same, else FALSE.

Parameters
uUser to compare
Returns
boolean
void Models::User::setImage ( QPixmap *  image)
virtual

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

Parameters
imageNew image

Reimplemented from Models::People.

void Models::User::setNbDaysPerMonth ( double  getNbDaysPerMonth)

setNbDaysPerMonth Change the number of days per month

Parameters
getNbDaysPerMonthThe new value
void Models::User::setNbDaysPerWeek ( double  value)

setNbDaysPerWeek Change the number of days per week

Parameters
valueThe new value
void Models::User::setNbHoursPerDay ( double  value)

setNbHoursPerDay Change the number of hours per day

Parameters
valueThe new value
void Models::User::setNoSiret ( const QString &  noSiret)

User::setNoSiret Modify the SIRET number (company registration number) noSiret

Parameters
noSiretSIRET number
void Models::User::setPdflatexPath ( const QString &  getPdflatexPath)

setPdflatexPath Change the pdflatex command path.

Parameters
getPdflatexPathThe new command
void Models::User::setTitle ( const QString &  title)

User::setTitle Modify the user/company activities description

Parameters
titleShort description on activity(ies) of User company
void Models::User::setWorkspaceName ( const QString &  workspaceName)

User::setWorkspaceName Change the current workspace name by the new workspaceName

Parameters
workspaceName
void Models::User::setWorkspacePath ( const QString &  workspacePath)

User::setWorkspacePath Change the current workspace path by the new workspacePath

Parameters
workspacePath
void Models::User::updateFolders ( void  )

MainWindow::updateFolders Make directories which contain quotes and billings. Directories are the same than theirs of the Tree organisation (without Projects).

Organisation of folders are formed like this:

  • COMPANY CustomerLastname CustomerFirstname/
    • Quotes/
      • quote1 ...
    • Billings/
      • billing1 ...

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