-
Notifications
You must be signed in to change notification settings - Fork 0
/
financialmutations.h
55 lines (42 loc) · 1.46 KB
/
financialmutations.h
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
46
47
48
49
50
51
52
53
54
55
#ifndef FINANCIALMUTATIONS_H
#define FINANCIALMUTATIONS_H
#include "jsonintrepeter.h"
#include <QVector>
class FinancialMutation
{
public:
enum FinancialAccount {BankAccount, CashBook};
FinancialMutation(QString amount, QString description, QString date) : mAmount(amount), mDescription(description), mDate(date) {}
FinancialMutation() {}
static QString getFinancialAccountID(FinancialAccount);
QString getAmount() {return mAmount;}
QString getName() {return mName;}
QString getDescription() {return mDescription;}
QString getID() {return mID;}
QString getDate() {return mDate;}
QString getFinancialAccountID() {return mFinancialAccountID;}
void setAmount(QString amount) {mAmount = amount;}
void setName(QString name) {mName = name;}
void setDescription(QString description) {mDescription = description;}
void setID(QString id) {mID = id;}
void setDate(QString date) {mDate = date;}
void setFinancialAccountID(QString id) {mFinancialAccountID = id;}
private:
QString mAmount;
QString mName = "";
QString mDescription;
QString mID = "";
QString mDate;
QString mFinancialAccountID;
};
class GetUnprocessedFinancialMutations : public JSONIntrepeter
{
Q_OBJECT
public:
GetUnprocessedFinancialMutations();
~GetUnprocessedFinancialMutations();
void receiveParsedReply(QJsonDocument);
signals:
void UnprocessedFinancialMutationsReady(QVector<FinancialMutation*> mutations);
};
#endif // FINANCIALMUTATIONS_H