FactDev  0.1
itemtype.h
1 #ifndef ITEMTYPE_H
2 #define ITEMTYPE_H
3 #include <QString>
4 #include "models/imodel.h"
5 #include "models/billing.h"
6 #include "models/customer.h"
7 #include "models/project.h"
8 
9 #include "log.h"
10 
11 namespace Utils {
15 class ItemType
16 {
17 public:
18  static const int CUSTOMER = 0;
19  static const int PROJECT = 1;
20  static const int BILLING = 2;
21  static const int QUOTE = 3;
22 
28  ItemType(int type, QString name);
29 
34  QString getName() const;
35 
42  Models::IModel* getModel(int id);
43 
48  void setName(const QString &name);
49 
54  int getType() const;
59  void setType(int type);
60 
61 private:
62  QString _name;
63  int _type;
64 };
65 }
66 #endif // ITEMTYPE_H
The IModel class.
Definition: imodel.h:13
QString getName() const
ItemType::getName Get item name.
Definition: itemtype.cpp:9
The ItemType class Item type model.
Definition: itemtype.h:15
ItemType(int type, QString name)
ItemType::ItemType Construct an Item type.
Definition: itemtype.cpp:4
static const int QUOTE
constant value assigned to Quote
Definition: itemtype.h:21
Models::IModel * getModel(int id)
ItemType::getModel Get the databasemodel of the ItemType according to this identity id ...
Definition: itemtype.cpp:19
static const int CUSTOMER
constant value assigned to Customer
Definition: itemtype.h:18
void setName(const QString &name)
ItemType::setName Modify the item name.
Definition: itemtype.cpp:14
static const int BILLING
constant value assigned to Billing
Definition: itemtype.h:20
int getType() const
ItemType::getType Get the type of the current item.
Definition: itemtype.cpp:39
void setType(int type)
ItemType::setType Modify the type of the current item.
Definition: itemtype.cpp:44
static const int PROJECT
constant value assigned to Project
Definition: itemtype.h:19