FactDev  0.1
customer.h
1 #ifndef CUSTOMER_H
2 #define CUSTOMER_H
3 #include <QString>
4 #include <QStandardItem>
5 #include <QPixmap>
6 
7 #include "models/people.h"
8 
9 namespace Models {
15 class Customer : public People
16 {
17 public:
21  Customer();
27  Customer(int id);
28 
34  void commit();
35 
41  void hydrat(int id);
42 
46  void remove();
47 
52  QVariantHash getDataMap();
53 
59  QString getPath() const;
60 
66  QString getNameFolder() const;
67 
73  double getTurnover() const;
74 
79  QPixmap *getImage();
80 
86  void setImage(QPixmap *image);
87 
92  bool isArchived() const;
97  void setIsArchived(const bool isArchived);
98 
99 private:
100  double _turnover;
101  bool _isArchived;
102 };
103 }
104 #endif // CUSTOMER_H
double getTurnover() const
Customer::getTurnover Return the turnover of the customer money that customer pay, revenue sales.
Definition: customer.cpp:99
void setImage(QPixmap *image)
Customer::setImage Change the current image by the new image
Definition: customer.cpp:119
void commit()
Customer::Customer Constuct a People who is specidied by id
Definition: customer.cpp:20
void hydrat(int id)
Customer::hydrat Insert into database informations related to the Customer who is specified by id ...
Definition: customer.cpp:30
QString getNameFolder() const
Customer::getNameFolder Return the name of the current Customer's folder in the workspace.
Definition: customer.cpp:92
The Customer class Customer.
Definition: customer.h:15
QString getPath() const
Customer::getPath Return the path of the workspace for the current Customer.
Definition: customer.cpp:83
QPixmap * getImage()
Customer::getImage Return the compagny image.
Definition: customer.cpp:110
bool isArchived() const
Customer::isArchived Return if the Customer is archived.
Definition: customer.cpp:126
QVariantHash getDataMap()
getDataMap Get all data of model with a HashMap key/value
Definition: customer.cpp:58
Customer()
Customer::Customer Construct a Customer.
Definition: customer.cpp:11
The People class People.
Definition: people.h:12
void setIsArchived(const bool isArchived)
Customer::setIsArchived set the isArchived parameter.
Definition: customer.cpp:131