-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd_account.h
71 lines (60 loc) · 2.39 KB
/
d_account.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#pragma once
#include <QObject>
#include <QVariantMap>
class D_Account : public QObject
{
Q_OBJECT
Q_PROPERTY(int idx READ idx WRITE setid NOTIFY idChanged FINAL)
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged FINAL)
Q_PROPERTY(QString type READ type WRITE setType NOTIFY typeChanged FINAL)
Q_PROPERTY(QString api READ api WRITE setApi NOTIFY apiChanged FINAL)
Q_PROPERTY(QString secret READ secret WRITE setSecret NOTIFY secretChanged FINAL)
Q_PROPERTY(bool selected READ selected WRITE setSelected NOTIFY selectedChanged FINAL)
Q_PROPERTY(bool connected READ connected WRITE setConnected NOTIFY connectedChanged FINAL)
Q_PROPERTY(QString status READ status WRITE setStatus NOTIFY statusChanged FINAL)
Q_PROPERTY(QString balance READ balance WRITE setBalance NOTIFY balanceChanged FINAL)
public:
explicit D_Account(int idx, const QString& name, const QString& type,
const QString& api, const QString& secret, bool selected,
bool connected, const QString& status, const QString& balance, QObject *parent = nullptr);
explicit D_Account(const QVariantMap& map, QObject *parent = nullptr);
int _idx = 0;
QString _name;
QString _type;
QString _api;
QString _secret;
bool _selected;
bool _connected;
QString _status;
QString _balance;
int idx() const { return _idx; };
QString name() const { return _name; }
QString type() const { return _type; }
QString api() const { return _api; }
QString secret() const { return _secret; }
bool selected() const { return _selected; }
bool connected() const { return _connected; }
QString status() const { return _status; }
QString balance() const { return _balance; }
void setid(int idx);
void setName(const QString& name);
void setType(const QString& type);
void setApi(const QString& api);
void setSecret(const QString& secret);
void setSelected(bool selected);
void setConnected(bool connected);
void setStatus(const QString& status);
void setBalance(const QString& balance);
QVariantMap getMap();
void fromMap(QVariantMap map);
signals:
void idChanged();
void nameChanged();
void typeChanged();
void apiChanged();
void secretChanged();
void selectedChanged();
void connectedChanged();
void statusChanged();
void balanceChanged();
};