-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsalesmodel.h
More file actions
executable file
·45 lines (36 loc) · 924 Bytes
/
salesmodel.h
File metadata and controls
executable file
·45 lines (36 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef SALESMODEL_H
#define SALESMODEL_H
#include <QObject>
#include <QSqlQueryModel>
#include <QVariant>
#include <QModelIndex>
#include <QColor>
#include <QFont>
#include <QBrush>
class SalesModel : public QSqlQueryModel
{
Q_OBJECT
public:
explicit SalesModel(QObject *parent=nullptr,int serial=0,int name=1,int weight=2,
int total=3,int paid=4,int remaining=5);
int serial() const;
void setSerial(int serial);
int name() const;
void setName(int name);
int total() const;
void setTotal(int total);
int paid() const;
void setPaid(int paid);
int weight() const;
void setWeight(int weight);
protected:
QVariant data(const QModelIndex &index, int role) const;
private:
int _serial;
int _name;
int _total;
int _paid;
int _weight;
int _remaining;
};
#endif // SALESMODEL_H