-
Notifications
You must be signed in to change notification settings - Fork 2
/
AccountKeys.hpp
40 lines (31 loc) · 1.08 KB
/
AccountKeys.hpp
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
#ifndef ACCOUNTKEYS_HPP
#define ACCOUNTKEYS_HPP
#include "KeyPair.hpp"
#include <QObject>
class AccountKeys : public QObject
{
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
Q_PROPERTY(KeyPair* ownerKey READ ownerKey CONSTANT)
Q_PROPERTY(KeyPair* activeKey READ activeKey CONSTANT)
Q_PROPERTY(KeyPair* postingKey READ postingKey CONSTANT)
Q_PROPERTY(KeyPair* memoKey READ memoKey CONSTANT)
QString m_name;
KeyPair* m_ownerKey = new KeyPair(this);
KeyPair* m_activeKey = new KeyPair(this);
KeyPair* m_postingKey = new KeyPair(this);
KeyPair* m_memoKey = new KeyPair(this);
public:
explicit AccountKeys(QObject *parent = 0);
QString name() const { return m_name; }
KeyPair* ownerKey() const { return m_ownerKey; }
KeyPair* activeKey() const { return m_activeKey; }
KeyPair* postingKey() const { return m_postingKey; }
KeyPair* memoKey() const { return m_memoKey; }
signals:
void nameChanged(QString name);
void updated();
public slots:
void setName(QString name);
};
#endif // ACCOUNTKEYS_HPP